Preparation

Input and test Seed, it is recommended to use at least 50 characters. the seed phrase * Suffix *

Be extremely careful! The slightest mistake will definitely result in loss of access to your data.

The seed suffix is ​​necessary to be able to derive multiple different keys and passwords from a single seed. The suffix is ​​not a secret. Can be stored in Notepad Text file and used to identify different keys. It is convenient to use the date of birth to obtain the personale encryption key and digital signature. You can use your email address as a suffix for your mailbox password. Similarly, any password for any website can be obtained using pattern <UserName>@<domain>. The slightest changes in the suffix guarantee a perfect change of derived keys or passwords.

Password

Create ordinary Password for email accounts, computers, etc.
Use a unique suffix for each device or web service you use!

The following forms do not require this password.

RSA modulo

A unique modulus is used in both encryption and signing operations. The modulus is equal to the product of two large prime numbers.
The seed and suffix are hashed, and that value is starting point for finding the prime number.

RSA exponents

The exponent is the computational key. Both exponents are mutually inverse numbers at modulo. The public exponent can be assigned arbitrarily. Calculating the secret exponent is only possible with knowledge of the prime factorization of the modulus.

-- Open (public) exponent is a part of the public key for RSA-scheme. The usual value is 6553710=1000116=100000000000000012.
-- Calculate the secret (private) exponent

Public and private keys RSA

Public Key ( Open Exponent, Module )
Private Key ( Secret Exponent, Module )
End of preparation.

Write the letter

Signing

Encrypt

Block cipher

Unique encryption keys
-- Random [ 0, 340282366920938463463374607431768211455 ].
-- Random [ 0, 340282366920938463463374607431768211455 ].

Encryption with the recipient's key

Recipient's RSA key -- Public (Open) exponent of the recipient.
-- Inserts the encryption result at the beginning of the encrypted message.

Signing the ciphertext

Number conversion

Converting from decimal to Base58 reduces message size by 40%. In some text messaging systems, extremely long words and numbers can cause inconvenience and errors. Therefore, long numbers are converted into tuples.

-- Transform and split long words.

Excellent!
The latest result can be sent via any text messaging system.


Read the letter

-- Conversion to decimal system.

Signature Verification

Extracting the public key and verifying the sender's digital signature.

-- Open exponent.

Decrypting

-- Public (Open) exponent of the message sender.
 

Recoding ciphertext


Short message

For a short message, the block cipher step can be skipped. Since encryption and signing of a document are performed using the same formulas, the bit size of the result should be controlled. The operation of raising to a power by a modulus less than the base of the power will result in an error.

The message must be accompanied by nonsense. Encryption without nonsense will result in leakage if the message is repeated.

Summarize:
-- the message with nonsense must be smaller than the modulus
-- encryption and signing must begin with the smallest modulus.

Sender Keys

Recipient Keys

Text Encoding



-- Based on the numerical ratio of cryptographic modules, the sequence of signing and encryption must be determined.





Subskribita.net 🄯 -- Easy entry into cryptography