(HP 41) Encryption of messages
|
08-28-2021, 08:42 AM
(This post was last modified: 09-01-2021 02:51 AM by rawi.)
Post: #1
|
|||
|
|||
(HP 41) Encryption of messages
This program allows to encrypt and decrypt messages.
Application: At the beginning you are asked for the starting value of the random number generator: SEED? Take any number between 0 and 1. The same number has to be used for encryption and decryption. Then you are asked whether you want to encrypt or to decrypt ENC=1 DEC=2? Put in 1 for encryption, 2 for decryption. Then you are asked for a character. You can use any of the following 44 characters: [Space] * + , - . / : 0 to 9 A to Z. Only characters are used that can be easily accessed by the keyboard. After putting in the character and pressing R/S you are shown the encrypted (or decrypted) character and you can input the next character and press R/S Example: We want to encrypt and decrypt the following phrase: THE CALCULATOR FORUM XEQ alpha CRYP alpha -> SEED? We take Pi – 3: PI 3 – R/S -> ENC = 1 DEC = 2? We want to encrypt, therefore: 1 R/S -> CHAR? -> T R/S -> K (K is the encryption for T at that place). Next letter overwrites the encryption. -> H R/S -> N -> E R/S -> / -> (Space) R/S -> D … The whole phrase encrypted as follows: KN/DFC/03J1*.71T6T2R Note that the same character is transformed to different encrypted characters like the first A from Calculator to C and the second to 1. Note that as well the same character in the encrypted phrase can be different characters in the not encrypted phrase like the first “/” stands for E and the second for L. Furthermore space is coded as well so that length of words cannot be used to decipher. Decryption: XEQ alpha CRYP alpha -> SEED? To decrypt we have to take the same number: PI 3 – R/S -> ENC = 1 DEC = 2? We want to decrypt, therefore:2 R/S -> CHAR? We type K (the first letter of the encrypted phrase) R/S -> T (the first letter of the not encrypted phrase) -> N R/S -> E -> / R/S -> (space) … Note: If no character is shown this stands for space. Method: For every character a random number generator is used to encrypt it. So the meaning of a character is position sensitive. The random number generator is in lines 28-32. It has the form: r(n) = Frac(9821*r(n-1)+0.211327). It was taken from the HP Standard Programs Book for the HP 34C. Enjoy! Code:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)