Clever Geek Handbook
📜 ⬆️ ⬇️

Williams Cryptosystem

The Williams System Cryptosystem is a public key encryption system created by Hugh Cowie Williams in 1984.

Content

  • 1 History
  • 2 About the algorithm
  • 3 Description of the algorithm
    • 3.1 Mathematical apparatus
    • 3.2 Key creation
    • 3.3 Encryption
    • 3.4 Decryption
  • 4 Security
  • 5 Performance
  • 6 Example
    • 6.1 Key Generation
    • 6.2 Encryption
    • 6.3 Decryption
  • 7 notes
  • 8 Literature

History

The algorithm was developed in 1984 as an alternative to the more famous RSA. The development goal was to get rid of cryptosystem vulnerabilities.

About the algorithm

For any cryptosystem, it is desirable that it be proved that its hacking has computational complexity similar to the computational complexity of a task, which at the moment cannot be solved in the foreseeable time. Like RSA, the Williams cryptosystem is based on the assumption of the complexity of factorization of large numbers, and it was proved that for any hacking of ciphertext using preliminary cryptanalysis (having only a public key), it is necessary to factorize [1] , that is, solve the equationpq=n {\ displaystyle pq = n}   regardingp {\ displaystyle p}   andq {\ displaystyle q}   . This claim has not been proven for the RSA system. The computational complexity of the factorization problem is unknown, but it is believed to be quite high. But, like RSA, the Williams cryptosystem is vulnerable to attack based on matched ciphertext.

Algorithm Description

The Williams system algorithm, while not computationally more complex than RSA, is much more cumbersome in the description. For him, there is a lemma [2] , which will be described in the section on the mathematical apparatus - it plays a key role in this cryptosystem.

Mathematical apparatus

First you need to define the terminology - it is borrowed from the theory of quadratic fields , but for the cryptosystem only the most basic knowledge is required. Let's consider an element

α=a+bc=(a,b),{\ displaystyle \ alpha = a + b {\ sqrt {c}} = (a, b),}  

Wherea,b,c {\ displaystyle a, b, c}   Are integers, andc {\ displaystyle {\ sqrt {c}}}   - conditional element whose square isc {\ displaystyle c}   . Then the following formulas will be valid:

αone+α2=(aone+a2,bone+b2),{\ displaystyle \ alpha _ {1} + \ alpha _ {2} = (a_ {1} + a_ {2}, b_ {1} + b_ {2}),}  
αone⋅α2=(aonea2+c⋅boneb2,aoneb2+a2bone){\ displaystyle \ alpha _ {1} \ cdot \ alpha _ {2} = (a_ {1} a_ {2} + c \ cdot b_ {1} b_ {2}, a_ {1} b_ {2} + a_ {2} b_ {1})}  

Conjugate toα {\ displaystyle \ alpha}   the number is called

α¯=a-bc{\ displaystyle {\ bar {\ alpha}} = ab {\ sqrt {c}}}  

We also define functions that help us express the power of this number. Let be

αi=Xi(α)+Yi(α)c,{\ displaystyle \ alpha ^ {i} = X_ {i} (\ alpha) + Y_ {i} (\ alpha) {\ sqrt {c}},}  

thenXi {\ displaystyle X_ {i}}   andYi {\ displaystyle Y_ {i}}   can be expressed throughαi {\ displaystyle \ alpha ^ {i}}   in the following way:

Xi(α)=(αi+α¯i)/2{\ displaystyle X_ {i} (\ alpha) = (\ alpha ^ {i} + {\ bar {\ alpha}} ^ {i}) / 2}  
Yi(α)=b(αi-α¯i)/(α-α¯)=(αi-α¯i)(2c){\ displaystyle Y_ {i} (\ alpha) = b (\ alpha ^ {i} - {\ bar {\ alpha}} ^ {i}) / (\ alpha - {\ bar {\ alpha}}) = ( \ alpha ^ {i} - {\ bar {\ alpha}} ^ {i}) (2 {\ sqrt {c}})}  

The last expression is intended only to simplify understanding. Since functions are defined for pairs(a,b) {\ displaystyle (a, b)}   then do not containc {\ displaystyle c}   . Assuming now thata2-b2c=one {\ displaystyle a ^ {2} -b ^ {2} c = 1}   , then we can write the following recurrence relations:

