(40gs & 40G) Hill's Encryption System - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (40gs & 40G) Hill's Encryption System (/thread-10574.html) |
(40gs & 40G) Hill's Encryption System - Gerald H - 04-25-2018 10:08 AM The following four programmes implement Hill's Cypher system for the HP 40gs & 40G. HILLSET stores the parameters, encyphering & decyphering matrices & additional cypher vector in M9, M0 & M8. The programme asks for an encyphering modulus, for English perhaps 26, & size of cyphering matrices & vector, conveniently 4 to fit on the screen. ENCY encyphers the conformable matrix M1 & stores the result in M1. DECY decyphers the conformable matrix M1 & stores the result in M1. M1ADDV8 adds/subtracts the comformable vector M8 to the rows of M1. For info on Hill's system see: https://en.wikipedia.org/wiki/Hill_cypher HILLSET Code: INPUT R;"Hill Cryptosystem"; "Random";" Enter Max Value ► R";26: ENCY Code: MULTMOD(M1,M9)►M1: DECY Code: -1: M1ADDV8 Code: Ans►V: |