Johnny2

RS-eKey-Generator_Project

Nov 6th, 2021
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.56 KB | None | 0 0
  1. RS-eKey-Generator_Project
  2. --
  3. Designed to help anyone create and share a AES256bit encrypted .7z compressed archive file with a unknown or known distant peer as a end-end encrypted file. Linux,Mac Osx users are able to directly run the RS-eKey-Generator_01.sh script to create the encryption key and zero knowledge filename. Known and unknown distant peers who are running Linux or Mac Osx also can run RS-eKey-Generator_01.sh against the .7z downloaded archive and generator the correct decryption key. Windows users and possible downloading remote Windows peers however are not able to directly run the RS-eKey-Generator_01.sh bash script, they would need a copy of the .7z-key.txt file which optionally can be included with the .rscollection files or you would pass that decryption password securely to that remote Windows peer via other means.
  4. ---
  5. Dependences
  6. Local and Remote Users must have the popular .7z (aka 7-zip) compression application installed on their local system. 7z is a advanced compression application which has a secure AES256bit encryption ability plus the option to encrypt the internal added filename headers masking those from anyone attempting to list the archive files without supplying the correct password to decrypt it.
  7. ---
  8. How to use RS-eKey-Generator_01.sh
  9. Syntax
  10. $ ./RS-eKey-Generator_01.sh filename
  11.  
  12. Filename is either the single file you intend to compress and archive or simply one of the specific files you intend to .7z compress and archive. Upon running the eKey-Generator against the file you'll be shown the specific filename and specific eKey password to supply to the .7z archive fields. You then run your .7z archive application and add the files, add the eKey filename, add the eKey password and chose the option to encrypt the filenames, file headers.
  13.  
  14. Then run the RS-eKey-Generator_01.sh on the resulting archive compressed .7z file.
  15.  
  16. example
  17.  
  18. $ ./RS-eKey-Generator_01.sh da05d5b71c9d33af319b0234d94g2d18.7z
  19.  
  20. sample output
  21.  
  22. *Valid 7z eKey encrypted file*
  23. Filename da05d5b71c9d33af319b0234d94g2d18.7z 45976 bytes
  24. Quality Control Value ZWIyNjgyOTIyN2VkMzQwZmNjZmQ0MjM0
  25. ---
  26. Use this eKey Decryption password GZnaD@aA7dnZWM%jNWdn*XzNhZ!KmAuM
  27. to unlock the encrypted archive and extract the files
  28.  
  29. Want to optionally produce da05d5b71c9d33af319b0234d94g2d18.7z-key.txt
  30. and da05d5b71c9d33af319b0234d94g2d18.7z.rscollection files now [y/n] ?y
  31.  
  32. You can rename the da05d5b71c9d33af319b0234d94g2d18.7z.rscollection file
  33. to the original movie,music or single file if you wish to Retroshare it
  34.  
  35. You can keep the da05d5b71c9d33af319b0234d94g2d18.7z-key.txt for your records, supply it to your peers or delete it as you wish.
  36. --
  37. eKey file saved as da05d5b71c9d33af319b0234d94g2d18.7z-key.txt
  38. Created da05d5b71c9d33af319b0234d94g2d18.7z.rscollection file
  39. ----------------------------------------------------------------------
  40.  
  41. As you can see by the eKey Generated .7z archive output, you are shown the decryption key which you or a distant peer can use. Any remote known/unknown distant peer running the eKey Generator_01.sh utility against the same archive is shown the exact same output, decryption key etc. There is a option to include the .7z-key.txt file with the .rscollection files.
  42.  
  43. Retroshare downloaders then are able to obtain the decryption key via that .txt file themselves without the ability to run the RS-eKey-Generator_01.sh on their local system such as a Windows user.
  44.  
  45. sample .7z-key.txt output
  46.  
  47. $ cat da05d5b71c9d33af319b0234d94g2d18.7z-key.txt
  48.  
  49. << RS-eKey-Generator_01.sh encrypted 7z archive file >>
  50.  
  51. eKey 7z encrypted file da05d5b71c9d33af319b0234d94g2d18.7z 45976 bytes
  52. Decrypt .7z archive using this eKey GZnaD@aA7dnZWM%jNWdn*XzNhZ!KmAuM
  53.  
  54. Sha1 76569ae273892e783ce7570876430089afce14c0
  55. Sha256 eb26829227ed340fccfd423409533ab6544b50f124b44ed6cc595cce9e33d97c
  56. Quality Control Value ZWIyNjgyOTIyN2VkMzQwZmNjZmQ0MjM0
  57.  
  58. Generated by RS-eKey-Generator_01.sh
  59.  
  60. ---
  61.  
  62. For any peer to peer or file sharing network, you can then share the encrypted da05d5b71c9d33af319b0234d94g2d18.7z compressed file with fewer concerns of the filename or contents being inspected or intercepted mid-stream. For unknown distant peers downloading the AES256bit encrypted .7z compressed file, the content police Maapa etc. would appear to need showing that specific remote peer knew the decryption password and used it to decrypt that file locally on their system.
  63.  
  64. The eKey Generated filenames are zero knowledge filenames AND Dynamic, not static. A eKey-Generator user can run the eKey Generator against one of the intended files to .7z archive then run the eKey Generator against the same intended file 5 minutes later and the zero knowledge Dynamic filename will be different. What remains the same in both runs on the same file is the decryption password.
  65.  
  66. For the Retroshare network, users have the option of telling the RS-eKey-Generator to create a .rscollection file. This allows users to widely share a video content such as Whatever-Movie.mkv.rscollection. The eKey-Generator then optionally generates a .7z.rscollection file that is linked directly to the encrypted .7z archive file. Retroshare users could rename the tiny .rscollection file back to the original-content-filename.
  67.  
  68. You can rename the da05d5b71c9d33af319b0234d94g2d18.7z.rscollection file
  69. to the original movie,music or single file if you wish to Retroshare it
  70.  
  71. Example from da05d5b71c9d33af319b0234d94g2d18.7z.rscollection
  72.  
  73. to Star-Trek-VI-The-Undiscovered-Country.mkv.rscollection
  74.  
  75. The da05d5b71c9d33af319b0234d94g2d18.7z encrypted archive is kept,stored on a remote protected server or local system and shared anonymously. The openly, widely shared tiny Star-Trek-VI-The-Undiscovered-Country.mkv.rscollection file itself simply calls forth that hidden, encrypted archive file.
  76.  
  77. Example .rscollection file with the option to include the .7z-key.txt file and renamed by the peer to the original source file.
  78.  
  79. Star-Trek-VI-The-Undiscovered-Country.mkv.rscollection
  80.  
  81. <!DOCTYPE RsCollection>
  82. <RsCollection>
  83. <Directory name="da05d5b71c9d33af319b0234d94g2d18">
  84. <File size="45976" sha1="76569ae273892e783ce7570876430089afce14c0" name="da05d5b71c9d33af319b0234d94g2d18.7z"/>
  85. <File size="422" sha1="6eeaee55338554c703dfd9b9d22c0e620cf6ae12" name="da05d5b71c9d33af319b0234d94g2d18.7z-key.txt"/>
  86. <File size="8152" sha1="43d548bf29eb2e8d8fa2f8d7a93694d614f318ae" name="RS-eKey-Generator_01.sh"/>
  87. </Directory>
  88. </RsCollection>
  89.  
  90. ---
  91. History of End-End Encrypted File Sharing
  92.  
  93. For several years P2P Networks and Usenet have used a rather crude scheme of using the sha1 hash sum as both the filename as well as the encryption/decryption password. As a result, the content police and Maafa goons have generated huge databases of sha1 hash sum filenames linked to various copyright contented video, music, games, application software etc. Popular widely shared Block Buster video's, games are certain to be sha1 hash sum cataloged and actively tracked. The use of the scheme of the filename the same as the decryption key doesn't help in my opinion to provide plausible deniability for the distant peer. The actual real filename is easily tracked, decrypted and inspected.
  94.  
  95. End-End Encryption is two fold, that of a transport encrypted data stream such as https not interrupted nor broken between A-Z. In todays PoliceState era across the West, relays which are many between A and Z appear to have the ability to snoop on the session encryption keys. If so then they could pretend to conduct End-End transport encryption while decrypting the data stream to plain text to record and then encrypting it back with the captured session encryption key to the remote target.
  96.  
  97. End-End File Encryption begins with a securely encrypted file or files and that is decrypted locally on the remote target peers system itself. The puzzle or trick is in supplying the decryption password to a entirely unknown/anonymous distant user.
  98.  
  99. eKey Generator provides the same strong password automatically to both the source peer and any remote/unknown downloading peer that receives the encrypted .7z archive provided they can run the RS-eKey-Generator_01.sh utility on their end or obtains a copy of the .7z-key.txt file. The eKey Generator produces a dynamic zero knowledge filename scuttling content police goons tracking by changing the filenames even when run on the same file.
  100.  
  101. The eKey Generator produces strong 32 character full 256bit password keys consisting of lower/Upper alphabetical,numeric and special characters.
  102.  
  103. Password Generated and used Examples
  104. GZnaD@aA7dnZWM%jNWdn*XzNhZ!KmAuM
  105. DkwMD$xZWRh~E4YGJ@NzlhO^Zw9AmyuB
  106. 2diNz@aA7NkM19%jNmc1*MmFfN!ZzSsA
  107.  
  108. The eKey Generator also has the new Quality Control coding which checks and tests the archived files integrity including its filename, file-size, sha1 hash sums and sha256 hash sums which are taken into a single string along with a encoded secret phrase to derive a unique Quality Control value which is included with each .7z-key.txt file. Both source peers and remote users can check the Quality Control Value if they wish to check to see if any changes/tampering whatsoever took place from the time the file was created to the time they received that file.
  109.  
  110. Near Future Direction
  111. RS-eCrypt.sh
  112.  
  113. A RS-eCrypt application is the next directed application. While keeping much of the overall directed coding of the RS-eKey-Generator_01.sh utility, RS-eCrypt moves closer to a more automated application to process a remotely encrypted RS-eCrypt file using the AES256bit symmetric cipher without the need for the remote/unknown peer to even know the strong 32 character unique decryption password.
  114.  
  115. RS-eCrypt would encrypt any user directed file outputting the encrypted file as a zero knowledge filename with a .zip extension. Of course the file is not a actual .zip compressed archive, that is simply used to provide stealth to the highly encrypted file. Tests would simply indicate a broken .zip archive file. Processing the .zip eCrypted file would automatically decrypt the file to whatever filename the end-user wanted it to be and it would be functionally identical to the unencrypted file originally used.
  116.  
  117. RS-eCrypt could be extended to a RS-eCrypt-Bulk.sh utility aimed at encrypting entire stored collections of Movies, Music, Games or Apps based on their extensions (.mp3, mkv, .deb, .exe, etc.) or entire folders or filenames. As with the RS-eCrypt.sh utility, the original non-encrypted file would be left intact. As with the RS-eKey-Generator, RS-eCrypt would optionally provide individual -key.txt files. Unique to a possible RS-eCrypt-Bulk.sh utility output would be a source peers ability to receive a file list containing the individual filenames and their unique decryption passwords generated for each bulk run pass.
  118.  
  119. Future Direction
  120.  
  121. Existing high level character-string handling with the bash script utility coding is likely going to be broken with a port over to a multi-platform low level language such as C. As such, the overall approach would be similar however they would likely not be directly compatible.
  122. ---
  123. References:
  124.  
  125. 7-Zip Home http://www.7-zip.org/
  126. 7-Zip Downloads http://www.7-zip.org/download.html
  127. Frequently Asked Questions 7-Zip http://www.7-zip.org/faq.html
  128. Command Line Version Users Guide https://sevenzip.osdn.jp/chm/cmdline/
  129. Command Line Version Users Guide http://7zip.bugaco.com/7zip/MANUAL/index.htm
  130. Homomorphic encryption https://en.wikipedia.org/wiki/Homomorphic_encryption
  131. Homomorphic Encryption Scheme - Applied Cryptography https://crypto.stanford.edu/craig/craig-thesis.pdf
  132. Hacker Lexicon: What is Homomorphic Encryption? http://www.wired.com/2014/11/hacker-lexicon-homomorphic-encryption/
  133.  
Advertisement
Add Comment
Please, Sign In to add comment