[{"data":1,"prerenderedAt":189},["ShallowReactive",2],{"term-p\u002Fpublic-key":3,"related-p\u002Fpublic-key":176},{"id":4,"title":5,"acronym":6,"body":7,"category":159,"description":160,"difficulty":161,"extension":162,"letter":16,"meta":163,"navigation":96,"path":164,"related":165,"seo":170,"sitemap":171,"stem":174,"subcategory":6,"__hash__":175},"terms\u002Fterms\u002Fp\u002Fpublic-key.md","Public Key",null,{"type":8,"value":9,"toc":153},"minimark",[10,15,19,23,26,30,142,146,149],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"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 (your private key). You can share your public key with literally everyone; it's designed to be public.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"In asymmetric cryptography, the public key is the non-secret half of a key pair. It's used to encrypt data (that only the private key can decrypt) or to verify digital signatures (created by the private key). RSA and ECC are common public-key algorithms.",[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-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Generate RSA key pair\nopenssl genrsa -out private.pem 2048\nopenssl rsa -in private.pem -pubout -out public.pem\n\n# Encrypt with public key\nopenssl rsautl -encrypt -pubin -inkey public.pem \\\n  -in message.txt -out message.enc\n","bash","",[38,39,40,49,70,91,98,104,128],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","# Generate RSA key pair\n",[41,50,52,56,60,63,66],{"class":43,"line":51},2,[41,53,55],{"class":54},"sBMFI","openssl",[41,57,59],{"class":58},"sfazB"," genrsa",[41,61,62],{"class":58}," -out",[41,64,65],{"class":58}," private.pem",[41,67,69],{"class":68},"sbssI"," 2048\n",[41,71,73,75,78,81,83,86,88],{"class":43,"line":72},3,[41,74,55],{"class":54},[41,76,77],{"class":58}," rsa",[41,79,80],{"class":58}," -in",[41,82,65],{"class":58},[41,84,85],{"class":58}," -pubout",[41,87,62],{"class":58},[41,89,90],{"class":58}," public.pem\n",[41,92,94],{"class":43,"line":93},4,[41,95,97],{"emptyLinePlaceholder":96},true,"\n",[41,99,101],{"class":43,"line":100},5,[41,102,103],{"class":47},"# Encrypt with public key\n",[41,105,107,109,112,115,118,121,124],{"class":43,"line":106},6,[41,108,55],{"class":54},[41,110,111],{"class":58}," rsautl",[41,113,114],{"class":58}," -encrypt",[41,116,117],{"class":58}," -pubin",[41,119,120],{"class":58}," -inkey",[41,122,123],{"class":58}," public.pem",[41,125,127],{"class":126},"sTEyZ"," \\\n",[41,129,131,134,137,139],{"class":43,"line":130},7,[41,132,133],{"class":58},"  -in",[41,135,136],{"class":58}," message.txt",[41,138,62],{"class":58},[41,140,141],{"class":58}," message.enc\n",[11,143,145],{"id":144},"when-youll-hear-this","When You'll Hear This",[16,147,148],{},"\"Share your public key with the CI system for deployment.\" \u002F \"The public key is in your ~\u002F.ssh\u002Fid_rsa.pub file.\"",[150,151,152],"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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}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":154},[155,156,157,158],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":144,"depth":51,"text":145},"security","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...","intermediate","md",{},"\u002Fterms\u002Fp\u002Fpublic-key",[166,167,168,169],"Private Key","Asymmetric Encryption","Certificate","TLS",{"title":5,"description":160},{"changefreq":172,"priority":173},"weekly",0.7,"terms\u002Fp\u002Fpublic-key","o0ou8Mxyzj_3TtF4itqY6AeGB8MROK_eaCLlbPI33rc",[177,180,183,186],{"title":167,"path":178,"acronym":6,"category":159,"difficulty":161,"description":179},"\u002Fterms\u002Fa\u002Fasymmetric-encryption","Asymmetric encryption uses two different keys — one to lock (public key), one to unlock (private key).",{"title":168,"path":181,"acronym":6,"category":159,"difficulty":161,"description":182},"\u002Fterms\u002Fc\u002Fcertificate","A certificate is a digital ID card for a website, signed by a trusted authority.",{"title":166,"path":184,"acronym":6,"category":159,"difficulty":161,"description":185},"\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":169,"path":187,"acronym":169,"category":159,"difficulty":161,"description":188},"\u002Fterms\u002Ft\u002Ftls","TLS (Transport Layer Security) is the updated, actually-secure version of SSL. It's the technology that puts the padlock in your browser's address bar.",1776518304508]