Download presentation
Presentation is loading. Please wait.
1
MIRACL & PBC Yung-Hsiang Liu
2
Outline Why we use the libraries?
MIRACL ( Elliptic curves cryptography ECDSA, ECIES, ECDH, ECMQV, … PBC ( Pairing-based cryptography IBE, IBNIKE, 3-party KE, IBS, BLS, PEKS, BE, ABE, …
3
Why we use the libraries?
Security Big number and finite field arithmetic Group law Extension field arithmetic Bilinear pairing: Miller’s algorithm, polynomial evaluation Symmetric Key Size (bits) RSA and Diffie-Hellman Key Size (bits) Elliptic Curve Key Size (bits) 80 1024 160 112 2048 224 128 3072 256 192 7680 384 15360 521 Table 1: NIST Recommended Key Sizes
4
Libraries C/C++ Libraries MIRACL PBC
Multiprecision Integer and Rational Arithmetic Cryptographic Library PBC Pairing-Based Crypto library
5
MIRACL Yung-Hsiang Liu ECC 2014
6
ECC Protocols ECDSA ECDH/ECMQV ECIES ECIES-DEM ECIES-KEM ECIES-KEM-DEM
7
ECDSA Parameters: 𝐸( 𝔽 𝑝 ) of prime order 𝑛, and a base point 𝑃
Key pair: private key 𝑑 𝐴 ∈ ℤ 𝑛 , public key 𝑄 𝐴 = 𝑑 𝐴 𝑃 Sign message 𝑚: 𝑧=𝐻𝑎𝑠ℎ 𝑚 mod 𝑛 𝑘 ∈ 𝑅 ℤ 𝑛 , and 𝑅=𝑘𝑃 𝑟=𝑥 𝑅 mod 𝑛 * 𝑠= 𝑘 −1 𝑧+𝑟 𝑑 𝐴 mod 𝑛 * Signature: (𝑟,𝑠) Verify the signature (𝑟,𝑠): 𝑧=𝐻𝑎𝑠ℎ 𝑚 mod 𝑛 𝑤= 𝑠 −1 mod 𝑛 𝑅=𝑧𝑤𝑃+𝑟𝑤 𝑄 𝐴 Check if 𝑥 𝑅 =𝑟
8
What MIRACL Provides – (1)
Big number Finite field arithmetic Elliptic curve group law 𝐸 𝔽 𝑝 : 𝑦 2 = 𝑥 3 +𝑎𝑥+𝑏 𝑃( 𝑥 1 , 𝑦 1 ), 𝑄( 𝑥 2 , 𝑦 2 ) 𝑅 𝑥 3 , 𝑦 3 =𝑃+𝑄 𝑥 3 = 𝜆 2 − 𝑥 1 − 𝑥 2 𝑦 3 =𝜆 𝑥 1 − 𝑥 3 − 𝑦 1 𝜆= 𝑦 2 − 𝑦 1 𝑥 2 − 𝑥 1 , if 𝑃≠𝑄 3 𝑥 1 2 +𝑎 2 𝑦 1 , if 𝑃=𝑄
9
What MIRACL Provides – (2)
Efficient scalar multiplication Use “double and add” to calculate 𝑘𝑃 Random number generator Pick a random big number Random point on elliptic curves Choose 𝑥, and test if there is a suitable 𝑦
10
Download MIRACL
11
Build MIRACL File architecture To build the library
To build the library Visual Studio Unix-like MAC
12
Build MIRACL on Ubuntu Download from GitHub
Save as MIRACL-master.zip unzip -j -aa -L MIRACL-master.zip –d miracl -j ignores the directory structure inside the zip file -aa converts all text files to Unix format -L ensures that all filenames are lower-case -d specify the directory to extract into bash linux64
13
Examples genprime schoof ecdsa_sign ecdsa_verify
14
Further Reading Sample codes provided by MIRACL *.cpp Header files *.h
15
PBC Yung-Hsiang Liu ECC 2014
16
Pairing-based Cryptography
Identity-based encryption Identity-based non-interactive key distribution 3-party key distribution Identity-based signature BLS short signature
17
What PBC Provides Big number Finite field arithmetic
Extension field arithmetic Elliptic curve group law Bilinear pairings Tate pairing Miller’s algorithm Polynomial evaluation
18
Download MIRACL
19
Build MIRACL To build the library Windows binaries and DLL
Windows binaries and DLL
20
Build MIRACL on Ubuntu Download from official website
Save as pbc tar.gz tar xf pbc tar.gz ./configure make .libs/libpbc.* make install
21
Examples BLS short signature
Identity-based non-interactive key distribution 3-party key distribution Identity-based encryption Identity-based signature
22
More Applications Searchable encryption Broadcast encryption
Attribute-based encryption
23
Further Reading http://crypto.stanford.edu/pbc/manual/
1. Installing PBC 2. Tutorial 3. Pairing functions 4. Element functions 5. Param functions 6. Other functions 7. Bundled programs 8. PBC internals 9. Security issues
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.