AQUAL

From formulasearchengine
Revision as of 01:45, 9 October 2012 by 216.87.115.33 (talk)
Jump to navigation Jump to search

Template:One source

ACE (Advanced Cryptographic Engine) — 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

Z — 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,...,n1} such that Ar(modn) for integer n>0 and AZ.
Aremf — polynomial rF2[T] with deg(r)<deg(f) such that Ar(modf) with A,fF2[T],f0.

Basic string notation

A — The set of all strings.
An — The set of all strings with length n.
For xAL(x) — length of string x. The string of length zero is denoted λA.
For x,yA 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":

0b=def0b;
0An=def(0A,...,0A)An for n>0.


We define B=defb8 as a set of bytes, and W=defb32 as a set of words.

For

xA

with

A{b,B,W}

and

l>0

we define a padding operator:

padl(x)=def{x,L(x)lx||0AlL(x),L(x)<l.

Conversion operator

Conversion operator Isrcdst:srcdst 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 m, such that 1024m16384, key components are defined as:
q — a 256-bit prime number.
P — a m-bit prime number, such that P1(modq).
g1,g2,c,d,h1,h2 — elements {1,...,P1} (whose multiplicative order modulo P divides q).
w,x,y,z1,z2 — elements {0,...,q1}.
k1,k2 — elements B with L(k1)=20l+64 and L(k2)=32l/16+40, where l=m/8 and l=Lb((2l/4+4)/16).

Key Generation

Algorithm. Key Generation for ACE encryption scheme.
Input: a size parameter m m, such that 1024m16384.
Output: a public/private key pair.

  1. Generate a random prime q, such that 2255<q<2256.
  2. Generate a random prime P, 2m1<P<2m, such that P1(modq).
  3. Generate a random integer g1{2,...,P1}, such that g1q1(modP).
  4. Generate random integers w{1,...,q1} and x,y,z1,z2{0,...,q1}
  5. Compute the following integers in {1,...,P1}:

    g2g1wremP,


    cg1xremP,


    dg1yremP,


    h1g1z1remP,


    h2g1z2remP.

  6. Generate random byte strings k1B20l+64 and k2B2l/16+40, where l=LB(P) and l=LB((2l/4+4)/16).
  7. Return the public key/private key pair

    ((P,q,g1,g2,c,d,h1,h2,k1,k2),(w,x,y,z1,z2))

Ciphertext Representation

A ciphertext of the ACE encryption scheme has the form

(s,u1,u2,v,e),


where the components are defined as:
u1,u2,v — integers from {1,...,P1} (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+16l/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

sW4

, integers

0u1,u2,v<256l

, and byte string

eB

,

CEncode(l,s,u1,u2,v,e)=defIWB(s)||padl(IZB(u1))||padl(IZB(u2))||padl(IZB(v))||eB.


For integer

l>0

, byte string

ψB

, such that

L(ψ)3l+16

,

CDecode(l,ψ)=def(IBW([ψ]016),IBZ([ψ]1616+l),IBZ([ψ]16+l16+2l),IBZ([ψ]16+2l16+3l),[ψ]16+3lL(ψ))W4×Z×Z×Z×B.

Encryption Process

Algorithm. ACE asymmetric encryption operation.
input: public key (P,q,g1,g2,c,d,h1,h2,k1,k2) and byte string MB.
Output: byte string — ciphertext ψ of M.

  1. Generate r{0,...,q1} at random.
  2. Generate the ciphertext preamble:
    1. Generate sW4 at random.
    2. Compute u1g1rremP, u2g2rremP.
    3. Compute αUOWHash(k1,LB(P),s,u1,u2)Z; note that 0<α<2160.
    4. Compute vcrdαrremP.
  3. Compute the key for the symmetric encryption operation:
    1. h1~h1rremP, h2~h2rremP.
    2. Compute kESHash(k,LB(P),s,u1,u2,h1~,h2~)W8.
  4. Compute cryptogram eSEnc(k,s,1024,M).
  5. Encode the ciphertext:

    ψCEncode(LB(P),s,u1,u2,v,e).

  6. Return ψ.

Before starting of the symmetric encryption process the input message

MB

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

e=E1||C1||...||Et||Ct.

L(e)=L(M)+16L(M)/m

. 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: eBl, l=L(M)+16L(N)/m.

  1. If M=λB, then return λB.
  2. Initialize a pseudo-random generator state:

genStateInitGen(k,s)GenState

  1. Generate the key kAXUAXUHash:

(kAXU,genState)GenWords((5Lb(m/64)+24),genState)..

  1. eλB,i0.
  2. While i<L(M), do the following:
    1. rmin(L(M)i,m).
    2. Generate mask values for the encryption and MAC:
      1. (maskm,genState)GenWords(4,genState).
      2. (maske,genState)GenWords(r,genState).
    3. Encrypt the plaintext: enc[M]ii+rmaske.
    4. Generate the message authentication code:
      1. If i+r=L(M), then lastBlock1; else lastBlock0.
      2. macAXUHash(kAXU,lastBlock,enc)W4.
    5. Update the ciphertext: ee||enc||IWB(macmaskm).
    6. ii+r.
  3. 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 MBReject.

  1. Decrypt the ciphertext:
    1. If L(ψ)<3LB(P)+16, then return Reject.
    2. Compute:

      (s,u1,u2,v,e)CDecode(LB(P),ψ)W4×Z×Z×Z×B;


      note that 0u1,u2,v<256l, where l=LB(P).
  2. Verify the ciphertext preamble:
    1. If u1P or u2P or vP, then return Reject.
    2. If u1q1remP, then return Reject.
    3. reject0.
    4. If u2u1wremP, then reject1.
    5. Compute αUOWHash(k1,LB(P),s,u1,u2)Z; note that 0α2160.
    6. If vu1x+αyremP, then reject1.
    7. If reject=1, then return Reject.
  3. Compute the key for the symmetric decryption operation:
    1. h1~u1z1remP, h2~u1z2remP.
    2. Compute kESHash(k2,LB(P),s,u1,h1~,h2~)W8.
  4. Compute MSDec(k,s,1024,e);note that SDec can return Reject.
  5. Return M.

Algorithm. Decryption operation SDec.
Input: (k,s,m,e)W8×W4×Z×B m>0
Output: Decrypted message MBReject.

  1. If e=λB, then return λB.
  2. Initialize a pseudo-random generator state:

    genStateInitGen(k,s)GenState

  3. Generate the key kAXUAXUHash:

    (kAXU,genState)GenWords((5Lb(m/64)+24),genState)..

  4. MλB,i0.
  5. While i<L(e), do the following:
    1. rmin(L(e)i,m+16)16.
    2. If r0, then return Reject.
    3. Generate mask values for the encryption and MAC:
      1. (maskm,genState)GenWords(4,genState).
      2. (maske,genState)GenWords(r,genState).
    4. Verify the message authentication code:
      1. If i+r+16=L(M), then lastblock1; else lastblock0.
      2. macAXUHash(kAXU,lastBlock,[e]ii+r)W4.
      3. If [e]ri+ri+r+16IWB(macmaskm), then return Reject.
    5. Update the plaintext: MM||([e]ii+r)maske).
    6. ii+r+16.
  6. Return M.

Signature Scheme

The signature scheme employs two key types:
ACE Signature public key: (N,h,x,e,k,s).
ACE Signature private key: (p,q,a).
For the given size parameter m, such that 1024m16384, key components are defined the following way:
p — m/2-bit prime number with (p1)/2 — is also a prime number.
q — m/2-bit prime number with (q1)/2 — is also a prime number.
N — N=pqand has either m or m1 бит.
h,x — elements {1,...,N1} (quadratic residues modulo N).
e — 161-bit prime number.
a — element {0,...,(p1)(q1)/41}
k — elements B184.
s — elements B32.

Key Generation

Algorithm. Key generation for the ACE public-key signature scheme.
Input: size parameter m, such that 1024m16384.
Output: public/private key pair.

  1. Generate random prime numbersp,q, such that (p1)/2 and (q1)/2 — is also a prime number, and

    2m11<p<2m1, 2m21<q<2m2, и pq,


    where

    m1=m/2 and m1=m/2.

  2. Set Npq.
  3. Generate random prime number e, где 2160e2161.
  4. Generate random h{1,...,N1}, taking into account gcd(h,N)=1 and gcd(h±1,N)=1, and compute h(h)2remN.
  5. Generate random a{0,...,(p1)(q1)/41}and compute xharemN.
  6. Generate random byte strings kB184, and sB32.
  7. Return public key/private key pair

    ((N,h,x,e,k,s),(p,q,a)).

Signature Representation

The signature in the ACE signature scheme has the form (d,w,y,y,k~), where the components are defined the following way:
d — element B64.
w — integer, such that 2160w2161.
y,y — elements {1,...,N1}.
k~ — element B;note that L(k~)=64+20LB((L(M)+8)/64), where M — message being signed.

We need to introduce the

SEncode

function, which maps a signature into its byte string representation, and the corresponding inverse function

SDecode

. For integer

l>0

, byte string

dB64

, integers

0w25621

and

0y,y<256l

, and byte string

k~B

,

SEncode(l,d,w,y,y,k~)=defd||pad21(IZB(w))||padl(IZB(y))||padl(IZB(y))||k~B.


For integer

l>0

, byte string

σB

, where

L(σ)2l+53

,

CSecode(l,σ)=def([σ]064,IBZ([σ]6485),IBZ([σ]8585+l),IBZ([σ]85+l85+2l),[σ]85+2lL(σ))B64×Z×Z×Z×B.

Signature Generation Process

Algorithm. ACE Signature Generation Process.
Input: public key (N,h,x,e,k,s) and corresponding private key (p,q,a) and byte string MB, 0L(M)264.
Output: byte string — digital signature σB.

  1. Perform the following steps to hash the input data:
    1. Generate a hash key k~B20m+64 at random, such that m=Lb((L(M)+8)/64).
    2. Compute mhIWZ(UOWHash(k~,M)).
  2. Select y~{1,...,N1} at random, and compute yy~2remN.
  3. Compute x(y)rhmhremN.
  4. Generate a random prime e, 2160e2161, and its certificate of correctness (w,d): (e,w,d)GenCertPrime(s). Repeat this step until ee.
  5. Set rUOWHash(k,LB(N),x,k~)Z; note that 0r<2160.
  6. Compute yhbremN, where

    be1(ar)rem(pq),


    and where p=(p1)/2 and q=(q1)/2.
  7. Encode the signature:

    σSEncode(LB(N),d,w,y,y,k~).

  8. Return σ

Notes

In the definition of ACE Encryption process and ACE Signature process some auxiliary function(e.g. UOWHash,ESHash and some other) are being used, definition of which goes beyond this article. You cand find more details about it in в.[1]

Implementation, Utilization and Performance

ACE Encryption scheme is recommended by NESSIE (New European Schemes for Signatures, Integrity and Encryption) as asymmetric encryption scheme. Press-release is dated by February 2003.

Both schemes were implemented in ANSI C, with the use of GNU GMP library. Tests were done on two platforms: Power PC 604 model 43P under AIX system and 266 MHz Pentium under Windows NT system. Result tables:

Table 1. Time costs on basic operations.

Power PC Pentium
Operand size(byte) Operand size(byte)
512 1024 512 1024
Multiplication 3.5 * 10^(-5) sec 1.0 * 10^(-4) sec 4.5 * 10^(-5) sec 1.4 * 10^(-4) sec
Squaring 3.3 * 10^(-5) sec 1.0 * 10^(-4) sec 4.4 * 10^(-5) sec 1.4 * 10^(-4) sec
Exponentiation 1.9 * 10^(-2) sec 1.2 * 10^(-1) sec 2.6 * 10^(-2) sec 1.7 * 10^(-1) sec

Table 2. Performance of encryption scheme and signature scheme.

Power PC Pentium
Fixed costs (ms) MBit/sec Fixed costs (ms) MBit/sec
Encrypt 160 18 230 16
Decrypt 68 18 97 14
Sign 48 64 62 52
Sign set-up 29 41
Verify 52 65 73 53

Literature

External links