11.07.2015 Views

Cryptography - Sage

Cryptography - Sage

Cryptography - Sage

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

APPENDIXBSAGE CryptosystemsString monoidsThe main classes of string monoids are classical alphabetic string monoids, binary, andhexadecimal string monoids.sage: S = AlphabeticStrings()sage: SFree alphabetic string monoid on A-Zsage: H = HexadecimalStrings()sage: HFree hexadecimal string monoidsage: B = BinaryStrings()sage: BFree binary string monoidElements of these strings can be created either by accessing the generators:sage: S.gens()(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)sage: B.gens()(0, 1)sage: H.gens()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f)For example97

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

Saved successfully!

Ooh no, something went wrong!