11.07.2015 Views

Cryptography - Sage

Cryptography - Sage

Cryptography - Sage

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ut strings in A ∗ map injectively into ASCII ∗ :π ◦ ι ◦ π(THECATINTHEHAT) = π(THECATINTHEHAT) = THECATINTHEHAT.The existence of the empty string is crucial to the definition of the map from ASCII toA ∗ , which shows that the concept of a monoid, rather than a semigroup, is the correct onefor study of strings and the transformations which operate on them (under the guise ofencodings or ciphers).In what follows the domain and codomain of ciphers will be string monoids or a subsetA n of a string monoid A ∗ (for block ciphers). The latter ciphers may be extended naturally(in what is called ECB mode in Chapter 5) to the submonoid (A n ) ∗ of A ∗ on the largeralphabet A n . The concept of a string monoid gives a useful framework for understandingciphers. A first question to ask for a cipher whose domain is a string monoid is whetherthat cipher is a monoid homomorphism.1.3 CryptosystemsThe notion of a cryptosystem or encryption scheme E captures the idea of a distinguishedset of ciphers indexed over some keyspace K:E = {E K : M → C : K ∈ K}.To every enciphering key K there exists a deciphering key K ′ with deciphering map D K ′ :C → M. Now E should be thought of as a pair of algorithms E and D which take inputs(K, M) and (K ′ , C), respectively.We formalise this definition as follows. First, we require a collection of sets:A = plaintext alphabetM = plaintext spaceK = (plaintext) keyspaceA ′ = ciphertext alphabetC = ciphertext spaceK ′ = (ciphertext) keyspacewhere M is a subset of A ∗ , C is a subset of A ′∗ , and K and K ′ are finite sets. A cryptosystemor encryption scheme is a pair (E, D) of mapsE : K × M −→ CD : K ′ × C −→ Msuch that for each K in K there exists a K ′ in K ′ such thatfor all M in M.D(K ′ , E(K, M)) = M1.3. Cryptosystems 7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!