Encryption § Digital Signature § Anonymity Protocols § Etc
Total Page:16
File Type:pdf, Size:1020Kb
CS 2, Conference of PhD Students in Computer Science 4th July, 2002. Efficiency Analysis and Comparison of Public Key Algorithms Csilla Endrodi BUTE DMIS, Ph.D. student [email protected] S E A R C H Laboratory ContentsContents § Public Key Algorithms – Existing Algorithms – Differences – RSA – ECC § Analysis and Comparison – The Measured Data – The Correspondence for the Comparison – Software Implementation and Measuring Environment § Results – Time of Execution – Size of Data Files § Summary 2. PublicPublic KeyKey AlgorithmsAlgorithms There exist several public key algorithms. Mathematical Hard Problems: § Integer Factorisation Problem (IFP) § Discrete Logarithm Problem (DLP) § Elliptic Curve Discrete Logarithm Problem (ECDLP) § Lattice Reduction – or Closest Vector Problem (CVP) § others… Data Security Functions: § Key Agreement § Encryption § Digital Signature § Anonymity Protocols § etc. Public Key Cryptography Algorithms Algorithms Based On DLP: § Diffie-Hellmann Key Agreement (DH) § Diffie-Hellmann Key Agreement 2 (DH2) § El-Gamal Encryption Scheme § Menezes-Qu-Vanstone (MQV) § Efficient Compact Subgroup Trace Representation (XTR) § Digital Signature Algorithm (DSA) § BlumGoldwasser § Zheng-Seberry § Ballare-Rogaway § Nyberg-Rueppel Signature Scheme § Schnorr Algorithms based on IFP: § RSA § Rabin-Williams 4. Public Key Cryptography Algorithms Algorithms based on ECDLP: § Elliptic Curve Diffie-Hellmann Key Agreement (ECDH) § Elliptic Curve Menezes-Qu-Vanstone (ECMQV) § Elliptic Curve Integrated Encryption Scheme (ECIEC) § Elliptic Curve Digital Signature Algorithm (ECDSA) § Elliptic Curve Nyberg-Rueppel (ECNR) Other: § LUCDIF § LUCELG § LUCRSA § Merkle-Hellmann § Chor-Rivest § NTRU § McEliece 5. Public Key Cryptography Algorithms Algorithms based on ECDLP: § Elliptic Curve Diffie-Hellmann Key Agreement (ECDH) § Elliptic Curve Menezes-Qu-Vanstone (ECMQV) § Elliptic Curve Integrated Encryption Scheme (ECIEC) § Elliptic Curve Digital Signature Algorithm (ECDSA) § Elliptic Curve Nyberg-Rueppel (ECNR) Other: Currently most of § LUCDIF the applications § LUCELG uses RSA. § LUCRSA § Merkle-Hellmann § Chor-Rivest § NTRU § McEliece 5. Public Key Cryptography Algorithms Algorithms based on ECDLP: § Elliptic Curve Diffie-Hellmann Key Agreement (ECDH) § Elliptic Curve Menezes-Qu-Vanstone (ECMQV) § Elliptic Curve Integrated Encryption Scheme (ECIEC) § Elliptic Curve Digital Signature Algorithm (ECDSA) § Elliptic Curve Nyberg-Rueppel (ECNR) Other: Currently most of § LUCDIF the applications § LUCELG uses RSA. § LUCRSA § Merkle-Hellmann § Chor-Rivest A new promising § NTRU alternative is ECC. § McEliece 5. Public Key Cryptography Algorithms Differences Ø They accomplish the same data security functions, Ø BUT they are even not absolutely interchangeable. Differences: § Different mathematical background – Incompatible parameters (publ., sec. keypairs, common param.) – Different limitations – Different efficiency feature during their usage § The best known, general breaking algorithms are different – Different requirements for key size belonging to a defined security level 6. Public Key Cryptography Algorithms Differences Ø They accomplish the same data security functions, Ø BUT they are even not absolutely interchangeable. Differences: § Different mathematical background – Incompatible parameters (publ., sec. keypairs, common param.) – Different limitations – Different efficiency feature during their usage § The best known, general breaking algorithms are different – Different requirements for key size belonging to a defined security level Which to chose? Security level: Must be clearly defined as an assumption – Their limitations of the operation – Their efficiency characteristics (not only the key size!) 6. Public Key Cryptography Algorithms Differences Ø They accomplish the same data security functions, Ø BUT they are even not absolutely interchangeable. Differences: § Different mathematical background – Incompatible parameters (publ., sec. keypairs, common param.) – Different limitations – Different efficiency feature during their usage § The best known, general breaking algorithms are different – Different requirements for key size belonging to a defined security level Which to chose? Security level: Must be clearly defined as an assumption – Their limitations of the operation – Their efficiency characteristics (not only the key size!) How to compare them? The incompatibility of the algorithms becomes their comparison difficult. 6. Public Key Cryptography Algorithms RSA algorithm (1978) RSA Key Generation: p, q primes; m = p*q F(m) = (p-1) * (q-1) e optional: 1 £ e £ F(m); (e, F(m)) = 1 Public Key: (e, m) Secret Key: (d, m) Encryption Function: E(x) = xe mod m; ! x < m; Decryption Function: D(y) = yd mod m § It has not been broken for a quarter of century § Its security is not proved § Simple, fine mathematical background: modulo arithmetic § It had been the patent of the RSA Security Inc. up to 20 Sept. 2000. § The most wide-spread public key algorithm § Typical parameters: 512-4096-bit modulus; recommended: 1024 bit § Speed-up: choose for ‘e’ a small value (e = 65537 = 10001h) § The maximal size of data that can be encrypted in one step is determined by the modulus 7. Public Key Cryptography Algorithms ECC ECC algorithm (1985-) Common parameters: E(K) elliptic curve, B base point Secret Key: k; random number; k < order of the group Public Key: P (= BÄBÄ … ÄB = k¤B) Encryption Function : E(M) = (Y1, Y2); Y1 = r¤B; Y2 = M Ä r¤(k¤B); r random integer Decryption Function : D(Y1, Y2) = Y2 Ä (-) k¤ Y1 § Quite young § Difficult mathematical background: group over the points of EC § Breaking methods are also slower To reach a given security level a much smaller key size is needed in case of ECC than in case of RSA, that is the „security-per-key-bit” rate is higher. § Parameters: § Size of Key: 110 - 570-bit key; recommended: 160-bit. § Common parameters: recommended (ANSI, Certicom) § Speed-up: Precomputed tables for B and P. 8. Public Key Cryptography Algorithms ECC ECC algorithm (1985-) Common parameters: E(K) elliptic curve, B base point Secret Key: k; random number; k < order of the group Public Key: P (= BÄBÄ … ÄB = k¤B) Encryption Function : E(M) = (Y1, Y2); Y1 = r¤B; Y2 = M Ä r¤(k¤B); r random integer Decryption Function : D(Y1, Y2) = Y2 Ä (-) k¤ Y1 § Quite young § Difficult mathematical background: group over the points of EC § Breaking methods are also slower To reach a given security level a much smaller key size is needed in case of ECC than in case of RSA, that is the „security-per-key-bit” rate is higher. § Parameters: § Size of Key: 110 - 570-bit key; recommended: 160-bit. § Common parameters: recommended (ANSI, Certicom) § Speed-up: Precomputed tables for B and P. 8. AnalysisAnalysis andand ComparisonComparison Aims: Ø Analysis: Mapping the dependencies between the parameter setting and the efficiency features. Ø Comparison: Compare the chosen algorithms and try to specify the better one. 9. AnalysisAnalysis andand ComparisonComparison Aims: Ø Analysis: Mapping the dependencies between the parameter setting and the efficiency features. Ø Comparison: Compare the chosen algorithms and try to specify the better one. Which operations? Tests were made with ECC and with RSA during the - Key Generation - Establishment Common Parameters - Encryption - Decryption - Signing - Signature Verification 9. Analysis and Comparison Introduction of the Measurement Process The measured datas were What data? – the time of execution – and the size of data, namely: - size of the Common Parameter Files, - size of the Public and Secret Key Files, - size of the Encrypted Data Files, - size of the Signature Files The parameters of the operations are: Depending on what? - the size of the applied key - the size and content of the input data Other facts having effect for the efficiency behaviour: - In RSA the value of the exponent (little or great) - In ECC that precomputed tables were used or not - In ECC the type of the group (GF(2n) or GF(p) ); in case of GF(2n) the type of the generator polynomial (trinomial or pentanomial): ECP, EC2NT and EC2NP 10. Analysis and Comparison Analysis High number of the test cases: § Many sub-types of the algorithms § The changeable parameters and many kind of their possible values with ECC ab. 4000, with RSA more, than 2000 measures. 11. Analysis and Comparison Analysis High number of the test cases: § Many sub-types of the algorithms § The changeable parameters and many kind of their possible values with ECC ab. 4000, with RSA more, than 2000 measures. Comparison What datas to compare? Incompatible algorithms: § Different security „meaning” of the key sizes § Algorithm sub-types It had to be made correspondence with each other somehow. 11. Analysis and Comparison How to make correspondence? (1) Size of Keys: The starting assumption: The Security Level Key Size ~ Level of Security Comparison by Identical Security Level Providing Key Sizes Adequate pairs are determined on the ground of international research results. RSA (bit) ECC (bit) 512 113 768 136 1024 160 2048 282 4096 409 (2) Type of Algorithms: Can not be ordered together at all. Handled as further versions of the algorithms. RSA: 3 relevant sub-cases depending on the public exponent: e = 3; e = 65537; e = random. ECC: 3 relevant sub-cases depending on the type of the applied group: GF(p); GF(2n) trinomial; GF(2n) pentanomial. 12. Analysis and Comparison The selected software implementation: Crypto++ § Open source § Implements the required ECC and RSA