Page actions
instrument implementation / implementation-contract
RSA Toy Cipher (Educational) implementation
A source-bound implementation contract for RSA Toy Cipher (Educational); deployment and executable qualification remain separate.
Binding contract
This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.
- Record owner
- Guth Instruments
- Lifecycle
- verified-clean
- Evidence ID
- t4-100
- Effect
- Computation or source lookup only
Input and validation requirements
Invalid exponents can produce an undefined private exponent, so the instrument must reject e values with gcd(e,φ(n))≠1. Inputs at or beyond the canonical message boundary can also silently lose information: message 15 encrypts and decrypts to 0 modulo 15. Negative-message handling is convention-dependent and can expose a mismatch between residue output 14 and signed plaintext −1.
Required corrections
No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.
Inspectable interface fixture
The sample below is evidence for interface and validation tests, not a production implementation.
{
"inputs": {
"p": 5,
"q": 11,
"e": 3,
"message": 7
},
"expected_outputs": {
"n": 55,
"phi": 40,
"d": 27,
"ciphertext": 13,
"decrypted_plaintext": 7
},
"working": "n=p·q=5·11=55. φ(n)=(5-1)(11-1)=4·10=40. gcd(3,40)=1. Find d: 3·27=81=2·40+1, so d=27. Encryption: c=7^3 mod 55. 7^2=49, 7^3=49·7=343=6·55+13, so c=13. Decryption: 13^2=169 mod55=4; 13^4=4^2=16; 13^8=16^2=256 mod55=36; 13^16=36^2=1296 mod55=31. Since 27=16+8+2+1, 13^27 mod55=((31·36 mod55)·4 mod55)·13 mod55=(16·4 mod55)·13 mod55=9·13 mod55=117 mod55=7."
}Other records
Sources and evidence
These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.
VERIFIED_LEDGER.jsonevidence-tranche4/tranche4-results.json