MIRACL & PBC Yung-Hsiang Liu.

Slides:



Advertisements
Similar presentations
Key Management Nick Feamster CS 6262 Spring 2009.
Advertisements

An Introduction to Pairing Based Cryptography Dustin Moody October 31, 2008.
Fundamental Elliptic Curve Cryptography Algorithms draft-mcgrew-fundamental-ecc-02
Russell Martin August 9th, Contents Introduction to CPABE Bilinear Pairings Group Selection Key Management Key Insulated CPABE Conclusion & Future.
Graduate School of Natural Science and Technology Okayama University Yumi Sakemi, Hidehiro Kato, Shoichi Takeuchi, Yasuyuki Nogami and Yoshitaka Morikawa.
Elliptic curve arithmetic and applications to cryptography By Uros Abaz Supervised by Dr. Shaun Cooper and Dr. Andre Barczak.
Implementing Cryptographic Pairings on Smartcards Mike Scott.
YSLInformation Security -- Public-Key Cryptography1 Elliptic Curve Cryptography (ECC) For the same length of keys, faster than RSA For the same degree.
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
CSE 597E Fall 2001 PennState University1 Digital Signature Schemes Presented By: Munaiza Matin.
Computer Science Public Key Management Lecture 5.
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
By Abhijith Chandrashekar and Dushyant Maheshwary.
Ipsita Sahoo 10IT61B05 School of Information Technology IIT Kharagpur October 29, 2011 E LLIPTIC C URVES IN C RYPTOGRAPHY.
Elliptic Curve Cryptography
1 Network Security Lecture 6 Public Key Algorithms Waleed Ejaz
Digital Signatures: Mathematics Zdeněk Říha. Data authentication Data integrity + data origin Digital signature Asymmetric cryptography public and private.
1 Optimal Mail Certificates in Mail Payment Applications Leon Pintsov Pitney Bowes 2nd CACR Information Security Workshop 31 March 1999.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Computer Science CSC 774 Advanced Network Security Topic 2.6 ID Based Cryptography #2 Slides by An Liu.
Cryptography and Network Security (CS435) Part Eight (Key Management)
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Cryptography issues – elliptic curves Presented by Tom Nykiel.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
1 Cryptanalysis Lab Elliptic Curves. Cryptanalysis Lab Elliptic Curves 2 Outline [1] Elliptic Curves over R [2] Elliptic Curves over GF(p) [3] Properties.
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys – use of public-key.
Public Key Cryptography. Asymmetric encryption is a form of cryptosystem in which Encryption and decryption are performed using the different keys—one.
@Yuan Xue CS 285 Network Security Public-Key Cryptography Yuan Xue Fall 2012.
Lecture 8 (Chapter 18) Electronic Mail Security Prepared by Dr. Lamiaa M. Elshenawy 1.
Giuseppe Bianchi Lecture 8: Elliptic Curve Crypto A (minimal) introduction.
Elliptic Curve Public Key Cryptography Why ? ● ECC offers greater security for a given key size. ● The smaller key size also makes possible much more compact.
Digital Signatures.
Public Key Encryption.
ASymmetric Key Algorithms
Asymmetric Encryption
An Introduction to Pairing Based Cryptography
Chapter 9 – Elliptic Curve Cryptography ver. November 3rd, 2009
CSCE 715: Network Systems Security
Public Key Cryptosystem
Asymmetric-Key Cryptography
Network Security Design Fundamentals Lecture-13
Topic 26: Discrete LOG Applications
Dan Brown, Certicom Research November 10, 2004
Identity Based Encryption
Public Key Encryption and Digital Signatures
Elliptic Curves.
An Introduction to Pairing Based Cryptography
Elliptic Curve Cryptography (ECC)
Asymmetric Cryptography
Cryptography Lecture 24.
Elliptic Curve Cryptography (ECC)
The Application of Elliptic Curves Cryptography in Embedded Systems
Enabling Technology1: Cryptography
MIRACL.
CSCE 715: Network Systems Security
Practical Aspects of Modern Cryptography
Chapter -7 CRYPTOGRAPHIC HASH FUNCTIONS
Introduction to Elliptic Curve Cryptography
Searchable Encryption
Chapter 3 - Public-Key Cryptography & Authentication
CSCE 715: Network Systems Security
Cryptology Design Fundamentals
CSCE 715: Network Systems Security
Elliptic-Curve Cryptography (ECC)
How to Use Charm Crypto Lib
Presentation transcript:

MIRACL & PBC Yung-Hsiang Liu

Outline Why we use the libraries? MIRACL (http://www.certivox.com/miracl/) Elliptic curves cryptography ECDSA, ECIES, ECDH, ECMQV, … https://github.com/CertiVox/MIRACL PBC (http://crypto.stanford.edu/pbc/) Pairing-based cryptography IBE, IBNIKE, 3-party KE, IBS, BLS, PEKS, BE, ABE, … https://github.com/blynn/pbc

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

Libraries C/C++ Libraries MIRACL PBC Multiprecision Integer and Rational Arithmetic Cryptographic Library https://github.com/CertiVox/MIRACL/blob/master/README.md PBC Pairing-Based Crypto library https://github.com/blynn/pbc/blob/master/README

MIRACL Yung-Hsiang Liu ECC 2014

ECC Protocols http://people.cs.nctu.edu.tw/~rjchen/ECC2014S/31_ECCProtocols.pdf ECDSA ECDH/ECMQV ECIES ECIES-DEM ECIES-KEM ECIES-KEM-DEM

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 𝑥 𝑅 =𝑟

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 𝑃=𝑄

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 𝑦

Download MIRACL https://github.com/CertiVox/MIRACL

Build MIRACL File architecture To build the library https://github.com/CertiVox/MIRACL/blob/master/readme.txt https://github.com/CertiVox/MIRACL/blob/master/update.txt To build the library https://github.com/CertiVox/MIRACL/blob/master/first.txt Visual Studio https://github.com/CertiVox/MIRACL/blob/master/vc2005.txt Unix-like https://github.com/CertiVox/MIRACL/blob/master/linux.txt MAC https://github.com/CertiVox/MIRACL/blob/master/mac.txt

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

Examples genprime schoof ecdsa_sign ecdsa_verify

Further Reading Sample codes provided by MIRACL *.cpp Header files *.h

PBC Yung-Hsiang Liu ECC 2014

Pairing-based Cryptography http://people.cs.nctu.edu.tw/~rjchen/ECC2014S/PairingBasedCrypto.pdf Identity-based encryption Identity-based non-interactive key distribution 3-party key distribution Identity-based signature BLS short signature

What PBC Provides Big number Finite field arithmetic Extension field arithmetic Elliptic curve group law Bilinear pairings Tate pairing Miller’s algorithm Polynomial evaluation

Download MIRACL http://crypto.stanford.edu/pbc/download.html

Build MIRACL To build the library Windows binaries and DLL https://github.com/blynn/pbc/blob/master/INSTALL Windows binaries and DLL http://crypto.stanford.edu/pbc/files/pbc-0.5.14-win32-bin.zip

Build MIRACL on Ubuntu Download from official website Save as pbc-0.5.14.tar.gz tar xf pbc-0.5.14.tar.gz ./configure make .libs/libpbc.* make install

Examples BLS short signature Identity-based non-interactive key distribution 3-party key distribution Identity-based encryption Identity-based signature

More Applications Searchable encryption Broadcast encryption Attribute-based encryption

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