openssl/crypto/bn/old/info
1998-12-21 11:00:56 +00:00

22 lines
502 B
Text

Given A1A0 * B1B0 == S3S2S1S0
S0= low(A0*B0)
S1= low( (A1-A0)*(B0-B1)) +low( A1*B1) +high(A0*B0)
S2= high((A1-A0)*(B0-B1)) +high(A1*B1) +low( A1*B1)
S3= high(A1*B1);
Assume we know S1 and S0, and can calulate A1*B1 and high((A1-A0)*(B0-B1))
k0= S0 == low(A0*B0)
k1= S1
k2= low( A1*B1)
k3= high(A1*B1)
k4= high((A1-A0)*(B0-B1))
k1= low((A1-A0)*(B0-B1)) +k2 +high(A0*B0)
S2= k4 +k3 +k2
S3= k3
S1-k2= low((A1-A0)*(B0-B1)) +high(A0*B0)
We potentially have a carry or a borrow from S1