"use strict";(self.webpackChunkcanine_docs=self.webpackChunkcanine_docs||[]).push([[3298],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>h});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var a=n.createContext({}),l=function(e){var t=n.useContext(a),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(a.Provider,{value:t},e.children)},y="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,a=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),y=l(r),u=o,h=y["".concat(a,".").concat(u)]||y[u]||d[u]||i;return r?n.createElement(h,c(c({ref:t},p),{},{components:r})):n.createElement(h,c({ref:t},p))}));function h(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,c=new Array(i);c[0]=u;var s={};for(var a in t)hasOwnProperty.call(t,a)&&(s[a]=t[a]);s.originalType=e,s[y]="string"==typeof e?e:o,c[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>c,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var n=r(7462),o=(r(7294),r(3905));const i={sidebar_position:2},c="Encryption in Jackal Protocol",s={unversionedId:"protocol/encryption",id:"protocol/encryption",title:"Encryption in Jackal Protocol",description:"The Jackal Protocol utilizes encryption techniques to ensure the privacy and security of user data. The two primary",source:"@site/docs/protocol/encryption.md",sourceDirName:"protocol",slug:"/protocol/encryption",permalink:"/docs/protocol/encryption",draft:!1,editUrl:"https://github.com/JackalLabs/canine-docs/blob/master/docs/protocol/encryption.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"JKL Token",permalink:"/docs/protocol/tokens"},next:{title:"Validators",permalink:"/docs/protocol/validators"}},a={},l=[{value:"File Encryption",id:"file-encryption",level:2},{value:"Integrated Encryption Scheme",id:"integrated-encryption-scheme",level:2},{value:"File Sharing and Access",id:"file-sharing-and-access",level:2}],p={toc:l},y="wrapper";function d(e){let{components:t,...i}=e;return(0,o.kt)(y,(0,n.Z)({},p,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"encryption-in-jackal-protocol"},"Encryption in Jackal Protocol"),(0,o.kt)("p",null,"The Jackal Protocol utilizes encryption techniques to ensure the privacy and security of user data. The two primary\nencryption models within the protocol are file encryption and file-entry encryption. File encryption secures the files\nthemselves, while file-entry encryption focuses on securing the file entries on the blockchain."),(0,o.kt)("h2",{id:"file-encryption"},"File Encryption"),(0,o.kt)("p",null,"File encryption is essential for protecting the data stored on storage providers within the Jackal Protocol. Before\ntransferring files to storage providers, the user's client encrypts the files using a randomly generated symmetric key.\nThe Advanced Encryption Standard (AES-256) is used for this encryption process, resulting in a securely encrypted file."),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"File Encryption Process",src:r(5542).Z,width:"482",height:"302"})),(0,o.kt)("p",null,"The symmetric key's secure storage is equally crucial, as exposing it would compromise the file's encryption. The Jackal\nChain's File Tree Module serves as a safe and immutable location for storing the encrypted symmetric key alongside the\nfile's location."),(0,o.kt)("h2",{id:"integrated-encryption-scheme"},"Integrated Encryption Scheme"),(0,o.kt)("p",null,"The protocol uses an Integrated Encryption Scheme based on AES and the Elliptic Curve cryptography, which generates\nBech32 addresses for secure key storage."),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Integrated Encryption Scheme",src:r(4998).Z,width:"467",height:"242"})),(0,o.kt)("p",null,"To securely store the symmetric key, the protocol encrypts it with the user's public key. This process ensures that only\nthe user with the corresponding private key can decrypt the symmetric key."),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Symmetric Key Decryption",src:r(6299).Z,width:"762",height:"322"})),(0,o.kt)("p",null,"When decrypting a file, the user's private key is used to decrypt the symmetric key. Once the symmetric key is\nretrieved, it can be used to decrypt the file stored on the storage provider, resulting in the original uploaded file."),(0,o.kt)("h2",{id:"file-sharing-and-access"},"File Sharing and Access"),(0,o.kt)("p",null,"To share files with other users, the protocol first decrypts the symmetric key from the chain, then retrieves the\nexternal user's public key from the chain, and encrypts the symmetric key with the external user's public key. By\nappending the newly encrypted symmetric key to the file entry, the external user gains access to the file."),(0,o.kt)("p",null,"By leveraging encryption techniques for both files and file entries, the Jackal Protocol ensures the privacy, security,\nand integrity of user data throughout the storage and sharing processes."))}d.isMDXComponent=!0},5542:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/enc1-a5bf8bd57de61c12dd33f5f71acf6d2b.png"},4998:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/enc2-301650ee7a3ebf09db7d546400ff51e1.png"},6299:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/enc3-cd67943d1c117087b30355af9d5994eb.png"}}]);