没有合适的资源?快使用搜索试试~ 我知道了~
首页有限域运算编程.pdf
资源详情
资源推荐
Efficient implementation of finite-field arithmetic
Peter Schwabe
Radboud University Nijmegen, The Netherlands
November 22, 2013
Pairing 2013 Tutorial
Elliptic-curve addition
I
Computing P + Q for two elliptic-curve points P and Q means
performing a few operations in the underlying field
I
Example: Add projective (X
P
: Y
P
: Z
P
) and (X
Q
: Y
Q
: Z
Q
) on
curve E : y
2
= x
3
+ ax + b.
t
1
← Y
P
· Z
Q
t
2
← X
P
· Z
Q
t
3
← Z
P
· Z
Q
u ← Y
Q
· Z
P
− t
1
uu ← u
2
v ← X
Q
· Z
P
− t
2
vv ← v
2
vvv ← v · vv
R ← vv · t
2
A ← uu · t
3
− vvv − 2 · R
X
R
← v · A
Y
R
← u · (R − A) − vvv · t
1
Z
R
← vvv · t
3
return (X
R
: Y
R
: Z
R
)
Efficient implementation of finite-field arithmetic 2
The EFD
I
There are many formulas for different curve shapes and point
representations
I
Best overview: The Explicit Formulas Database (EFD):
http://www.hyperelliptic.org/EFD/
I
Compiled by Dan Bernstein and Tanja Lange from many papers and
talks
I
Contains verification scripts, 3-operand code, . . .
Efficient implementation of finite-field arithmetic 3
The problem with large integers
I
C has data types for 8-bit, 16-bit, 32-bit, and 64-bit integers
I
Why are there no data types for 256-bit integers?
I
Magma does not have problems with large integers
I
Python has datatype long for arbitrary-size integers
I
Java has BigInteger class
I
C is “portable assembly”, very close to what computers really do
I
Computers work on data in registers (very small, very fast storage
units)
I
Typical register sizes: 8 bit, 16 bit, 32 bit, 64 bit . . . but not 256 bit
I
That’s a lie!
I
Yeah, you’re right. We do have 256-bit registers (AVX on Intel and
AMD processors)
I
But those do not hold a single 256-bit integer (but vectors of
integers or floats)
I
Why can’t they just hold a 256-bit integer?
I
Because arithmetic units cannot perform arithmetic on 256-bit
integers (only on 8-bit, 16-bit, 32-bit, and 64-bit integers)
Efficient implementation of finite-field arithmetic 4
The problem with large integers
I
C has data types for 8-bit, 16-bit, 32-bit, and 64-bit integers
I
Why are there no data types for 256-bit integers?
I
Magma does not have problems with large integers
I
Python has datatype long for arbitrary-size integers
I
Java has BigInteger class
I
C is “portable assembly”, very close to what computers really do
I
Computers work on data in registers (very small, very fast storage
units)
I
Typical register sizes: 8 bit, 16 bit, 32 bit, 64 bit . . . but not 256 bit
I
That’s a lie!
I
Yeah, you’re right. We do have 256-bit registers (AVX on Intel and
AMD processors)
I
But those do not hold a single 256-bit integer (but vectors of
integers or floats)
I
Why can’t they just hold a 256-bit integer?
I
Because arithmetic units cannot perform arithmetic on 256-bit
integers (only on 8-bit, 16-bit, 32-bit, and 64-bit integers)
Efficient implementation of finite-field arithmetic 4
剩余144页未读,继续阅读
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功