[{"data":1,"prerenderedAt":311},["ShallowReactive",2],{"term-e\u002Fencryption":3,"related-e\u002Fencryption":289},{"id":4,"title":5,"acronym":6,"body":7,"category":267,"description":268,"difficulty":269,"extension":270,"letter":271,"meta":272,"navigation":273,"path":274,"related":275,"seo":283,"sitemap":284,"stem":287,"subcategory":6,"__hash__":288},"terms\u002Fterms\u002Fe\u002Fencryption.md","Encryption",null,{"type":8,"value":9,"toc":261},"minimark",[10,15,19,23,26,30,250,254,257],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"Encryption is scrambling your message into gibberish so only someone with the secret decoder ring can read it. Imagine writing a note in a secret language only your best friend knows — anyone who steals it just sees nonsense. That's encryption.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Encryption is the process of converting plaintext data into ciphertext using an algorithm and a key. Only parties with the correct decryption key can reverse the process and read the original data.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F AES encryption with Node.js crypto\nimport { createCipheriv, randomBytes } from 'crypto';\nconst key = randomBytes(32);\nconst iv = randomBytes(16);\nconst cipher = createCipheriv('aes-256-cbc', key, iv);\nlet encrypted = cipher.update('secret message', 'utf8', 'hex');\nencrypted += cipher.final('hex');\n","javascript","",[38,39,40,49,89,117,138,171,222],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","\u002F\u002F AES encryption with Node.js crypto\n",[41,50,52,56,60,64,67,70,73,76,79,83,86],{"class":43,"line":51},2,[41,53,55],{"class":54},"s7zQu","import",[41,57,59],{"class":58},"sMK4o"," {",[41,61,63],{"class":62},"sTEyZ"," createCipheriv",[41,65,66],{"class":58},",",[41,68,69],{"class":62}," randomBytes",[41,71,72],{"class":58}," }",[41,74,75],{"class":54}," from",[41,77,78],{"class":58}," '",[41,80,82],{"class":81},"sfazB","crypto",[41,84,85],{"class":58},"'",[41,87,88],{"class":58},";\n",[41,90,92,96,99,102,105,108,112,115],{"class":43,"line":91},3,[41,93,95],{"class":94},"spNyl","const",[41,97,98],{"class":62}," key ",[41,100,101],{"class":58},"=",[41,103,69],{"class":104},"s2Zo4",[41,106,107],{"class":62},"(",[41,109,111],{"class":110},"sbssI","32",[41,113,114],{"class":62},")",[41,116,88],{"class":58},[41,118,120,122,125,127,129,131,134,136],{"class":43,"line":119},4,[41,121,95],{"class":94},[41,123,124],{"class":62}," iv ",[41,126,101],{"class":58},[41,128,69],{"class":104},[41,130,107],{"class":62},[41,132,133],{"class":110},"16",[41,135,114],{"class":62},[41,137,88],{"class":58},[41,139,141,143,146,148,150,152,154,157,159,161,164,166,169],{"class":43,"line":140},5,[41,142,95],{"class":94},[41,144,145],{"class":62}," cipher ",[41,147,101],{"class":58},[41,149,63],{"class":104},[41,151,107],{"class":62},[41,153,85],{"class":58},[41,155,156],{"class":81},"aes-256-cbc",[41,158,85],{"class":58},[41,160,66],{"class":58},[41,162,163],{"class":62}," key",[41,165,66],{"class":58},[41,167,168],{"class":62}," iv)",[41,170,88],{"class":58},[41,172,174,177,180,182,185,188,191,193,195,198,200,202,204,207,209,211,213,216,218,220],{"class":43,"line":173},6,[41,175,176],{"class":94},"let",[41,178,179],{"class":62}," encrypted ",[41,181,101],{"class":58},[41,183,184],{"class":62}," cipher",[41,186,187],{"class":58},".",[41,189,190],{"class":104},"update",[41,192,107],{"class":62},[41,194,85],{"class":58},[41,196,197],{"class":81},"secret message",[41,199,85],{"class":58},[41,201,66],{"class":58},[41,203,78],{"class":58},[41,205,206],{"class":81},"utf8",[41,208,85],{"class":58},[41,210,66],{"class":58},[41,212,78],{"class":58},[41,214,215],{"class":81},"hex",[41,217,85],{"class":58},[41,219,114],{"class":62},[41,221,88],{"class":58},[41,223,225,228,231,233,235,238,240,242,244,246,248],{"class":43,"line":224},7,[41,226,227],{"class":62},"encrypted ",[41,229,230],{"class":58},"+=",[41,232,184],{"class":62},[41,234,187],{"class":58},[41,236,237],{"class":104},"final",[41,239,107],{"class":62},[41,241,85],{"class":58},[41,243,215],{"class":81},[41,245,85],{"class":58},[41,247,114],{"class":62},[41,249,88],{"class":58},[11,251,253],{"id":252},"when-youll-hear-this","When You'll Hear This",[16,255,256],{},"\"We encrypt all data before storing it.\" \u002F \"The traffic is encrypted with TLS.\"",[258,259,260],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":51,"depth":51,"links":262},[263,264,265,266],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":252,"depth":51,"text":253},"security","Encryption is scrambling your message into gibberish so only someone with the secret decoder ring can read it.","beginner","md","e",{},true,"\u002Fterms\u002Fe\u002Fencryption",[276,277,278,279,280,281,282],"Decryption","TLS","HTTPS","Symmetric Encryption","Asymmetric Encryption","Public Key","Private Key",{"title":5,"description":268},{"changefreq":285,"priority":286},"weekly",0.7,"terms\u002Fe\u002Fencryption","41TX4KM57J4ZkXUfCh89gzm4KZlkjmBHRpIbMn8dhfA",[290,294,297,302,305,308],{"title":280,"path":291,"acronym":6,"category":267,"difficulty":292,"description":293},"\u002Fterms\u002Fa\u002Fasymmetric-encryption","intermediate","Asymmetric encryption uses two different keys — one to lock (public key), one to unlock (private key).",{"title":276,"path":295,"acronym":6,"category":267,"difficulty":269,"description":296},"\u002Fterms\u002Fd\u002Fdecryption","Decryption is using the secret decoder ring to turn scrambled gibberish back into a readable message.",{"title":278,"path":298,"acronym":299,"category":300,"difficulty":269,"description":301},"\u002Fterms\u002Fh\u002Fhttps","HyperText Transfer Protocol Secure","networking","HTTPS is HTTP but with a bodyguard. All the data flying between your browser and the website is scrambled so nobody can spy on it.",{"title":282,"path":303,"acronym":6,"category":267,"difficulty":292,"description":304},"\u002Fterms\u002Fp\u002Fprivate-key","A private key is the secret key that only YOU keep. It can decrypt messages encrypted with your public key, or sign messages to prove they came from you.",{"title":281,"path":306,"acronym":6,"category":267,"difficulty":292,"description":307},"\u002Fterms\u002Fp\u002Fpublic-key","A public key is like your open mailbox — anyone can drop a message in it (encrypt data with it), but only you have the key to open the box and read it (you...",{"title":279,"path":309,"acronym":6,"category":267,"difficulty":292,"description":310},"\u002Fterms\u002Fs\u002Fsymmetric-encryption","Symmetric encryption uses the same key to lock and unlock data. Like a house key — whoever has a copy can both lock and unlock the door.",1776518277001]