Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OUROBOROS : WATERFALL ( Cascading Key Encryption )
- ===================================================================================================
- INTRODUCTION:
- Keys are usually wrapped with the help of other keys with the purpose of secure transmission or for
- storage in mind. A wrapping key may not always be ideal especially in the field of keys at rest.
- If a resting key has to be wrapped for protection, the wrapping key must also be protected and this
- will result in a chain of keys that need to be protected by other keys. The ideal way of handling
- key protection is to have the key protect itself somehow. A person remembering his master key is one
- such method of protecting the key as the master key would usually be in the form of a master password
- which a security conscious person would remember and hopefully not fall into security pitfalls.
- OUROBOROS : WATERFALL is a somewhat abstract idea of an algorithm for a key to protect itself by the
- virtue of the key "consuming itself" to generate it's own encryption that will produce it's own
- ciphertext.
- OUROBOROS is the name of a concept of this algorithm and also a family of such algorithms that
- "consumes itself" like the Ouroboros serpent of legends from many different ancient civilisations. The
- Ouroboros world serpent has the ability to consume itself and yet renew itself (thus in a way self-
- creating and self-preserving) similar to the workings of this family of self-encrypting key encryption
- that uses itself as the material to secure itself. WATERFALL is the name assigned to this very
- particular algorithm since the style it uses looks similar to a cascading waterfall which would be
- explained in much details later on in this document.
- THREAT-MODEL:
- The goal of WATERFALL is to allow keys the ability to protect itself from attackers whom have gained a
- copy of it.
- SAMPLE SCENARIO:
- The ideal scenario for the use of WATERFALL to protect keys is a user credential database
- that contains multiple passwords of each individual. Whenever a credentials database gets snatched from
- a database server, their passwords would quickly be decoded and the secrecy of passwords stored in the
- credentials database would be leaked. One of the reasons why hashed passwords are easily cracked is due
- to the fact that weak hashes with some salt would be carelessly used to create password hashes (usually
- system defaults). One way to circumvent such threats is to use a Hardware Security Module (HSM) to
- escrow keys on the behalf of users but that would mean the administrators of the HSM would have to be
- trusted and a HSM is not some cheap computing tool everyone can afford.
- MECHANICS:
- WATERFALL algorithm uses the keys to "consume" itself by using the key as the key material to encrypt
- itself. The original key is divided into equal sized blocks of n length with the block size at least
- bigger than 2 bits. The algorithm sequence would proceed from the first block to the last block
- sequentially from the Most Significant Block (left side) to the Least Significant Block (right side).
- The targeted block for encryption would be encrypted with the remaining blocks. The arrangement for the
- remaining blocks as key material to encrypt the targeted block would be arranged from the Most
- Significant Block to the Least Significant Block in order with the exception of the target itself as
- the algorithm is trying to encrypt the targeted block. Every iteration would move the targeted block
- from the Most Significant Block to the Least Significant Block and every iteration's output called a
- 'Ciphered Key Text Block' would be merged according to their original target's significance position into a
- complete 'Ciphered Key Text'. The encryption algorithm is not fixed. One may use any encryption algorithm.
- Below is an ASCII diagram representation on the concept.
- 1.) ________________________________________________________________________________________
- | |
- | Original Key |
- |_______________________________________________________________________________________|
- |
- |
- \|/
- v
- 2.) _________________________________________________________________________________________
- | | | | | | | |
- | Block #1 | Block #2 | Block #3 | Block #4 | Block #5 | Block #6 | Block #7 |
- |___________|___________|___________|____________|_____________|____________|____________|
- Blocks are broken into 7 equal sized blocks.
- |
- |
- \|/
- v
- 3.) ____________ _____________________________________________________________________________
- | | | | | | | | |
- | Block #1 | | Block #2 | Block #3 | Block #4 | Block #5 | Block #6 | Block #7 |
- |___________| |___________|___________|____________|_____________|____________|____________|
- Target for <------------------Encryption key for iteration 1 -------------------------->
- iteration #1.
- For iteration 1, the first block is taken as the target for encryption with the rest (block 2-7)
- that is used as the key for iteration 1. The 'Ciphered Key Text Block' for the first iteration,
- CKTB 1, would be generated from the encryption of the first iteration and set aside.
- |
- |
- \|/
- v
- 4.) ____________ _____________________________________________________________________________
- | | | | | | | | |
- | Block #2 | | Block #1 | Block #3 | Block #4 | Block #5 | Block #6 | Block #7 |
- |___________| |___________|___________|____________|_____________|____________|____________|
- Target for <------------------Encryption key for iteration 2 -------------------------->
- iteration #2.
- For iteration 2, the second block is taken as the target for encryption with the rest (block 1,
- 3-7) that is used as the key for iteration 2. The 'Ciphered Key Text Block' for the second
- iteration,CKTB 2, would be generated from the encryption of the second iteration and set aside.
- |
- | <Fast forward to last iteration>
- \|/
- v
- 4.) ____________ _____________________________________________________________________________
- | | | | | | | | |
- | Block #7 | | Block #1 | Block #2 | Block #3 | Block #4 | Block #5 | Block #6 |
- |___________| |___________|___________|____________|_____________|____________|____________|
- Target for <------------------Encryption key for iteration 7 -------------------------->
- iteration #7.
- For iteration 7, the seventh block is taken as the target for encryption with the rest (block 2-7)
- that is used as the key for iteration 7. The 'Ciphered Key Text Block' for the seventh
- iteration,CKTB 7, would be generated from the encryption of the seventh iteration and set aside.
- |
- |
- \|/
- v
- 5.) _________________________________________________________________________________________
- | | | | | | | |
- | CKTB #1 | CKTB #2 | CKTB #3 | CKTB #4 | CKTB #5 | CKTB #6 | CKTB #7 |
- |___________|___________|___________|____________|_____________|____________|____________|
- <---------------------------Completed Ciphered Key Text---------------------------------->
- The CKTBs are merged together according to their original unciphered text's significant positions.
- |
- |
- \|/
- v
- 6.) To decrypt, the original password / key is presented, split into equal pieces and decrypted in the
- reverse process. The encryption algorithm used for every iteration is up to the choice of the user.
- The generated Ciphered Key Text would be significantly larger than it's original key it protects.
- NOTES:
- The use of WATERFALL to protect passwords and keys that only authorized parties have conscious access to
- is required. Attempting to use WATERFALL as a key wrapping device to send keys across a channel would
- require the sender and receiver to know the original password / key. Leaking any part of the password /
- key, as with other security protocol, would reduce the security of the algorithm.
- INTELLECTUAL PROPERTY:
- This algorithm described here is free to the public to implement, distribute and modify at their own will
- without legal restrains of any sort in regards to patents and intellectual property, however, the only
- contract is to not claim the original design falsefully and / or use it to restrict others from freely
- implementing, modifying or distributing this algorithm.
Advertisement
Add Comment
Please, Sign In to add comment