X2i=2Xi2-one{\ displaystyle X_ {2i} = 2 {X_ {i}} ^ {2} -1}  
Y2i=2XiYi{\ displaystyle Y_ {2i} = 2X_ {i} Y_ {i}}  
X2i+one=2XiXi+one-Xone{\ displaystyle X_ {2i + 1} = 2X_ {i} X_ {i + 1} -X_ {1}}  
Y2i+one=2XiYi+one-Yone{\ displaystyle Y_ {2i + 1} = 2X_ {i} Y_ {i + 1} -Y_ {1}}  

These formulas are designed for quick calculation.Xi {\ displaystyle X_ {i}}   andYi {\ displaystyle Y_ {i}}   . AsX0=one {\ displaystyle X_ {0} = 1}   andXone=a {\ displaystyle X_ {1} = a}   thenXi(α) {\ displaystyle X_ {i} (\ alpha)}   also independent ofb {\ displaystyle b}   .

Lemma

Let ben {\ displaystyle n}   is a product of two odd primesp {\ displaystyle p}   andq {\ displaystyle q}   ;a,b,c {\ displaystyle a, b, c}   are integers satisfying the equationa2-cb2=one(modn) {\ displaystyle a ^ {2} -cb ^ {2} = 1 {\ pmod {n}}}   . Let the Legendre Symbolsδp= {\ displaystyle \ delta _ {p} =}  (cp) {\ displaystyle \ textstyle \ left ({\ frac {c} {p}} \ right)}   andδq=(cq) {\ displaystyle \ delta _ {q} = \ textstyle \ left ({\ frac {c} {q}} \ right)}   satisfy comparisons

δp=-p(modfour){\ displaystyle \ delta _ {p} = - p {\ pmod {4}}}  
δq=-q(modfour) {\ displaystyle \ delta _ {q} = - q {\ pmod {4}}}  
.

Let furthergcd(cb,n)=one {\ displaystyle gcd (cb, n) = 1}   and the Jacobi Symbol(2(a+one)n) {\ displaystyle \ textstyle \ left ({\ frac {2 (a + 1)} {n}} \ right)}   equal to 1. Denote

m=(p-δp)(q-δq)/four{\ displaystyle m = (p- \ delta _ {p}) (q- \ delta _ {q}) / 4}  

and we believe thate {\ displaystyle e}   andd {\ displaystyle d}   satisfy comparison

ed=(m+one)/2(modm){\ displaystyle ed = (m + 1) / 2 {\ pmod {m}}}  
.

Under these assumptions

α2ed=±α(modn){\ displaystyle \ alpha ^ {2ed} = \ pm \ alpha {\ pmod {n}}}  

Key Creation

Two prime numbers are selected firstp {\ displaystyle p}   andq {\ displaystyle q}   , their product is calculatedn {\ displaystyle n}   . Using enumeration, select a numberc {\ displaystyle c}   so that the symbols of Legendreδp {\ displaystyle \ delta _ {p}}   andδq {\ displaystyle \ delta _ {q}}   satisfy the conditions imposed in the lemma. Then (also by selection) the number is determineds {\ displaystyle s}   such that the symbol of Jacobi

(s2-cn)=-one{\ displaystyle \ textstyle \ left ({\ frac {s ^ {2} -c} {n}} \ right) = - 1}  

andgcd(s,n)=one. {\ displaystyle gcd \ textstyle \ left (s, n \ right) = 1.}   Numberm {\ displaystyle m}   is chosen in the same way as in the lemma:

m=(p-δp)(q-δq)/four{\ displaystyle m = (p- \ delta _ {p}) (q- \ delta _ {q}) / 4}  

Then select numbersd,e {\ displaystyle d, e}   satisfying the conditions imposed in the lemma. We choose a random one, for example,d:gcd(d,m)=one {\ displaystyle d: gcd \ textstyle \ left (d, m \ right) = 1}   , bute {\ displaystyle e}   calculate by the formula

e=m+one2d-one(modm){\ displaystyle e = {\ frac {m + 1} {2}} d ^ {- 1} {\ pmod {m}}}  

Thenn,e,c,s {\ displaystyle {n, e, c, s}}   Is the public key, andp,q,m,d {\ displaystyle {p, q, m, d}}   - The secret key.

Encryption

