ACE (advanced cryptographic engine) is the collection of units, implementing both a public key encryption scheme and a digital signature scheme. Corresponding names for these schemes — «ACE Encrypt» and «ACE Sign». Schemes are based on Cramer-Shoup public key encryption scheme and Cramer-Shoup signature scheme. Introduced variants of these schemes are intended to achieve a good balance between performance and security of the whole encryption system.
Authors All the algorithms, implemented in ACE are based on algorithms developed by Victor Shoup and Ronald Cramer. The full algorithms specification is written by Victor Shoup. Implementation of algorithms is done by Thomas Schweinberger and Mehdi Nassehi, its supporting and maintaining is done by Victor Shoup. Thomas Schweinberger participated in construction of ACE specification document and also wrote a user manual. Ronald Cramer currently stays in the university of Aarhus, Denmark. He worked on the project of ACE Encrypt while his staying in ETH in Zürich, Switzerland. Mehdi Nassehi and Thomas Schweinberger worked on ACE project in the IBM research lab in Zürich, Switzerland. Victor Shoup works in the IBM research lab in Zürich, Switzerland.
Security The encryption scheme in ACE can be proven secure under reasonable and natural intractability assumptions. These four assumptions are:
The Decisional Diffie-Hellman (DDH) assumption Strong RSA assumption SHA-1 second preimage collision resistance MARS sum/counter mode pseudo-randomness
Basic Terminology and Notation Here we introduce some notations, being used in this article.
Basic mathematical notation ℤ — The set of integers. F2[T] — The set of univariate polynomials with coefficients in the finite field F2 of cardinality 2. Aremn — integer r∈{0,…,n−1} such that A≡r(modn) for integer n>0 and A∈ℤ. Aremf — polynomial r∈F2[T] with deg(r)<deg(f) such that A≡r(modf) with A,f∈F2[T],f≠0.
Basic string notation A∗ — The set of all strings. An — The set of all strings with length n. For x∈A∗L(x) — length of string x. The string of length zero is denoted λA. For x,y∈A∗ x‖y — the result of x and y concatenation.
Bits, Bytes, Words b=def{0,1} — The set of bits. Let us take all sets of form b,bn1,(bn1)n2,.... For such a set A we define the "zero element":
We define B=defb8 as a set of bytes, and W=defb32 as a set of words. For x∈A∗ with A∈{b,B,W} and l>0 we define a padding operator:
Conversion operator Conversion operator Isrcdst:src→dst makes a conversion between elements Z,F2[T],b∗,B∗,W∗.
Encryption Scheme
Encryption Key Pair The encryption scheme employs two key types: ACE public key: (P,q,g1,g2,c,d,h1,h2,k1,k2). ACE private key: (w,x,y,z1,z2). For a given size parameter m, such that 1024≤m≤16384, key components are defined as: q — a 256-bit prime number. P — a m-bit prime number, such that P≡1(modq). g1,g2,c,d,h1,h2 — elements {1,…,P−1} (whose multiplicative order modulo P divides q). w,x,y,z1,z2 — elements {0,…,q−1}. k1,k2 — elements B∗ with L(k1)=20l′+64 and L(k2)=32⌈l/16⌉+40, where l=⌈m/8⌉ and l′=Lb(⌈(2⌈l/4⌉+4)/16⌉).
Key Generation Algorithm. Key Generation for ACE encryption scheme. Input: a size parameter m, such that 1024≤m≤16384. Output: a public/private key pair.
Generate a random prime q, such that 2255<q<2256. Generate a random prime P, 2m−1<P<2m, such that P≡1(modq). Generate a random integer g1∈{2,...,P−1}, such that g1q≡1(modP). Generate random integers w∈{1,...,q−1} and x,y,z1,z2∈{0,...,q−1} Compute the following integers in {1,...,P−1}: Generate random byte strings k1∈B20l′+64 and k2∈B2⌈l/16⌉+40, where l=LB(P) and l′=LB(⌈(2⌈l/4⌉+4)/16⌉). Return the public key/private key pair
Ciphertext Representation A ciphertext of the ACE encryption scheme has the form
where the components are defined as: u1,u2,v — integers from {1,...,P−1} (whose multiplicative order modulo P divides q). s — element W4. e — element B∗. s,u1,u2,v we call the preamble, and e — the cryptogram. If a cleartext is a string consisting of l байт, then the length of e is equal to l+16⌈l/1024⌉. We need to introduce the function CEncode, which maps a ciphertext to its byte-string
representation, and the corresponding inverse function CDecode. For the integer l>0, word string s∈W4, integers 0≤u1,u2,v<256l, and byte string e∈B∗, For integer l>0, byte string ψ∈B∗, such that L(ψ)≥3l+16,
Encryption Process Algorithm. ACE asymmetric encryption operation. input: public key (P,q,g1,g2,c,d,h1,h2,k1,k2) and byte string M∈B∗. Output: byte string — ciphertext ψ of M.
Generate r∈{0,...,q−1} at random. Generate the ciphertext preamble: Generate s∈W4 at random. Compute u1←g1rremP, u2←g2rremP. Compute α ←UOWHash′(k1,LB(P),s,u1,u2)∈Z; note that 0<α <2160. Compute v←crdα rremP. Compute the key for the symmetric encryption operation: h1~←h1rremP, h2~←h2rremP. Compute k←ESHash(k,LB(P),s,u1,u2,h1~,h2~)∈W8. Compute cryptogram e←SEnc(k,s,1024,M). Encode the ciphertext: Return ψ . Before starting off the symmetric encryption process, the input message M∈B∗ is divided into blocks M1,...,Mt, where each of the block, possibly except the last one, is of 1024 bytes. Each block is encrypted by the stream cipher. For each encrypted block Ei 16-byte message authentication code is computed. We get the cryptogram Note that if L(M)=0, then L(e)=0. Algorithm. ACE asymmetric encryption process. Input: (k,s,M,m)∈W8×W4×Z×B∗ m>0 Output: e∈Bl, l=L(M)+16⌈L(N)/m⌉.
If M=λB, then return λB. Initialize a pseudo-random generator state: Generate the key kAXUAXUHash: e←λB,i←0. While i<L(M), do the following: r←min(L(M)−i,m). Generate mask values for the encryption and MAC: (maskm,genState)←GenWords(4,genState). (maske,genState)←GenWords(r,genState). Encrypt the plaintext: enc←[M]ii+r⊕maske. Generate the message authentication code: If i+r=L(M), then lastBlock←1; else lastBlock←0. mac←AXUHash(kAXU,lastBlock,enc)∈W4. Update the ciphertext: e←e||enc||IW∗B∗(mac⊕maskm). i←i+r. Return e.
Decryption process Algorithm. ACE decryption process. Input: public key (P,q,g1,g2,c,d,h1,h2,k1,k2) and corresponding private key (w,x,y,z1,z2), byt e string ψ∈B∗. Output: Decrypted message M∈B∗∪Reject.
… excerpt ends here. Continue reading the full article.