AQUAL: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
Poisson equation was missing G
 
No edit summary
Line 1: Line 1:
{{One source|date=February 2013}}


'''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.


As far as home-improvement projects go, it's not the scale of the changes that you make. Instead, the deciding factor should be the impact that is created. With this mindset, you need not spend thousands of dollars to make an impression. This handpicked selection of home-improvement tips and tricks is suitable for all types of projects.<br><br>Make sure you have weather stripping around all of your doors and windows. This helps you with multiple problems. It keeps air from leaking out keeping your house cooler or warmer when you're running your A/C or heat. It can also keep little critters from finding their way in. It's also good if you're in an area that floods a lot, to keep water from seeping in.<br><br>Renovate your home to allow for the use of more energy-efficient and natural lighting. This is an easy way to reduce your electric bill while also helping to save the environment. Compact fluorescent bulbs will last longer, use less energy, and provide a more comfortable lighting than incandescents. It is easy to replace the bulbs in your home with these.<br><br>A front porch is a worthwhile place to invest your home improvement efforts. This is one of the first areas of the home that people notice when approaching your home. Clear out any clutter and add personal touches such as flowers, plants, patio furniture. You may also want to add new light fixtures and a nice wood varnish. Fix any obvious issues such as broken boards or unstable steps. You can add value to the property of your home when your porch is nice and inviting.<br><br>It is possible to inexpensively clean up the look of warn kitchen appliances. Meanwhile, stainless steel is all the rage, but why throw out your trusty fridge because the color doesn't suit your taste? It is possible to purchase appliance spray paint for a very reasonable price, and paint the appliances whatever color you so desire. This can be completed easily in one day.<br><br>To prepare for the winter, don't forget to insulate your pipes to keep the lines from freezing. You can purchase weatherizing tape that is easy to apply to your plumbing lines. Weatherizing your plumbing pipes will prevent your pipes from freezing and even bursting, saving you costly repair bills.<br><br>Seek out advice before starting on do it yourself projects. There may be important steps you will overlook if you don't know what you are doing. Although many household jobs can be done yourself, it is always a good idea to ask an expert how to do the job properly.<br><br>There are two ways to replace or change a lock: replacing the assembly itself, or only the cylinder. The is the part that actually locks the door. If you wish to replace a lock for security, you can simply replace the cylinder. On the other hand, you will need to change out the entire unit in order to change the look.<br><br>An easily-missed factor in cooling costs is your AC unit. You may not need to replace your insulation or windows, if you simply replace or clean the filters in your air conditioner. This is true for both window and central air units. The cost of a new filter for your central unit is much less than new insulation!<br><br>A simple way to improve your bathroom is by repainting it. Always use a satin/eggshell or semi-gloss paint, as this is more mold resistant than a flat paint, and can also be wiped down more easily. When choosing a color, take into account the size of the bathroom. If it is very small, then opt for a light color. If the ceiling is of low or average height, then consider painting it a shade lighter than the walls. This will create the illusion that the ceiling is higher.<br><br>Install windows that have secondary glazing. Windows like these do cost more money, but that is because they work much better to help lower energy costs. If you plan to [http://Www.Replace.org/ replace] your windows, go for the best. These windows, which are energy efficient, cool and heat your home easier while keeping it quiet and nice.<br><br>Get new tiling. If your tiling does not match your walls, or is cracking and becoming damaged, replacing it is a great home improvement project that is relatively simple and inexpensive. Stick-on floor tiles are available at many home improvement stores, and if you want to use the real ones, they are not too expensive either.<br><br>Always shut off the water if working near pipes. Home improvement projects in the kitchen or bathroom may not always involve pipes, but shutting off the water can prevent any mishaps from becoming catastrophes. Know where your main water shut-off valve is, and use it any time you are working in these areas.<br><br>Are you more informed when it comes to home improvement? Do you have plan that works now? Have your skills improved? Can you now use things that work with your home? Do you know how to properly install things? With any luck, the tips above should have helped you answer these questions.<br><br>If you have any type of questions concerning where and how to use [https://www.rebelmouse.com/snobbishcuff2345/need-a-roof-look-no-further-th-775445702.html commercial roofing perth], you can call us at our web site.
== 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.<br />
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]].<br />
Mehdi Nassehi and Thomas Schweinberger worked on ACE project in the IBM research lab in [[Zürich]], [[Switzerland]].<br />
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 ===
<math>Z\,</math> — The set of integers.<br />
<math>F_2[T]\,</math> — The set of univariate polynomials with coefficients in the finite field <math>F_2\,</math> of cardinality 2.<br />
<math>A rem n\,</math> — integer <math>r \in \left\{0,...,n-1\right\}</math> such that <math>A\equiv r(mod n)</math> for integer <math>n>0\,</math> and <math>A \in Z\,</math>.<br />
<math>A rem f\,</math> — polynomial <math>r \in F_2[T]</math> with <math>deg(r)<deg(f)\,</math> such that <math>A\equiv r(mod f)</math> with <math>A,f \in F_2[T],f \ne 0\,</math>.
 
=== Basic string notation ===
<math>A^{\ast}\,</math> — The set of all strings.<br />
<math>A^{n}\,</math> — The set of all strings with length n.<br />
For <math>x \in A^{\ast} L(x)</math> — length of string <math>x\,</math>. The string of length zero is denoted <math>\lambda_A\,</math>.<br />
For <math>x,y \in A^{\ast}</math> <math>x||y\,</math> — the result of <math>x\,</math> and <math>y\,</math> concatenation.
 
=== Bits,Bytes,Words ===
<math>b\stackrel{\mathrm{def}}{=}\left\{0,1\right\}</math> — The set of bits.<br /> Let us take all sets of form <math>b, b^{n_1}, (b^{n_1})^{n_2},...</math>. For such a set A we define the "zero element":<br /><p style="text-align:center;"><math>0_b\stackrel{\mathrm{def}}{=}0 \in b</math>;<br /><math>0_{A^n}\stackrel{\mathrm{def}}{=}(0_A,...,0_A) \in A^n</math> for <math>n>0\,</math>.</p><br />
We define <math>B\stackrel{\mathrm{def}}{=}b^8</math> as a set of bytes, and <math>W\stackrel{\mathrm{def}}{=}b^{32}</math> as a set of words.<br />
For <math>x \in A^{\ast}\,</math> with <math>A \in \left\{b,B,W\right\}\,</math> and <math>l>0\,</math> we define a padding operator:<br /><p style="text-align:center;"><math>
pad_l(x) \stackrel{\mathrm{def}}{=} \begin{cases}
x, & L(x) \ge l \\
x||0_{A^{l-L(x)}}, & L(x)<l
\end{cases}</math>.</p>
 
=== Conversion operator ===
Conversion operator <math>I_{src}^{dst}: src \rightarrow dst</math> makes a conversion between elements <math>Z,F_2[T],b^{\ast},B^{\ast},W^{\ast}</math>.
 
== Encryption Scheme ==
 
=== Encryption Key Pair ===
The encryption scheme employs two key types:<br />
ACE public key: <math>(P,q,g_1,g_2,c,d,h_1,h_2,k_1,k_2)\,</math>.<br />
ACE private key: <math>(w,x,y,z_1,z_2)\,</math>.<br />
For a given size parameter m <math>m\,</math>, such that <math>1024 \le m \le 16384</math>, key components are defined as:<br />
<math>q\,</math> — a 256-bit prime number.<br />
<math>P\,</math> — a m-bit prime number, such that <math>P\equiv1(mod q)</math>.<br />
<math>g_1,g_2,c,d,h_1,h_2\,</math> — elements <math>\left\{1,...,P-1\right\}</math> (whose multiplicative order modulo <math>P\,</math> divides <math>q\,</math>).<br />
<math>w,x,y,z_1,z_2\,</math> — elements <math>\left\{0,...,q-1\right\}</math>.<br />
<math>k_1,k_2\,</math> — elements <math>B^\ast</math> with <math>L(k_1)=20l^\prime+64</math> and <math>L(k_2)=32\left\lceil l/16 \right\rceil+40</math>, where <math>l=\left\lceil m/8 \right\rceil</math> and <math>l^\prime=L_b(\left\lceil (2\left\lceil l/4 \right\rceil +4)/16 \right\rceil)</math>.
 
=== Key Generation ===
'''Algorithm.''' Key Generation for ACE encryption scheme.<br />
Input: a size parameter m <math>m\,</math>, such that <math>1024 \le m \le 16384</math>.<br />
Output: a public/private key pair.
# Generate a random prime <math>q\,</math>, such that <math>2^{255} < q < 2^{256}\,</math>.
# Generate a random prime <math>P\,</math>, <math>2^{m-1} < P < 2^{m}\,</math>, such that <math>P\equiv1(mod q)</math>.
# Generate a random integer <math>g_1 \in \left\{ 2,...,P-1 \right\}</math>, such that <math>g_1^q\equiv1(mod P)</math>.
# Generate random integers <math>w \in \left\{ 1,...,q-1 \right\}</math> and <math>x,y,z_1,z_2 \in \left\{ 0,...,q-1 \right\}</math>
# Compute the following integers in <math>\left\{ 1,...,P-1 \right\}</math>:<br /><p style="text-align:center;"><math>g_2 \leftarrow g_1^w rem P</math>,</p><br /><p style="text-align:center;"><math>c \leftarrow g_1^x rem P</math>,</p><br /><p style="text-align:center;"><math>d \leftarrow g_1^y rem P</math>,</p><br /><p style="text-align:center;"><math>h_1 \leftarrow g_1^{z_1} rem P</math>,</p><br /><p style="text-align:center;"><math>h_2 \leftarrow g_1^{z_2} rem P</math>.</p>
# Generate random byte strings <math>k_1 \in B^{20l^\prime+64}</math> and <math>k_2 \in B^{2\left\lceil l/16 \right\rceil+40}</math>, where <math>l=L_B(P)\,</math> and <math>l^\prime = L_B(\left\lceil (2\left\lceil l/4 \right\rceil +4)/16 \right\rceil)</math>.
# Return the public key/private key pair <br /><p style="text-align:center;"><math>((P,q,g_1,g_2,c,d,h_1,h_2,k_1,k_2),(w,x,y,z_1,z_2))\,</math></p>
 
=== Ciphertext Representation ===
A ciphertext of the ACE encryption scheme has the form<br />
<p style="text-align:center;"><math>(s,u_1,u_2,v,e)\,</math>,</p><br />
where the components are defined as:<br />
<math>u_1,u_2,v\,</math> — integers from <math>\left\{ 1,...,P-1 \right\}</math> (whose multiplicative order modulo <math>P\,</math> divides <math>q\,</math>).<br />
<math>s\,</math> — element <math>W^4\,</math>.<br />
<math>e\,</math> — element <math>B^{\ast}\,</math>.<br />
<math>s,u_1,u_2,v\,</math> we call the ''preamble'', and <math>e\,</math> — the ''cryptogram''. If a cleartext is a string consisting of <math>l\,</math> байт, then the length of <math>e\,</math> is equal to <math>l+16\left\lceil l/1024 \right\rceil</math>.<br />
We need to introduce the function <math>CEncode\,</math>, which maps a ciphertext to its byte-string
representation, and the corresponding inverse function <math>CDecode\,</math>. For the integer <math>l>0\,</math>, word string <math>s \in W^4</math>, integers <math>0 \le u_1,u_2,v<256^l</math>, and byte string <math>e \in B^{\ast}</math>,<br /><p style="text-align:center;"><math>CEncode(l,s,u_1,u_2,v,e) \stackrel{\mathrm{def}}{=}I_{W^{\ast}}^{B^{\ast}}(s)||pad_l(I_{Z}^{B^{\ast}}(u_1))||pad_l(I_{Z}^{B^{\ast}}(u_2))||pad_l(I_{Z}^{B^{\ast}}(v))||e \in B^{\ast}</math>.</p><br />
For integer <math>l>0\,</math>, byte string <math>\psi \in B^{\ast}</math>, such that <math>L(\psi) \ge 3l+16</math>,<br /><p style="text-align:center;"><math>CDecode(l,\psi) \stackrel{\mathrm{def}}{=}(I_{B^{\ast}}^{W^{\ast}}(\Bigl[\psi\Bigr]_{0}^{16}),I_{B^{\ast}}^{Z}(\Bigl[\psi\Bigr]_{16}^{16+l}),I_{B^{\ast}}^{Z}(\Bigl[\psi\Bigr]_{16+l}^{16+2l}),I_{B^{\ast}}^{Z}(\Bigl[\psi\Bigr]_{16+2l}^{16+3l}),\Bigl[\psi\Bigr]_{16+3l}^{L(\psi)}) \in W^4 \times Z \times Z \times Z \times B^{\ast}</math>.</p>
 
=== Encryption Process ===
'''Algorithm.''' ACE asymmetric encryption operation.<br />
input: public key <math>(P,q,g_1,g_2,c,d,h_1,h_2,k_1,k_2)\,</math> and byte string <math>M \in B^{\ast}\,</math>.<br />
Output: byte string — ciphertext <math> \psi\ </math> of <math>M\,</math>.
# Generate <math>r \in \left\{ 0,...,q-1 \right\}</math> at random.
# Generate the ciphertext preamble:
## Generate <math>s \in W^4\,</math> at random.
## Compute <math>u_1 \leftarrow g_1^r rem P</math>, <math>u_2 \leftarrow g_2^r rem P</math>.
## Compute <math>\alpha\ \leftarrow UOWHash^\prime (k_1,L_B(P),s,u_1,u_2) \in Z\,</math>; note that <math>0 < \alpha\ < 2^{160}\,</math>.
## Compute <math>v \leftarrow c^r d^{\alpha\ r} rem P\,</math>.
# Compute the key for the symmetric encryption operation:
## <math>\tilde{h_1} \leftarrow h_1^r rem P</math>, <math>\tilde{h_2} \leftarrow h_2^r rem P</math>.
## Compute <math>k \leftarrow ESHash(k,L_B(P),s,u_1,u_2,\tilde{h_1},\tilde{h_2}) \in W^8\,</math>.
# Compute cryptogram <math>e \leftarrow SEnc(k,s,1024,M)</math>.
# Encode the ciphertext:<br /><p style="text-align:center;"><math>\psi\ \leftarrow CEncode(L_B(P),s,u_1,u_2,v,e)</math>.</p>
# Return <math> \psi\ </math>.
Before starting of the symmetric encryption process the input message <math>M \in B^{\ast}\,</math> is divided into blocks <math>M_1,...,M_t\,</math>, 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 <math>E_i\,</math> 16-byte message authentication code is computed. We get the cryptogram<br /><p style="text-align:center;"><math>e=E_1||C_1||...||E_t||C_t\,</math>.</p><math>L(e)=L(M)+16\left\lceil L(M)/m \right\rceil</math>. Note that if <math>L(M)=0\,</math>, then <math>L(e)=0\,</math>.
'''Algorithm.''' ACE asymmetric encryption process.<br />
Input: <math>(k,s,M,m) \in W^8 \times W^4 \times Z \times B^{\ast} \,</math> <math>m>0\,</math><br />
Output: <math>e \in B^l</math>, <math>l=L(M)+16 \left\lceil L(N)/m \right\rceil</math>.
# If <math>M=\lambda_B \,</math>, then return <math>\lambda_B \,</math>.
# Initialize a pseudo-random generator state:
<p style="text-align:center;"><math>genState \leftarrow InitGen(k,s) \in GenState</math></p>
# Generate the key <math>k_{AXU} AXUHash \,</math>:
<p style="text-align:center;"><math>(k_{AXU},genState) \leftarrow GenWords((5L_b(\left\lceil m/64 \right\rceil)+24),genState).</math>.</p>
# <math>e \leftarrow \lambda_B, i \leftarrow 0</math>.
# While <math>i<L(M)\,</math>, do the following:
## <math>r \leftarrow min(L(M)-i,m)</math>.
## Generate mask values for the encryption and MAC:
### <math>(mask_m,genState) \leftarrow GenWords(4,genState)</math>.
### <math>(mask_e,genState) \leftarrow GenWords(r,genState)</math>.
## Encrypt the plaintext: <math>enc \leftarrow \Bigl[M\Bigr]_i^{i+r} \oplus mask_e</math>.
## Generate the message authentication code:
### If <math>i+r=L(M)\,</math>, then <math>lastBlock \leftarrow 1</math>; else <math>lastBlock \leftarrow 0</math>.
### <math>mac \leftarrow AXUHash(k_{AXU},lastBlock,enc) \in W^4</math>.
## Update the ciphertext: <math>e \leftarrow e||enc||I_{W^{\ast}}^{B^{\ast}}(mac \oplus mask_m)</math>.
## <math>i \leftarrow i+r</math>.
# Return <math>e \,</math>.
 
=== Decryption process ===
'''Algorithm.''' ACE decryption process.<br />
Input: public key <math>(P,q,g_1,g_2,c,d,h_1,h_2,k_1,k_2)\,</math> and corresponding private key <math>(w,x,y,z_1,z_2)\,</math>, byt e string <math>\psi \in B^{\ast}</math>.<br />
Output: Decrypted message <math>M \in B^{\ast} \cup {Reject}</math>.
# Decrypt the ciphertext:
## If <math>L(\psi) < 3L_B(P)+16 \,</math>, then return <math>Reject \,</math>.
## Compute:<br /><p style="text-align:center;"><math>(s,u_1,u_2,v,e) \leftarrow CDecode(L_B(P),\psi) \in W^4 \times Z \times Z \times Z \times B^{\ast}</math>;</p><br />note that <math>0 \le u_1,u_2,v<256^l</math>, where <math>l=L_B(P)\,</math>.
# Verify the ciphertext preamble:
## If <math>u_1 \ge P</math> or <math>u_2 \ge P</math> or <math>v \ge P</math>, then return <math>Reject \,</math>.
## If <math>u_1^q \ne 1 rem P</math>, then return <math>Reject \,</math>.
## <math>reject \leftarrow 0 \,</math>.
## If <math>u_2 \ne u_1^w rem P</math>, then <math>reject \leftarrow 1 \,</math>.
## Compute <math>\alpha \leftarrow UOWHash^{\prime}(k_1,L_B(P),s,u_1,u_2) \in Z</math>; note that <math>0 \le \alpha \le 2^{160}</math>.
## If <math>v \ne u_1^{x+{\alpha}y} rem P</math>, then <math>reject \leftarrow 1 \,</math>.
## If <math>reject=1 \,</math>, then return <math>Reject \,</math>.
# Compute the key for the symmetric decryption operation:
## <math>\tilde{h_1} \leftarrow u_1^{z_1} rem P</math>, <math>\tilde{h_2} \leftarrow u_1^{z_2} rem P</math>.
## Compute <math>k \leftarrow ESHash(k_2,L_B(P),s,u_1,\tilde{h_1},\tilde{h_2}) \in W^8</math>.
# Compute <math>M \leftarrow SDec(k,s,1024,e)</math>;note that <math>SDec\,</math> can return <math>Reject \,</math>.
# Return <math>M\,</math>.
'''Algorithm.''' Decryption operation <math>SDec\,</math>.<br />
Input: <math>(k,s,m,e) \in W^8 \times W^4 \times Z \times B^{\ast} \,</math> <math>m>0\,</math><br />
Output: Decrypted message <math>M \in B^{\ast} \cup {Reject}</math>.
# If <math>e=\lambda_B \,</math>, then return <math>\lambda_B \,</math>.
# Initialize a pseudo-random generator state:<br /><p style="text-align:center;"><math>genState \leftarrow InitGen(k,s) \in GenState</math></p>
# Generate the key <math>k_{AXU} AXUHash \,</math>:<br /><p style="text-align:center;"><math>(k_{AXU},genState^{\prime}) \leftarrow GenWords((5L_b(\left\lceil m/64 \right\rceil)+24),genState).</math>.</p>
# <math>M \leftarrow \lambda_B, i \leftarrow 0</math>.
# While <math>i<L(e)\,</math>, do the following:
## <math>r \leftarrow min(L(e)-i,m+16)-16</math>.
## If <math>r \le 0</math>, then return <math>Reject \,</math>.
## Generate mask values for the encryption and MAC:
### <math>(mask_m,genState) \leftarrow GenWords(4,genState)</math>.
### <math>(mask_e,genState) \leftarrow GenWords(r,genState)</math>.
## Verify the message authentication code:
### If <math>i+r+16=L(M)\,</math>, then <math>lastblock \leftarrow 1</math>; else <math>lastblock \leftarrow 0</math>.
### <math>mac \leftarrow AXUHash(k_{AXU},lastBlock,\Bigl[e\Bigr]_i^{i+r}) \in W^4</math>.
### If <math>\Bigl[e\Big]r_{i+r}^{i+r+16} \ne I_{W^{\ast}}^{B^{\ast}}(mac \oplus mask_m)</math>, then return <math>Reject \,</math>.
## Update the plaintext: <math>M \leftarrow M||(\Bigl[e\Bigr]_i^{i+r}) \oplus mask_e)</math>.
## <math>i \leftarrow i+r+16</math>.
# Return <math>M \,</math>.
 
== Signature Scheme ==
The signature scheme employs two key types:<br />
ACE Signature public key: <math>(N,h,x,e^{\prime},k^{\prime},s)\,</math>.<br />
ACE Signature private key: <math>(p,q,a)\,</math>.<br />
For the given size parameter <math>m\,</math>, such that <math>1024 \le m \le 16384</math>, key components are defined the following way:<br />
<math>p\,</math> — <math>\left\lfloor m/2 \right\rfloor</math>-bit prime number with <math>(p-1)/2\,</math> — is also a prime number.<br />
<math>q\,</math> — <math>\left\lfloor m/2 \right\rfloor</math>-bit prime number with <math>(q-1)/2\,</math> — is also a prime number.<br />
<math>N\,</math> — <math>N=pq\,</math>and has either <math>m\,</math> or <math>m-1\,</math> бит.<br />
<math>h,x\,</math> — elements <math>\left\{1,...,N-1\right\}</math> (quadratic residues modulo <math>N\,</math>).<br />
<math>e^{\prime}\,</math> — 161-bit prime number.<br />
<math>a\,</math> — element <math>\left\{0,...,(p-1)(q-1)/4-1\right\}</math><br />
<math>k^{\prime}\,</math> — elements <math>B^{184}\,</math>.<br />
<math>s\,</math> — elements <math>B^{32}\,</math>.
 
=== Key Generation ===
'''Algorithm.''' Key generation for the ACE public-key signature scheme.<br />
Input: size parameter <math>m\,</math>, such that <math>1024 \le m \le 16384</math>.<br />
Output: public/private key pair.
# Generate random prime numbers<math>p,q\,</math>, such that <math>(p-1)/2\,</math> and <math>(q-1)/2\,</math> — is also a prime number, and <br /><p style="text-align:center;"><math>2^{m_1-1}<p<2^{m_1}</math>, <math>2^{m_2-1}<q<2^{m_2}</math>, и <math>p \ne q</math>,</p><br />where<br /><p style="text-align:center;"><math>m_1=\left\lfloor m/2 \right\rfloor</math> and <math>m_1=\left\lceil m/2 \right\rceil</math>.
# Set <math>N \leftarrow pq</math>.
# Generate random prime number <math>e^{\prime}\,</math>, где <math>2^{160} \le e^{\prime} \le 2^{161}</math>.
# Generate random <math>h^{\prime} \in \left\{1,...,N-1\right\}</math>, taking into account <math>gcd(h^{\prime},N)=1</math> and <math>gcd(h^{\prime} \pm 1,N)=1</math>, and compute <math>h \leftarrow (h^{\prime})^{-2} rem N</math>.
# Generate random <math>a \in \left\{0,...,(p-1)(q-1)/4-1\right\}</math>and compute <math>x \leftarrow h^a rem N</math>.
# Generate random byte strings <math>k^{\prime} \in B^{184}\,</math>, and <math>s \in B^{32}\,</math>.
# Return public key/private key pair <br /><p style="text-align:center;"><math>((N,h,x,e^{\prime},k^{\prime},s),(p,q,a))\,</math>.</p>
 
=== Signature Representation ===
The signature in the ACE signature scheme has the form <math>(d,w,y,y^{\prime},\tilde{k})</math>, where the components are defined the following way:<br />
<math>d\,</math> — element <math>B^{64}\,</math>.<br />
<math>w\,</math> — integer, such that <math>2^{160} \le w \le 2^{161}</math>.<br />
<math>y,y^{\prime}\,</math> — elements <math>\left\{1,...,N-1\right\}</math>.<br />
<math>\tilde{k}\,</math> — element <math>B^{\ast}\,</math>;note that <math>L(\tilde{k})=64+20L_B(\left\lceil (L(M)+8)/64 \right\rceil)</math>, where <math>M\,</math> — message being signed.<br />
We need to introduce the <math>SEncode\,</math> function, which maps a signature into its byte string representation, and the corresponding inverse function <math>SDecode\,</math>. For integer <math>l>0\,</math>, byte string <math>d \in B^{64}</math>, integers <math>0 \le w \le 256^{21}</math> and <math>0 \le y,y^{\prime}<256^l</math>, and byte string <math>\tilde{k} \in B^{\ast}</math>,<br /><p style="text-align:center;"><math>SEncode(l,d,w,y,y^{\prime},\tilde{k}) \stackrel{\mathrm{def}}{=}d||pad_{21}(I_{Z}^{B^{\ast}}(w))||pad_l(I_{Z}^{B^{\ast}}(y))||pad_l(I_{Z}^{B^{\ast}}(y^{\prime}))||\tilde{k} \in B^{\ast}</math>.</p><br />
For integer <math>l>0\,</math>, byte string <math>\sigma \in B^{\ast}</math>, where <math>L(\sigma) \ge 2l+53</math>,<br /><p style="text-align:center;"><math>CSecode(l,\sigma) \stackrel{\mathrm{def}}{=}(\Bigl[\sigma\Bigr]_{0}^{64},I_{B^{\ast}}^{Z}(\Bigl[\sigma\Bigr]_{64}^{85}),I_{B^{\ast}}^{Z}(\Bigl[\sigma\Bigr]_{85}^{85+l}),I_{B^{\ast}}^{Z}(\Bigl[\sigma\Bigr]_{85+l}^{85+2l}),\Bigl[\sigma\Bigr]_{85+2l}^{L(\sigma)}) \in B^{64} \times Z \times Z \times Z \times B^{\ast}</math>.</p>
 
=== Signature Generation Process ===
'''Algorithm.''' ACE Signature Generation Process.<br />
Input: public key <math>(N,h,x,e^{\prime},k^{\prime},s)\,</math> and corresponding private key <math>(p,q,a)\,</math> and byte string <math>M \in B^{\ast}\,</math>, <math>0 \le L(M) \le 2^{64}</math>.<br />
Output: byte string — digital signature <math>\sigma \in B^{\ast}\,</math>.
# Perform the following steps to hash the input data:
## Generate a hash key <math>\tilde{k} \in B^{20m+64}</math> at random, such that <math>m=L_b(\left\lceil (L(M)+8)/64 \right\rceil)</math>.
## Compute <math>m_h \leftarrow I_{W^{\ast}}^{Z}(UOWHash^{\prime\prime}(\tilde{k},M))</math>.
# Select <math>\tilde{y} \in \left\{1,...,N-1\right\}</math> at random, and compute <math>y^{\prime} \leftarrow \tilde{y}^2 rem N</math>.
# Compute <math>x^{\prime} \leftarrow (y^{\prime})^{r^{\prime}}h^{m_h} rem N</math>.
# Generate a random prime <math>e\,</math>, <math>2^{160} \le e \le 2^{161}</math>, and its certificate of correctness <math>(w,d)\,</math>: <math>(e,w,d) \leftarrow GenCertPrime(s)\,</math>. Repeat this step until <math>e \ne e^{\prime}\,</math>.
# Set <math>r \leftarrow UOWHash^{\prime\prime\prime}(k^{\prime},L_B(N),x^{\prime},\tilde{k}) \in Z</math>; note that <math>0 \le r < 2^{160}</math>.
# Compute <math>y \leftarrow h^b rem N</math>, where<br /><p style="text-align:center;"><math>b \leftarrow e^{-1}(a-r)rem(p^{\prime}q^{\prime})</math>,</p><br />and where <math>p^{\prime}=(p-1)/2</math> and <math>q^{\prime}=(q-1)/2</math>.
# Encode the signature: <br /><p style="text-align:center;"><math>\sigma \leftarrow SEncode(L_B(N),d,w,y,y^{\prime},\tilde{k})</math>.
# Return <math>\sigma\,</math>
 
== 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 в.<ref>[http://www.zurich.ibm.com/security/ace/ace_spec.pdf ACE: The Advanced Cryptographic Engine, T. Schweinberger and V. Shoup, manuscript 2000]</ref>
 
== 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&nbsp;MHz Pentium under Windows NT system. Result tables:
 
Table 1. Time costs on basic operations.
{| class="wikitable"
|
|colspan="2" |Power PC
|colspan="2" |Pentium
|-
|
|colspan="2" |Operand size(byte)
|colspan="2" |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.
{| class="wikitable"
|
|colspan="2" |Power PC
|colspan="2" |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 ==
<references />
 
==External links==
* [http://www.alphaworks.ibm.com/tech/ace http://www.alphaworks.ibm.com/tech/ace]
* [http://www.zurich.ibm.com/security/ace/ http://www.zurich.ibm.com/security/ace/]
* [https://www.cosic.esat.kuleuven.be/nessie/deliverables/decision-final.pdf NESSIE Portfolio of recommended cryptographic primitives]
 
{{DEFAULTSORT:Ace Encrypt}}
[[Category:Cryptographic software]]

Revision as of 01:45, 9 October 2012

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