All calculations here are modulon {\ displaystyle n}   . Recorda+bc(modn) {\ displaystyle a + b {\ sqrt {c}} {\ pmod {n}}}   here means(amodn)+(bmodn)c. {\ displaystyle (a \ mod n) + (b \ mod n) {\ sqrt {c}}.}   Imagine plain text as a numberw∈2,3,...,n-one {\ displaystyle w \ in {2,3, ..., n-1}}   . Defineγ {\ displaystyle \ gamma}   andbone {\ displaystyle b_ {1}}   : if the symbol is Jacobi(w2-cn) {\ displaystyle \ textstyle \ left ({\ frac {w ^ {2} -c} {n}} \ right)}   is equal to+one {\ displaystyle +1}   then

bone=0{\ displaystyle b_ {1} = 0}   andγ=w+c, {\ displaystyle \ gamma = w + {\ sqrt {c}},}  

otherwise defineγ {\ displaystyle \ gamma}   through the work

bone=one{\ displaystyle b_ {1} = 1}   andγ=(w+c)(s+c). {\ displaystyle \ gamma = (w + {\ sqrt {c}}) (s + {\ sqrt {c}}.}  

Then it’s easy to make sure that the Jacobi symbol

(γγ¯n)=one,{\ displaystyle \ textstyle \ left ({\ frac {\ gamma {\ bar {\ gamma}}} {n}} \ right) = 1,}  

which is verified by direct calculation (in the second case, taking into account the choices {\ displaystyle s}   and the multiplicity of the Jacobi symbol). Next we find the number

α=γγ¯.{\ displaystyle \ alpha = {\ frac {\ gamma} {\ bar {\ gamma}}}.}  

Imagineα {\ displaystyle \ alpha}   asα=a+bc. {\ displaystyle \ alpha = a + b {\ sqrt {c}}.}  α {\ displaystyle \ alpha}   satisfies the conditions imposed in the lemma. Really,p,q,n,c,d,e {\ displaystyle p, q, n, c, d, e}   satisfy the conditions for construction, and

αα¯=γγ¯γ¯γ=one.{\ displaystyle \ alpha {\ bar {\ alpha}} = {\ frac {\ gamma} {\ bar {\ gamma}}} {\ frac {\ bar {\ gamma}} {\ gamma}} = 1.}  
2(a+one)=γγ¯+γ¯γ+2=(γ+γ¯)2γ¯γ(modn){\ displaystyle 2 (a + 1) = {\ frac {\ gamma} {\ bar {\ gamma}}} + {\ frac {\ bar {\ gamma}} {\ gamma}} + 2 = {\ frac { (\ gamma + {\ bar {\ gamma}}) ^ {2}} {{\ bar {\ gamma}} \ gamma}} {\ pmod {n}}}  

It follows from the last formula that

(2(a+one)n)=one.{\ displaystyle \ textstyle \ left ({\ frac {2 (a + 1)} {n}} \ right) = 1.}  

Having receivedα, {\ displaystyle \ alpha,}   it should be encrypted by exponentiatione {\ displaystyle e}   - the result can be presented throughXe(α) {\ displaystyle X_ {e} (\ alpha)}   andYe(α), {\ displaystyle Y_ {e} (\ alpha),}   which can be [3] quickly (for the number of operations of orderlog⁡e {\ displaystyle \ log e}   ) are found using recurrence formulas. We introduce the notation

E=Xe(α)Ye(α){\ displaystyle E = {\ frac {X_ {e} (\ alpha)} {Y_ {e} (\ alpha)}}  

Then the cryptographic text will be a triple of numbers(E,bone,b2), {\ displaystyle (E, b_ {1}, b_ {2}),}   Whereb2=amod2. {\ displaystyle b_ {2} = a \ mod 2.}  

Decryption

Decryption is easier. First calculated

α2e=α2e(αα¯)e=E+cE-c,{\ displaystyle \ alpha ^ {2e} = {\ frac {\ alpha ^ {2e}} {{(\ alpha {\ bar {\ alpha}})} ^ {e}}} = {\ frac {E + {\ sqrt {c}}} {E - {\ sqrt {c}}},}  

what an attacker can do. But for the final decryption it is necessary to calculate, as shown in the lemma,α2ed {\ displaystyle \ alpha ^ {2ed}}   - despite the fact thatd {\ displaystyle d}   kept secret.

α2ed=Xd(α2e)+Yd(α2e)c=±α{\ displaystyle \ alpha ^ {2ed} = X_ {d} (\ alpha ^ {2e}) + Y_ {d} (\ alpha ^ {2e}) {\ sqrt {c}} = \ pm \ alpha}  

Numberb2, {\ displaystyle b_ {2},}   transmitted in the message will indicate which of the signs is correct - the one that gives an even result or the one that gives an odd one. Numberbone {\ displaystyle b_ {1}}   will show if the result should be multiplied by(s-c)/(s+c) {\ displaystyle (s - {\ sqrt {c}}) / (s + {\ sqrt {c}})}   . As a result, we get the number

α′=w+cw-c{\ displaystyle \ alpha '= {\ frac {w + {\ sqrt {c}}} {w - {\ sqrt {c}}}}}  

And we can easily find the source text, which will complete the decryption process.

w=α′+oneα′-onec{\ displaystyle w = {\ frac {\ alpha '+1} {\ alpha' -1}} {\ sqrt {c}}}  

Security

Like RSA, an attack based on the selected ciphertext can be attacked on the cryptosystem. Suppose that a cryptanalyst found some algorithm that allows with probabilityδ>0 {\ displaystyle \ delta> 0}   decrypt cryptotext. Then he can do as follows:

1. Choose a numberϕ {\ displaystyle \ phi}   such that the symbol of Jacobi(ϕ2-cn)=-one {\ displaystyle \ textstyle \ left ({\ frac {\ phi ^ {2} -c} {n}} \ right) = - 1}   ;
2. Encryptϕ {\ displaystyle \ phi}   but in such a way as if the mentioned Jacobi symbol is equal+one {\ displaystyle +1}   andbone=0 {\ displaystyle b_ {1} = 0}   receiving cryptotext as an output(E,0,b2) {\ displaystyle (E, 0, b_ {2})}   ;
3. Decrypt the received cryptotext, having received someψ≠ϕ {\ displaystyle \ psi \ neq \ phi}   .

Then with probabilityδ>0 {\ displaystyle \ delta> 0}   cryptanalyst can get

ϕ-ψ=p(modn){\ displaystyle \ phi - \ psi = p {\ pmod {n}}}  

or

ϕ-ψ=q(modn){\ displaystyle \ phi - \ psi = q {\ pmod {n}}}  

What allows factorizationn {\ displaystyle n}   and crack the cryptosystem.

Performance

After the key is generated, the basic calculations occur when the number is raisedα {\ displaystyle \ alpha}   to a degree, and this can be done forO(log⁡e) {\ displaystyle O (\ log e)}   multiplications modulo each of which occurs forO(log⁡e) {\ displaystyle O (\ log e)}   addition operations, in turn, performed forO(log⁡e) {\ displaystyle O (\ log e)}   elementary operations of addition of constant speed - that is, beyondO(log3⁡e) {\ displaystyle O (\ log ^ {3} e)}   , at the same speed as raising to a power an integer modulo that is required to use RSA.

Example

Key Generation

We choose, for example,p=eleven {\ displaystyle p = 11}   andq=13 {\ displaystyle q = 13}   whose work isn=143 {\ displaystyle n = 143}   . As

(5eleven)=one=-eleven(modfour){\ displaystyle \ left ({\ frac {5} {11}} \ right) = 1 = -11 {\ pmod {4}}}  

and

(513)=-one=-13(modfour){\ displaystyle \ left ({\ frac {5} {13}} \ right) = - 1 = -13 {\ pmod {4}}}  

Can choosec=5 {\ displaystyle c = 5}   . Also, if you chooses=2 {\ displaystyle s = 2}   we get

(s2-cn)=(-oneeleven)(-one13)=-one{\ displaystyle \ left ({\ frac {s ^ {2} -c} {n}} \ right) = \ left ({\ frac {-1} {11}} \ right) \ left ({\ frac { -1} {13}} \ right) = - 1}  

Which satisfies the hypothesis of the theorem. Next we get

m=(10⋅fourteenfour)=35{\ displaystyle m = \ left ({\ frac {10 \ cdot 14} {4}} \ right) = 35}  

And finally, we choose the exponents of encryption and decryption: since

23⋅16=eighteen(modm){\ displaystyle 23 \ cdot 16 = 18 {\ pmod {m}}}  

Can choose

e=23{\ displaystyle e = 23}  
d=16{\ displaystyle d = 16}  

Encryption

Let the source text beω=21 {\ displaystyle \ omega = 21}   . As

(212-5143)=(7eleven)(713)=(-one)⋅(-one)=one{\ displaystyle \ left ({\ frac {21 ^ {2} -5} {143}} \ right) = \ left ({\ frac {7} {11}} \ right) \ left ({\ frac {7 } {13}} \ right) = (- 1) \ cdot (-1) = 1}  

We havebone=0 {\ displaystyle b_ {1} = 0}   ,γ=21+5 {\ displaystyle \ gamma = 21 + {\ sqrt {5}}}   and

α=(21+521-5)=125+65(mod143){\ displaystyle \ alpha = \ left ({\ frac {21 + {\ sqrt {5}}} {21 - {\ sqrt {5}}} \ right) = 125 + 6 {\ sqrt {5}} { \ pmod {143}}}  

As125 {\ displaystyle 125}   odd, we getb2=one {\ displaystyle b_ {2} = 1}   . After calculatingX23(α)=68 {\ displaystyle X_ {23} (\ alpha) = 68}   andY23(α)=125 {\ displaystyle Y_ {23} (\ alpha) = 125}   we get

E=68⋅125-one=68⋅135=28(mod143){\ displaystyle E = 68 \ cdot {125} ^ {- 1} = 68 \ cdot 135 = 28 {\ pmod {143}}}  

So the ciphertext is the triple(28,one,one) {\ displaystyle (28,1,1)}   .

Decryption

Now you should calculateα2e {\ displaystyle \ alpha ^ {2e}}   :

α2e=(282+5282-5)+2⋅(28282-5)5=95+1265(mod143){\ displaystyle \ alpha ^ {2e} = \ left ({\ frac {28 ^ {2} +5} {28 ^ {2} -5}} \ right) +2 \ cdot \ left ({\ frac {28 } {28 ^ {2} -5}} \ right) {\ sqrt {5}} = 95 + 126 {\ sqrt {5}} {\ pmod {143}}}  

Asd=16 {\ displaystyle d = 16}   , we also calculate

X16(α2e)=eighteen{\ displaystyle X_ {16} (\ alpha ^ {2e}) = 18}  
Y16(α2e)=137{\ displaystyle Y_ {16} (\ alpha ^ {2e}) = 137}  

Asb2=one {\ displaystyle b_ {2} = 1}   thena {\ displaystyle a}   must be odd and

α′=-(eighteen+1375)=125+65(mod143){\ displaystyle \ alpha '= - (18 + 137 {\ sqrt {5}}) = 125 + 6 {\ sqrt {5}} {\ pmod {143}}}  

Given that the second component of ciphertextbone=0 {\ displaystyle b_ {1} = 0}   , we conclude thatα′=α {\ displaystyle \ alpha '= \ alpha}   . In this case

ω=126+65124+655=21(mod143){\ displaystyle \ omega = {\ frac {126 + 6 {\ sqrt {5}}} {124 + 6 {\ sqrt {5}}}} {\ sqrt {5}} = 21 {\ pmod {143}} }   .

So we gotω=21 {\ displaystyle \ omega = 21}   , which was the original plaintext.

Notes

  1. ↑ Kim, 1992 .
  2. ↑ Williams, 1985 .
  3. ↑ Arto Salomaa - Public Key Cryptography, Vol. World, 1995, ISBN 5-03-001991-X

Literature

  • Hugh C. Williams. Some Public-Key Crypto-Functions as Intractable as Factorization. - 1985.
  • Kwangio Kim (Ed.). Public Key Criptography. - 1992. - S. 1-17.
Source - https://ru.wikipedia.org/w/index.php?title= Williams Cryptosystem&oldid = 102700047


More articles:

  • Vallianos, Theodoros
  • Traynor, Megan
  • Dvornikov, Prokofiy Ignatievich
  • Video Card
  • Death as a slice of bread (film)
  • Manzetti, Servando
  • Pshibylsky, Jerzy
  • 1337
  • Wagon Parks (platform)
  • Mass abduction in Iguale

All articles

Clever Geek | 2019