Skip to content

Randomized Approach Symmetric Key Stream Cipher used for Encryption-Decryption.

License

Notifications You must be signed in to change notification settings

Sazzad-Saju/BSK-Stream-Cipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bornomala-Symmetric-Key (BSK) Stream Cipher

forthebadgeforthebadge


Key GenerationEncryptionDecryptionAdvantages


Key Generation

Requirement:

  • A strong key is required, a minimum of 8 characters
  • Key must have to contain uppercase, lowercase, and digits.
  • No Space is allowed in a key

Generated-Key is similar with hashing
Unless fixed length hashing, the generated key is of any size depanding on inputs message [variable-length hashing]

Key Generation Process
Roughly divided into three sections:

  • Key Enhancement
  • Key Substitution
  • Random-indexing shuffle

Example:

Let's assume:

Initial Key (K) = HstU@5200
Message (M) = Hajee DanesH 26/10/19

Then:

Enhanced Key = HstU@5200HstU@5200Hst
Substitute Key = 6u,b.X(V'(g}T JyHxyYo
R-I Shuffle = ,(V6T.xu 'boyXH}ygYJ(

Final Key:

,(V6T.xu 'boyXH}ygYJ(

Encryption

With generated key and plaintext, the encryption process started. It can divided into two parts:

  • Base-Format Encryption
  • Padding

Padding is done in 5 steps:

  • Format length of encrypted string (C)
  • Format length of generated key (K)
  • Key-triggered-reversible-shuffle
  • Hexadecimal-conversion
  • Randomizing with CC and EA characters

Example:

We got:

Generated Key (K) (21) = ,(V6T.xu 'boyXH}ygYJ(
Message (M) (21) = Hajee DanesH 26/10/19

Then:

Base-Format Encryption (C) (21) = t+b=[N^x0.wY;, NL9*{a

Padding:

Format length of encrypted string (C) (24) = t+b=[N^x0.wY;, NL9*{a~~~
Format length of generated key (K) (24) = ,(V6T.xu 'boyXH}ygYJ(,(V
Key-triggered-reversible shuffle (C) = ~,t~~L=a0Y{N[+w.;x9b^*N
Hexadecimal-conversion = 7E2C747E7E4C3D6130597B4E5B2B772E3B7839625E2A4E20
Randomizing with CC and EA = 082C7498034C3D6130597B4E5B2B772E3B7839625E2A4E20

Final Encrypted Result:

082C7498034C3D6130597B4E5B2B772E3B7839625E2A4E20

Decryption

Decryption process divides in two parts:

  • Normalizing of Encrypted String (C)
  • Decryption in Base-Format (M)

Key Generation is always the first step in both Encryption and Decryption.

Normalizing of encrypted string is done with 5 steps:

  • Character seperation of CC and EA
  • Base conversion (C)
  • Format generated key (K)
  • Key-Triggered-reversible shuffle
  • Fix Length of encrypted string

Example:

We got:

Generated Key (K) (21) = ,(V6T.xu 'boyXH}ygYJ(
Ciphertext (C) (24) = 082C7498034C3D6130597B4E5B2B772E3B7839625E2A4E20

Decryption:

Character seperation of CC and EA = 7E2C747E7E4C3D6130597B4E5B2B772E3B7839625E2A4E20
Base conversion (C) = ~,t~~L=a0Y{N[+w.;x9b^*N
Format generated key (K) = ,(V6T.xu 'boyXH}ygYJ(,(V
Key-triggered-reversible shuffle (C) (24) = t+b=[N^x0.wY;, NL9*{a~~~
Fix length (C) (21) = t+b=[N^x0.wY;, NL9*{a
Decryption in base-format (M) = Hajee DanesH 26/10/19

Final Decrypted Result:

Hajee DanesH 26/10/19

Advantages

  • Key used in this process meets standard password requirements
  • Slightest change of the key results a completely different encrypted string
  • Encrypted string is in hexadecimal format ranges from ASCII 0-255
  • Encrypted string is a multiplication of 16 in hex.
  • RSA encryption is a way of key-distribution of BSK cipher. Thus removes the drawbacks of symmetric-key cipher.

©️Sazzad-Saju

END OF DOCUMENT 😄

About

Randomized Approach Symmetric Key Stream Cipher used for Encryption-Decryption.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages