diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ac51a05..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -bazel-* diff --git a/BUILD b/BUILD deleted file mode 100644 index c9a91e9..0000000 --- a/BUILD +++ /dev/null @@ -1,171 +0,0 @@ -# Wycheproof tests - -java_library( - name = "utils", - srcs = [ - "java/com/google/security/wycheproof/EcUtil.java", - "java/com/google/security/wycheproof/RandomUtil.java", - "java/com/google/security/wycheproof/TestUtil.java", - ], -) - -common_deps = [ - ":utils", - "@gson//:Gson" -] - -test_srcs = glob(["java/com/google/security/wycheproof/testcases/*.java"]) + ["java/com/google/security/wycheproof/WycheproofRunner.java"] - -# These targets run all tests. - -load(":build_defs.bzl", "bouncycastle_all_tests", "spongycastle_all_tests") - -# Generates BouncyCastleAllTests_1_xx target for all available versions, -# plus a BouncyCastleAllTests alias for latest stable. -# -# To test latest stable: -# $ bazel test BouncyCastleAllTests -# -# To test other versions, e.g., v1.52: -# $ bazel test BouncyCastleAllTests_1_52 -# -# To test all known versions (warning, will take a long time): -# $ bazel test BouncyCastleAllTest_* -bouncycastle_all_tests( - # This test takes a long time, because key generation for DSA and DH generate new parameters. - size = "large", - srcs = ["java/com/google/security/wycheproof/BouncyCastleAllTests.java"] + test_srcs, - test_class = "com.google.security.wycheproof.BouncyCastleAllTests", - deps = common_deps, -) - -java_test( - name = "BouncyCastleAllTestsLocal", - # this target requires specifing a shell variable, thus won't work with the wildcard target patterns. - # with tags=["manual"] it'll be excluded from said patterns. - tags = ["manual"], - size = "large", - srcs = ["java/com/google/security/wycheproof/BouncyCastleAllTests.java"] + test_srcs, - test_class = "com.google.security.wycheproof.BouncyCastleAllTests", - deps = common_deps + ["@local//:bouncycastle_jar"], -) - -# Generates SpongyCastleAllTests_1_xx target for all available versions, -# plus a SpongyCastleAllTests alias for latest stable. -# -# To test latest stable: -# $ bazel test SpongyCastleAllTests -# -# To test other versions, e.g., v1.52.0.0: -# $ bazel test SpongyCastleAllTests_1_52 -# -# To test all known versions (warning, will take a long time): -# $ bazel test SpongyCastleAllTests_* -spongycastle_all_tests( - # This test takes a long time, because key generation for DSA and DH generate new parameters. - size = "large", - srcs = ["java/com/google/security/wycheproof/SpongyCastleAllTests.java"] + test_srcs, - test_class = "com.google.security.wycheproof.SpongyCastleAllTests", - deps = common_deps, -) - -# These targets exclude slow tests. - -load(":build_defs.bzl", "bouncycastle_tests", "spongycastle_tests") - -# Generates BouncyCastleTest_1_xx target for all available versions, -# plus a BouncyCastleTest alias for latest stable. -# -# To test latest stable: -# $ bazel test BouncyCastleTest -# -# To test other versions, e.g., v1.52: -# $ bazel test BouncyCastleTest_1_52 -# -# To test all known versions: -# $ bazel test BouncyCastleTest_* -bouncycastle_tests( - size = "large", - srcs = ["java/com/google/security/wycheproof/BouncyCastleTest.java"] + test_srcs, - test_class = "com.google.security.wycheproof.BouncyCastleTest", - deps = common_deps, -) - -java_test( - name = "BouncyCastleTestLocal", - # this target requires specifing a shell variable, thus won't work with the wildcard target patterns. - # with tags=["manual"] it'll be excluded from said patterns. - tags = ["manual"], - size = "large", - srcs = ["java/com/google/security/wycheproof/BouncyCastleTest.java"] + test_srcs, - test_class = "com.google.security.wycheproof.BouncyCastleTest", - deps = common_deps + ["@local//:bouncycastle_jar"], -) - -# Generates SpongyCastleTest_1_xx target for all available versions, -# plus a SpongyCastleTest alias for latest stable. -# -# To test latest stable: -# $ bazel test SpongyCastleTest -# -# To test other versions, e.g., v1.52.0.0: -# $ bazel test SpongyCastleTest_1_52 -# -# To test all known versions: -# $ bazel test SpongyCastleTest_* -spongycastle_tests( - size = "large", - srcs = ["java/com/google/security/wycheproof/SpongyCastleTest.java"] + test_srcs, - test_class = "com.google.security.wycheproof.SpongyCastleTest", - deps = common_deps, -) - -# OpenJDK tests -java_test( - name = "OpenJDKTest", - size = "large", - srcs = ["java/com/google/security/wycheproof/OpenJDKTest.java"] + test_srcs, - test_class = "com.google.security.wycheproof.OpenJDKTest", - deps = common_deps, -) - -java_test( - name = "OpenJDKAllTests", - size = "large", - srcs = ["java/com/google/security/wycheproof/OpenJDKAllTests.java"] + test_srcs, - test_class = "com.google.security.wycheproof.OpenJDKAllTests", - deps = common_deps, -) - -# Platform-independent tests -java_test( - name = "ProviderIndependentTest", - size = "small", - srcs = ["java/com/google/security/wycheproof/ProviderIndependentTest.java"] + test_srcs, - deps = common_deps, -) - -# Tests using JSON formated test vectors. -testvectors = [ - "//testvectors:aes_gcm", - "//testvectors:aes_gcm_siv", - "//testvectors:dsa", - "//testvectors:ecdsa", - "//testvectors:rsa_signature", -] - -java_test( - name = "JsonTest", - size = "small", - srcs = ["java/com/google/security/wycheproof/JsonTest.java"] + test_srcs, - data = testvectors, - deps = common_deps, -) - -# Load closure rules -load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_deps") - -closure_js_deps( - name = "E2EDeps", - deps = ["@e2e//:E2E"], -) \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index fa97ad3..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,43 +0,0 @@ -Want to contribute? Great! First, read this page (including the small print at -the end). - -### Before you contribute -Before we can use your code, you must sign the -[Google Individual Contributor License Agreement] -(https://cla.developers.google.com/about/google-individual) -(CLA), which you can do online. The CLA is necessary mainly because you own the -copyright to your changes, even after your contribution becomes part of our -codebase, so we need your permission to use and distribute your code. We also -need to be sure of various other things—for instance that you'll tell us if you -know that your code infringes on other people's patents. You don't have to sign -the CLA until after you've submitted your code for review and a member has -approved it, but you must do it before we can put your code into our codebase. -Before you start working on a larger contribution, you should get in touch with -us first through the issue tracker with your idea so that we can help out and -possibly guide you. Coordinating up front makes it much easier to avoid -frustration later on. - -### Disclosure -If your tests uncover security vulnerabilities, please first report directly to -the maintainers of the libraries. You should only submit tests to us once the -bugs have been acknowledged or fixed. - -Google has several -[security reward programs](https://www.google.com/about/appsecurity/programs-home/) -that provide cash rewards for quality security research that identifies or fixes -security vulnerabilities in products that we provide or proactive security -improvements to select open-source products. If your tests found or helped fix -vulnerabilities that are in scope you should submit them to these programs. - -If you have any question with regard to disclosure, please email us at -security@google.com. - -### Code reviews -All submissions, including submissions by project members, require review. We -use GitHub pull requests for this purpose. - -### The small print -Contributions made by corporations are covered by a different agreement than -the one above, the -[Software Grant and Corporate Contributor License Agreement] -(https://cla.developers.google.com/about/google-corporate). \ No newline at end of file diff --git a/E2E.BUILD b/E2E.BUILD deleted file mode 100644 index 838f580..0000000 --- a/E2E.BUILD +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "E2E", - visibility = ["//visibility:public"], - srcs = glob( - ["src/**/*.js"], - exclude = [ - "src/**/*test.js", - "src/**/*tester.js", - "src/**/*testdata.js", - "src/**/testing/*.js", - "src/**/testing.js"], - ) -) \ No newline at end of file diff --git a/Gson.BUILD b/Gson.BUILD deleted file mode 100644 index fa5f6c5..0000000 --- a/Gson.BUILD +++ /dev/null @@ -1,5 +0,0 @@ -java_library( - name = "Gson", - visibility = ["//visibility:public"], - srcs = glob(["gson/src/main/**/*.java"]) -) \ No newline at end of file diff --git a/LICENSE b/LICENSE index 7a4a3ea..f0f8fa1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,202 +1,13 @@ +Copyright 2016 Google Inc. All Rights Reserved. - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + http://www.apache.org/licenses/LICENSE-2.0 - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/README.google b/README.google new file mode 100644 index 0000000..ffe5ea1 --- /dev/null +++ b/README.google @@ -0,0 +1,12 @@ +URL: https://cs.corp.google.com/piper///depot/google3/third_party/wycheproof +Version: 0.1 +License: Apache 2.0 +License File: LICENSE + +Description: +Developed by Google, Wycheproof is a set of unit tests that check for well-known +vulnerabilities in crypto libraries, e.g., Sun JCE, Bouncy Castle, Conscrypt, +OpenSSL, pycrypto, M2Crypto, etc. + +Local Modifications: +None. diff --git a/README.md b/README.md deleted file mode 100644 index 9e31546..0000000 --- a/README.md +++ /dev/null @@ -1,220 +0,0 @@ -# Project Wycheproof -https://github.com/google/wycheproof - -*Project Wycheproof is named after -[Mount Wycheproof](https://en.wikipedia.org/wiki/Mount_Wycheproof), the smallest -mountain in the world. The main motivation for the project is to have a goal -that is achievable. The smaller the mountain the more likely it is to be able to -climb it.* - -[TOC] - -## Introduction - -Project Wycheproof tests crypto libraries against known attacks. It is developed -and maintained by members of Google Security Team, but it is not an official -Google product. - -At Google, we rely on many third party cryptographic software libraries. -Unfortunately, in cryptography, subtle mistakes can have catastrophic -consequences, and we found that libraries fall into such implementation -pitfalls much too often and for much too long. Good implementation guidelines, -however, are hard to come by: understanding how to implement cryptography -securely requires digesting decades' worth of academic literature. We recognize -that software engineers fix and prevent bugs with unit testing, and we found -that cryptographic loopholes can be resolved by the same means. - -These observations have prompted us to develop Project Wycheproof, a collection -of unit tests that detect known weaknesses or check for expected behaviors of -some cryptographic algorithm. Project Wycheproof provides tests for most -cryptographic algorithms, including RSA, elliptic curve crypto and -authenticated encryption. Our cryptographers have systematically surveyed the -literature and implemented most known attacks. We have over 80 test cases which -have uncovered more than [40 bugs](doc/bugs.md). For -example, we found that we could recover the private key of widely-used DSA and -ECDHC implementations. - -While we are committed to develop as many attacks as possible, Project -Wycheproof is by no means complete. Passing the tests does not imply that the -library is secure, it just means that it is not vulnerable to the attacks that -Project Wycheproof tests for. Cryptographers are also constantly discovering -new attacks. Nevertheless, with Project Wycheproof developers and users now can -check their libraries against a large number of known attacks, without having -to spend years reading academic papers or become cryptographers themselves. - -For more information on the goals and strategies of Project Wycheproof, please -check out our [doc](doc/). - -### Coverage - -Project Wycheproof has tests for the most popular crypto algorithms, including - -- AES-EAX -- AES-GCM -- [DH](doc/dh.md) -- DHIES -- [DSA](doc/dsa.md) -- [ECDH](doc/ecdh.md) -- ECDSA -- ECIES -- [RSA](doc/rsa.md) - -The tests detect whether a library is vulnerable to many attacks, including - -- Invalid curve attacks -- Biased nonces in digital signature schemes -- Of course, all Bleichenbacher’s attacks -- And many more -- we have over 80 test cases - -Our first set of tests are written in Java, because Java has a common -cryptographic interface. This allowed us to test multiple providers with a -single test suite. While this interface is somewhat low level, and should not -be used directly, we still apply a "defense in depth" argument and expect that -the implementations are as robust as possible. For example, we consider weak -default values to be a significant security flaw. We are converting as many -tests into sets of test vectors to simplify porting the tests to other -languages. We provide ready-to-use test runners for Java Cryptography -Architecture providers such as [Bouncy Castle](http://bouncycastle.org), -[Spongy Castle](https://rtyley.github.io/spongycastle/), and the default -providers in [OpenJDK](http://openjdk.java.net/). - -### Usage - -- Install [Bazel](https://bazel.build/). - -- Install [Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction - Policy - Files](http://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters): - this enables tests with large key sizes. Otherwise you'll see a lot of - "illegal key size" exceptions. - -- Check out the tests - -``` -git clone https://github.com/google/wycheproof.git -``` - -- To test latest stable version of Bouncy Castle: - -``` -bazel test BouncyCastleAllTests -``` - -- To test other versions, e.g., v1.52: - -``` -bazel test BouncyCastleAllTests_1_52 -``` - -- To test all known versions (warning, will take a long time): - -``` -bazel test BouncyCastleAllTests_* -``` - -- To test a local jar, set the `WYCHEPROOF_BOUNCYCASTLE_JAR` environment - variable: - -```shell -$ WYCHEPROOF_BOUNCYCASTLE_JAR=/path/to/bouncycastle -$ bazel test BouncyCastleTestLocal -$ bazel test BouncyCastleAllTestsLocal -``` - -Note: bazel does not currently invalidate the build on environment changes. If -you change the `WYCHEPROOF_BOUNCYCASTLE_JAR` environment variable, run `bazel -clean` to force a rebuild: - -```shell -$ WYCHEPROOF_BOUNCYCASTLE_JAR=/path/to/bouncycastle -$ bazel test BouncyCastleTestLocal -$ WYCHEPROOF_BOUNCYCASTLE_JAR=/path/to/other/jar -$ bazel clean -$ bazel test BouncyCastleTestLocal -``` - -- To test [Spongy Castle](https://rtyley.github.io/spongycastle/), replace -BouncyCastle with SpongyCastle in your commands, for example - -``` -bazel test SpongyCastleAllTests -``` - -- To test your current installation of -[OpenJDK](http://openjdk.java.net/): - -``` -bazel test OpenJDKAllTests -``` - -Note that OpenJDKAllTests expects that OpenJDK is your default JDK, so it might -refuse to run or its results might be incorrect if you are using some other JDK. -If you downloaded your JDK from Oracle or https://java.com, you're probably -using Oracle JDK, which should be compatible with OpenJDK, thus the tests should -run correctly. - -Some tests take a very long time to finish. If you want to exclude them, use -BouncyCastleTest, SpongyCastleTest or OpenJDKTest -- these targets exclude all -slow tests (which are annotated with @SlowTest). - -Most test targets are failing, and each failure might be a security issue. To -learn more about what a failed test means, you might want to check out [our -documentation](doc/bugs.md) or the comments on top of the corresponding test -function and test class. - -- To test [Web Cryptography API](https://www.w3.org/TR/WebCryptoAPI/), you first need -to compile [End-to-end](https://github.com/google/end-to-end) because our tests depend on it: - -``` -bazel build E2EDeps -``` - -Since Web Cryptography API works on web browsers, you then need to run a simple web server in your local machine by running, for example: - -``` -python -m SimpleHTTPServer -``` - -Now assuming that your source code folder's name is "wycheproof", open the web browsers -that you want to test and point it to: - -``` -http://localhost:8000/bazel-wycheproof/javascript/webcryptoapi/WebCryptoTest.html -``` - -We have tested Chrome, Firefox, and Microsoft Edge. - -### Hall of Bugs - -Here are some of the notable vulnerabilities that are uncovered by -Project Wycheproof: - -- OpenJDK's SHA1withDSA leaks private keys > 1024 bits - - Test: testBiasSha1WithDSA in -[DsaTest](https://github.com/google/wycheproof/blob/master/java/com/google/security/wycheproof/testcases/DsaTest.java). - - This bug is the same as -[CVE-2003-0971 - GnuPG generated ElGamal signatures that leaked the private key] -(https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2003-0971). - -- Bouncy Castle's ECDHC leaks private keys - - Test: testModifiedPublic and testWrongOrderEcdhc in -[EcdhTest](https://github.com/google/wycheproof/blob/master/java/com/google/security/wycheproof/testcases/EcdhTest.java). - -### Maintainers - -Project Wycheproof is maintained by: - -- Daniel Bleichenbacher -- Thai Duong -- Emilia Kasper -- Quan Nguyen - -### Contact and mailing list - -If you want to contribute, please read [CONTRIBUTING](CONTRIBUTING.md) and send -us pull requests. You can also report bugs or request new tests. - -If you'd like to talk to our developers or get notified about major new -tests, you may want to subscribe to our -[mailing list](https://groups.google.com/forum/#!forum/wycheproof-users). To -join, simply send an empty mail to wycheproof-users+subscribe@googlegroups.com. diff --git a/WORKSPACE b/WORKSPACE deleted file mode 100644 index 74a966e..0000000 --- a/WORKSPACE +++ /dev/null @@ -1,154 +0,0 @@ -# for javascript -http_archive( - name = "io_bazel_rules_closure", - strip_prefix = "rules_closure-master", - urls = [ - "https://github.com/bazelbuild/rules_closure/archive/master.zip", - ], -) - -load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories") - -closure_repositories() - -# Google End-to-end -new_http_archive( - name = "e2e", - strip_prefix = "end-to-end-a77a8cbd13157139437219a8c87a7e133457c2e7", - sha256 = "1c0d3678a649c75254e035985a209b9e292befdec733af0a4ad3842acef271eb", - url = "https://github.com/google/end-to-end/archive/a77a8cbd13157139437219a8c87a7e133457c2e7.zip", - build_file = "//:E2E.BUILD" -) - -# Google GSON -new_http_archive( - name = "gson", - strip_prefix = "gson-gson-parent-2.8.1", - sha256 = "5b64446a14ee5b29ab62f1bc0341631c20073e141b724afc410aa66dff6d7f2e", - url = "https://github.com/google/gson/archive/gson-parent-2.8.1.tar.gz", - build_file = "//:Gson.BUILD" -) - -maven_jar( - name = "bouncycastle_1_46", - artifact = "org.bouncycastle:bcprov-jdk15on:1.46", -) - -maven_jar( - name = "bouncycastle_1_47", - artifact = "org.bouncycastle:bcprov-jdk15on:1.47", -) - -maven_jar( - name = "bouncycastle_1_48", - artifact = "org.bouncycastle:bcprov-jdk15on:1.48", -) - -maven_jar( - name = "bouncycastle_1_49", - artifact = "org.bouncycastle:bcprov-jdk15on:1.49", -) - -maven_jar( - name = "bouncycastle_1_50", - artifact = "org.bouncycastle:bcprov-jdk15on:1.50", -) - -maven_jar( - name = "bouncycastle_1_51", - artifact = "org.bouncycastle:bcprov-jdk15on:1.51", -) - -maven_jar( - name = "bouncycastle_1_52", - artifact = "org.bouncycastle:bcprov-jdk15on:1.52", -) - -maven_jar( - name = "bouncycastle_1_53", - artifact = "org.bouncycastle:bcprov-jdk15on:1.53", -) - -maven_jar( - name = "bouncycastle_1_54", - artifact = "org.bouncycastle:bcprov-jdk15on:1.54", -) - -maven_jar( - name = "bouncycastle_1_55", - artifact = "org.bouncycastle:bcprov-jdk15on:1.55", -) - -maven_jar( - name = "bouncycastle_1_56", - artifact = "org.bouncycastle:bcprov-jdk15on:1.56", -) - -maven_jar( - name = "bouncycastle_1_57", - artifact = "org.bouncycastle:bcprov-jdk15on:1.57", -) - -maven_jar( - name = "bouncycastle_1_58", - artifact = "org.bouncycastle:bcprov-jdk15on:1.58", -) - -maven_jar( - name = "bouncycastle_1_59", - artifact = "org.bouncycastle:bcprov-jdk15on:1.59", -) - -maven_jar( - name = "spongycastle_core_1_50", - artifact = "com.madgag.spongycastle:core:1.50.0.0", -) - -maven_jar( - name = "spongycastle_prov_1_50", - artifact = "com.madgag.spongycastle:prov:1.50.0.0", -) - -maven_jar( - name = "spongycastle_core_1_51", - artifact = "com.madgag.spongycastle:core:1.51.0.0", -) - -maven_jar( - name = "spongycastle_prov_1_51", - artifact = "com.madgag.spongycastle:prov:1.51.0.0", -) - -maven_jar( - name = "spongycastle_core_1_52", - artifact = "com.madgag.spongycastle:core:1.52.0.0", -) - -maven_jar( - name = "spongycastle_prov_1_52", - artifact = "com.madgag.spongycastle:prov:1.52.0.0", -) - -maven_jar( - name = "spongycastle_core_1_53", - artifact = "com.madgag.spongycastle:core:1.53.0.0", -) - -maven_jar( - name = "spongycastle_prov_1_53", - artifact = "com.madgag.spongycastle:prov:1.53.0.0", -) - -maven_jar( - name = "spongycastle_core_1_54", - artifact = "com.madgag.spongycastle:core:1.54.0.0", -) - -maven_jar( - name = "spongycastle_prov_1_54", - artifact = "com.madgag.spongycastle:prov:1.54.0.0", -) - -load(":local_repository_defs.bzl", "local_jars") - -local_jars(name = "local") diff --git a/build_defs.bzl b/build_defs.bzl deleted file mode 100644 index 1d874a1..0000000 --- a/build_defs.bzl +++ /dev/null @@ -1,119 +0,0 @@ -bouncycastle_versions = range(49, 60) - -# These targets run all tests. -def bouncycastle_all_tests(srcs, deps, size, test_class): - """BouncyCastle version-specific tests.""" - - # Generates BouncyCastleAllTests_1_59, ..., BouncyCastleAllTests_1_49 - for version in bouncycastle_versions: - native.java_test( - name = "BouncyCastleAllTests_1_%s" % version, - srcs = srcs, - deps = deps + [ - "@bouncycastle_1_%s//jar" % version, - ], - size = size, - test_class = test_class, - ) - - # Latest stable. - # We can't use native.alias, because aliased tests are not run. - # So, we simply duplicate the test. - native.java_test( - name = "BouncyCastleAllTests", - srcs = srcs, - deps = deps + ["@bouncycastle_1_%s//jar" % max(bouncycastle_versions)], - size = size, - test_class = test_class, - ) - -# These targets exclude slow tests. -def bouncycastle_tests(srcs, deps, size, test_class): - """BouncyCastle version-specific tests.""" - - # Generates BouncyCastleTest_1_59, ..., BouncyCastleTest_1_49 - for version in bouncycastle_versions: - native.java_test( - name = "BouncyCastleTest_1_%s" % version, - srcs = srcs, - deps = deps + [ - "@bouncycastle_1_%s//jar" % version, - ], - size = size, - test_class = test_class, - ) - - # Latest stable. - # We can't use native.alias, because aliased tests are not run. - # So, we simply duplicate the test. - native.java_test( - name = "BouncyCastleTest", - srcs = srcs, - deps = deps + ["@bouncycastle_1_%s//jar" % max(bouncycastle_versions)], - size = size, - test_class = test_class, - ) - -spongycastle_versions = range(50, 55) - -# These targets run all tests. -def spongycastle_all_tests(srcs, deps, size, test_class): - """SpongyCastle version-specific tests.""" - - # Generates SpongyCastleAllTests_1_54, ..., SpongyCastleAllTests_1_50 - for version in spongycastle_versions: - native.java_test( - name = "SpongyCastleAllTests_1_%s" % version, - srcs = srcs, - deps = deps + [ - "@spongycastle_core_1_%s//jar" % version, - "@spongycastle_prov_1_%s//jar" % version, - ], - size = size, - test_class = test_class, - ) - - # Latest stable. - # We can't use native.alias, because aliased tests are not run. - # So, we simply duplicate the test. - native.java_test( - name = "SpongyCastleAllTests", - srcs = srcs, - deps = deps + [ - "@spongycastle_core_1_%s//jar" % max(spongycastle_versions), - "@spongycastle_prov_1_%s//jar" % max(spongycastle_versions), - ], - size = size, - test_class = test_class, - ) - -# These targets exclude slow tests. -def spongycastle_tests(srcs, deps, size, test_class): - """SpongyCastle version-specific tests.""" - - # Generates SpongyCastleTest_1_54, ..., SpongyCastleTest_1_50 - for version in spongycastle_versions: - native.java_test( - name = "SpongyCastleTest_1_%s" % version, - srcs = srcs, - deps = deps + [ - "@spongycastle_core_1_%s//jar" % version, - "@spongycastle_prov_1_%s//jar" % version, - ], - size = size, - test_class = test_class, - ) - - # Latest stable. - # We can't use native.alias, because aliased tests are not run. - # So, we simply duplicate the test. - native.java_test( - name = "SpongyCastleTest", - srcs = srcs, - deps = deps + [ - "@spongycastle_core_1_%s//jar" % max(spongycastle_versions), - "@spongycastle_prov_1_%s//jar" % max(spongycastle_versions), - ], - size = size, - test_class = test_class, - ) diff --git a/doc/bugs.md b/doc/bugs.md deleted file mode 100644 index 6d9e2c8..0000000 --- a/doc/bugs.md +++ /dev/null @@ -1,65 +0,0 @@ -# Bugs found by Project Wycheproof -See [list of issues](issues.md) for details. - -## Package OpenJDK - -| Summary | Credits | CVE | Upstream Acknowledgement | Tests | -|:---------------------------: |:--------------------------:|:-----------------:|:--------------------------------------: |:---------------------------------------: -| Biased DSA, leaks signing key | Daniel Bleichenbacher |CVE-2016-0695 | Oracle Critical Patch Update April 2016 | DsaTest: testDsaBias, testBiasSha1WithDSA | -| GCM's timing attack, leaks auth key | Quan Nguyen |CVE-2016-3426 | Oracle Critical Patch Update April 2016 | N/A | -| GCM updateAAD | Quan nguyen | N/A | Oracle Critical Patch Update April 2016 | AesGcmTest: testLateUpdateAAD | -| GCM wrapped around counter, leaks auth key | Quan Nguyen | N/A | Oracle Critical Patch Update April 2016 | AesGcmTest: testWrappedAroundCounter | -| DSA ArrayIndexOutOfBoundsException | Daniel Bleichenbacher | CVE-2016-5546 | Oracle Critical Patch Update Jan 2017 | DsaTest: testInvalidSignatures | -| RSA OutOfMemoryError | Daniel Bleichenbacher | CVE-2016-5547 | Oracle Critical Patch Update Jan 2017 | RsaSignatureTest: testVectors | -| DSA accepts modified signatures | Daniel Bleichenbacher | CVE-2016-5546 | Oracle Critical Patch Update Jan 2017 | DsaTest: testModifiedSignatures | -| DSA Timing Attack | Daniel Bleichenbacher | CVE-2016-5548 | Oracle Critical Patch Update Jan 2017 | DsaTest: testTiming | -| ECDSA accepts modified signatures| Daniel Bleichenbacher | CVE-2016-5546 | Oracle Critical Patch Update Jan 2017 | EcdsaTest: testModifiedSignatures | -| ECDSA Timing Attack | Daniel Bleichenbacher | CVE-2016-5549 | Oracle Critical Patch Update Jan 2017 | EcdsaTest: testTiming | -| Biased ECDSA | Daniel Bleichenbacher | | | Ecdsa: testBias | - -## Package Conscrypt - -| Summary | Credits | CVE | Upstream Acknowledgement | Tests | -|:---------------------------: |:--------------------------:|:-----------------:|:--------------------------------------: |:---------------------------------------: -| ECDH Invalid Curve Attack | Daniel Bleichenbacher | N/A | | EcdhTest: multiple tests | -| GCM IV reuse | Daniel Bleichenbacher | N/A | | AesGcmTest: testIvReuse | -| GCM weak default tag length | Quan Nguyen | N/A | | AesGcmTest: testDefaultTagSizeIvParameterSpec | - - -## Package BouncyCastle v1.55 and older -| Summary | Credits | CVE | Upstream Acknowledgement | Tests | -|:---------------------------: |:--------------------------:|:-----------------:|:--------------------------------------: |:---------------------------------------: -| v1.55 ECDH upstream fix was incomplete | Daniel Bleichenbacher | N/A | | Ecdh: multiple tests | -| ECDHC Invalid curve attack | Daniel Bleichenbacher | N/A | | EcdhTest: testModifiedPublic,testModifiedPublicSpec, testWrongOrder | -| v1.55 PKCS #1 RSA is more vulnerable to CCA attack | Daniel Bleichenbacher | N/A | | RsaTest: testExceptions | -| Dhies uses unsafe ECB mode | Daniel Bleichenbacher | CVE-2016-1000344 | | DhiesTest | -| ECIES use unsafe ECB mode by default for "ECIESWithAES" or "ECIESwithDESede" | Daniel Bleichenbacher | CVE-2016-1000352 | | EciesTest: testNotEcb, testDefaultEcies| -| 1.52 ECIESWithAES-CBC is vulnerable to padding oracle attack | Daniel Bleichenbacher | CVE-2016-1000345 | | EciesTest: testExceptions | -| GCM reuses IV after doFinal() | Daniel Bleichenbacher | N/A | | | -| ECDSA accepts invalid signatures | Daniel Bleichenbacher | CVE-2016-1000342 | | EcdsaTest: testModifiedSignatures | -| DSA accepts invalid signatures | Daniel Bleichenbacher | CVE-2016-1000338 | | DsaTest: testModifiedsignatures | -| DSA generates weak key | Daniel Bleichenbacher | CVE-2016-1000343 | | DsaTest: testKeyGeneration | -| Allows invalid DH public key | Daniel Bleichenbacher | CVE-2016-1000346 | | DhTest: incomplete | -| DSA timing attacks | Daniel Bleichenbacher | CVE-2016-1000341 | | DsaTest: testTiming | -| GCM Wrapped Around Counter | Quan Nguyen | CVE-2015-6644 | Nexus Security Bullentin Jan 2016 | AesGcmTest: testWrappedAroundCounter | - -## Package Go JOSE (https://github.com/square/go-jose) -| Summary | Credits | CVE | Upstream Acknowledgement | Tests | -|:---------------------------: |:--------------------------:|:-----------------:|:--------------------------------------: |:---------------------------------------: -| ECDH Invalid Curve Attack | Quan Nguyen | CVE-2016-9121 | $5500 total by Square Inc. for all bugs | To be released | -| Multiple signatures, auth bypass | Quan Nguyen | CVE-2016-9122 | | To be released | -| Integer overflow, HMAC bypass | Quan Nguyen | CVE-2016-9123 | | To be released | -| Accepts embedded HMAC key | Quan Nguyen | N/A | | To be released | - -## Package Go crypto -| Summary | Credits | CVE | Upstream Acknowledgement | Tests | -|:---------------------------: |:--------------------------:|:-----------------:|:--------------------------------------: |:---------------------------------------: -| GCM wrapped around counter | Quan Nguyen | N/A | goo.gl/OdhZcY | - -## Package Nimbus JOSE+JWT (https://connect2id.com/products/nimbus-jose-jwt) -| Summary | Credits | CVE | Upstream Acknowledgement | Tests | -|:---------------------------: |:--------------------------:|:-----------------:|:--------------------------------------: |:---------------------------------------: -| CBC-HMAC is vulnerable to padding oracle attack | Quan Nguyen | N/A | https://goo.gl/ACZQeI | To be released -| CBC-HMAC integer overflow, HMAC bypass | Quan Nguyen | N/A | https://goo.gl/ACZQeI | To be released - - diff --git a/doc/dh.md b/doc/dh.md deleted file mode 100644 index ca8c410..0000000 --- a/doc/dh.md +++ /dev/null @@ -1,141 +0,0 @@ -# Diffie-Hellman - -## Subgroup confinement attacks - -The papers by van Oorshot and Wiener [OW96] rsp. Lim and Lee [LL98] show that -Diffie-Hellman keys can be found much faster if the short exponents are used and -if the multiplicative group modulo p contains small subgroups. In particular an -attacker can try to send a public key that is an element of a small subgroup. If -the receiver does not check for such elements then may be possible to find the -private key modulo the order of the small subgroup. Several countermeasures -against such attacks have been proposed: For example IKE uses fields of order p -where p is a safe prime (i.e. $$q=(p-1)/2),$$ hence the only elements of small -order are 1 and p-1. - -[NIST SP 800-56A] rev. 2, Section 5.5.1.1 only requires that the size of the -subgroup generated by the generator g is big enough to prevent the baby-step -giant-step algorithm. I.e. for 80-bit security p must be at least 1024 bits long -and the prime q must be at least 160 bits long. A 2048 bit prime p and a 224 bit -prime q are sufficient for 112 bit security. To avoid subgroup confinment -attacks NIST requires that public keys are validated, i.e. by checking that a -public key y satisfies the conditions $$2 \leq y \leq p-2$$ and $$y^q \mod p = -1$$ (Section 5.6.2.3.1). Further, after generating the shared secret $$z = -y_a^{x_b} \mod p$$ each party should check that $$z \neq 1.$$ RFC 2785 contains -similar recommendations. The public key validation described by NIST requires -that the order q of the generator g is known to the verifier. Unfortunately, the -order q is missing in [PKCS #3]. [PKCS #3] describes the Diffie-Hellman -parameters only by the values p, g and optionally the key size in bits. - -The class DHParameterSpec that defines the Diffie-Hellman parameters in JCE -contains the same values as [PKCS #3]. In particular, it does not contain the -order of the subgroup q. Moreover, the SUN provider uses the minimal sizes -specified by NIST for q. Essentially the provider reuses the parameters for DSA. - -Therefore, there is no guarantee that an implementation of Diffie-Hellman is secure against -subgroup confinement attacks. Without a key validation it is insecure to use the key-pair -generation from [NIST SP 800-56A] Section 5.6.1.1 (The key-pair generation there only requires that -static and ephemeral private keys are randomly chosen in the range \\(1..q-1)\\). - -To avoid big disasters the tests below require that key sizes are not minimal. I.e., currently -the tests require at least 512 bit keys for 1024 bit fields. We use this lower limit because that -is what the SUN provider is currently doing. - -TODO(bleichen): Find a reference supporting or disproving that decision. - -## Weak parameters - -The DH parameters must be carefully chosen to avoid security issues. A panel at -Eurocrypt'92 discussed the possiblity of trapdoors in DL based primitives -[Eurocrypt92 panel]. A. Lenstra pointed out that the primes chould be chosen -such that the special number field sieve can be used to compute discrete -logarithms. Gordon has analyzed methods to generate and detect weak parameters -[G92]. Section 4 of Gordons paper describes a method that can detect some -special cases, but no general method was given. Recently Fried et al. showed -that 1024 bit discrete logarithms with the special number field sieve are -feasible [FGHT16]. Moreover some libraries use primes that are susceptible to -this attack [FGHT16]. - -TODO(bleichen): So far not test for weak DH parameters has been implemented. -Possibly we should at least implement a test that detects special cases, so -that weak primes (such as the one used in libtomcrypt) are detected. - -DH implementations are sometimes misconfigured. Adrian et al. [WeakDh] analyzed -various implementations and found for example the following problems in the -parameters: p is sometimes composite, p-1 contains no large prime factor, q is -used instead of the generator g. - -## References -[Eurocrypt92 panel]: "The Eurocrypt'92 Controversial Issue Trapdoor Primes and Moduli", -EUROCRYPT '92, LNCS 658, pp. 194-199. - -[G92]: D. M. Gordon. "Designing and detecting trapdoors for discrete log -cryptosystems." CRYPTO’92, pp. 66–75. - -\[FGHT16]: J. Fried, P. Gaudry, N. Heininger, E. Thome. "A kilobit hidden SNFS -discrete logarithm computation". http://eprint.iacr.org/2016/961.pdf - -[OW96]: P. C. van Oorschot, M. J. Wiener, "On Diffie-Hellman key agreement with short exponents", -Eurocrypt 96, pp 332–343. - -[LL98]: C.H. Lim and P.J. Lee, -"A key recovery attack on discrete log-based schemes using a prime order subgroup", -CRYPTO' 98, pp 249–263. - -[WeakDh]: D. Adrian, K. Bhargavan, Z. Durumeric, P. Gaudry, M. Green, -J. A. Halderman, N. Heninger, D. Springall, E. Thomé, Luke Valenta, -B. VanderSloot, E. Wustrow, S. Zanella-Béguelink, P. Zimmermann, -"Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice" -https://weakdh.org/imperfect-forward-secrecy-ccs15.pdf - -[NIST SP 800-56A], revision 2, May 2013 -http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar2.pdf - -[PKCS #3]: "Diffie–Hellman Key Agreement", -http://uk.emc.com/emc-plus/rsa-labs/standards-initiatives/pkcs-3-diffie-hellman-key-agreement-standar.htm - -[RFC 2785]: R. Zuccherato, -"Methods for Avoiding 'Small-Subgroup' Attacks on the Diffie-Hellman Key Agreement Method for S/MIME", -March 2000 -https://www.ietf.org/rfc/rfc2785.txt - - diff --git a/doc/dsa.md b/doc/dsa.md deleted file mode 100644 index 0c2f631..0000000 --- a/doc/dsa.md +++ /dev/null @@ -1,192 +0,0 @@ -# DSA - -[TOC] - -The digital signature algorithm (DSA) is one of three signature schemes -descripted in the digital signature standard [DSS]. - -## Key generation - -4.2 Selection of Parameter Sizes and Hash Functions for DSA -The DSS specifies the following choices for the pair (L,N), -where L is the size of p in bits and N is the size of q in bits: - -L | N ----:|----: -1024| 160 -2048| 224 -2048| 256 -3072| 256 - -The tests expect the following properties of the parameters used during -key generation: - -* If only the parameter L is specified by the caller then N should be one - of the options proposed in [DSS]. -* If no size is specified then L should be at least 2048. This is the minimal - key size recommended by NIST for the period up to the year 2030. - -## Signature generation - -The DSA signature algorithm requires that each signature is computed with a new -one-time secret k. This secret value should be close to uniformly distributed. -If that is not the case then DSA signatures can leak the private key that was -used to generate the signature. Two methods for generating the one-time secrets -are described in FIPS PUB 186-4, Section B.5.1 or B.5.2 [DSS]. There is also the -possibility that the use of mismatched implementations for key generation and -signature generation are leaking the private keys. - -## Signature verification - -A DSA signature is a DER encoded tuple of two integers (r,s). To verify a -signature the verifier first checks $$0 < r < q$$ and $$0 < s < q$$. The -verifier then computes: - -$$ -\begin{array}{l} -w=s^{-1} \bmod q\\ -u1 = w \cdot H(m) \bmod q\\ -u2 = w \cdot r \bmod q\\ -\end{array} -$$ - -and then verifies that \\(r = (g^{u1}y^{u2} \bmod p) \bmod q\\) - -## Incorrect computations and range checks. - -Some libraries return 0 as the modular inverse of 0 or q. -This can happen if the library computes the modular -inverse of s as \\(w=s^{q-2} \mod q\\) (gpg4browsers) of simply -if the implementations is buggy (pycrypto). if additionally to such -a bug the range of r,s is not or incorrectly tested then it might -be feasible to forge signatures with the values (r=1, s=0) or (r=1, s=q). -In particular, if a library can be forced to compute \\(s^{-1} \mod q = 0\\) -then the verification would compute \\( w = u1 = u2 = 0 \\) and hence -\\( (g^{u1}y^{u2} \mod p) \mod q = 1 .\\) - -## Timing attacks - -TBD - -# Some notable failures of crypto libraries. - -## JDK - -The jdk8 implementation of SHA1withDSA previously checked the key size as follows: - -```java -@Override - protected void checkKey(DSAParams params) - throws InvalidKeyException { - int valueL = params.getP().bitLength(); - if (valueL > 1024) { - throw new InvalidKeyException("Key is too long for this algorithm"); - } - } -``` - -This check was reasonable, it partially ensures conformance with the NIST -standard. In most cases would prevent the attack described above. - -However, Oracle released a patch that removed the length verification in DSA in -jdk9: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/edd7a67585a5 -https://bugs.openjdk.java.net/browse/JDK-8039921 - -The new code is here: -http://hg.openjdk.java.net/jdk9/dev/jdk/file/edd7a67585a5/src/java.base/share/classes/sun/security/provider/DSA.java - -The change was further backported to jdk8: -http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/3212f1631643 - -Doing this was a serious mistake. It easily allowed incorrect implementations. -While generating 2048 bit DSA keys in jdk7 was not yet supported, doing so in -jdk8 is. To trigger this bug in jdk7 an application had to use a key generated -by a third party library (e.g. OpenSSL). Now, it is possible to trigger the bug -just using JCE. Moreover, the excessive use of default values in JCE makes it -easy to go wrong and rather difficult to spot the errors. - -The bug was for example triggered by the following code snippet: - -```java - KeyPairGenerator keygen = KeyPairGenerator.getInstance("DSA"); - Keygen.initialize(2048); - KeyPair keypair = keygen.genKeyPair(); - Signature s = Signature.getInstance("DSA"); - s.initSign(keypair.getPrivate()); -``` - -The first three lines generate a 2048 bit DSA key. 2048 bits is currently the -smallest key size recommended by NIST. - -```java - KeyPairGenerator keygen = KeyPairGenerator.getInstance("DSA"); - Keygen.initialize(2048); - KeyPair keypair = keygen.genKeyPair(); -``` - -The key size specifies the size of p but not the size of q. The NIST standard -allows either 224 or 256 bits for the size of q. The selection typically depends -on the library. The Sun provider uses 224. Other libraries e.g. OpenSSL -generates by default a 256 bit q for 2048 bit DSA keys. - -The next line contains a default in the initialization - -```java - Signature s = Signature.getInstance("DSA"); -``` -This line is equivalent to - -```java - Signature s = Signature.getInstance("SHA1withDSA"); -``` -Hence the code above uses SHA1 but with DSA parameters generated for SHA-224 -or SHA-256 hashes. Allowing this combination by itself is already a mistake, -but a flawed implementaion made the situation even worse. - -The implementation of SHA1withDSA assumeed that the parameter q is 160 bits -long and used this assumption to generate a random 160-bit k when generating a -signature instead of choosing it uniformly in the range (1,q-1). -Hence, k severely biased. Attacks against DSA with biased k are well known. -Howgrave-Graham and Smart analyzed such a situation [HS99]. Their results -show that about 4 signatrues leak enough information to determine -the private key in a few milliseconds. -Nguyen analyzed a similar flaw in GPG [N04]. -I.e., Section 3.2 of Nguyens paper describes essentially the same attack as -used here. More generally, attacks based on lattice reduction were developed -to break a variety of cryptosystems such as the knapsack cryptosystem [O90]. - -## Further notes - -The short algorithm name “DSA” is misleading, since it hides the fact that -`Signature.getInstance(“DSA”)` is equivalent to -`Signature.getInstance(“SHA1withDSA”)`. To reduce the chance of a -misunderstanding short algorithm names should be deprecated. In JCE the hash -algorithm is defined by the algorithm. I.e. depending on the hash algorithm to -use one would call one of: - -```java - Signature.getInstance(“SHA1withDSA”); - Signature.getInstance(“SHA224withDSA”); - Signature.getInstance(“SHA256withDSA”); -``` - -A possible way to push such a change are code analysis tools. "DSA" is in good -company with other algorithm names “RSA”, “AES”, “DES”, all of which default to -weak algorithms. - -## References - -[HS99]: N.A. Howgrave-Graham, N.P. Smart, - “Lattice Attacks on Digital Signature Schemes” - http://www.hpl.hp.com/techreports/1999/HPL-1999-90.pdf - -[N04]: Phong Nguyen, “Can we trust cryptographic software? Cryptographic flaws - in Gnu privacy guard 1.2.3”, Eurocrypt 2004, - https://www.iacr.org/archive/eurocrypt2004/30270550/ProcEC04.pdf - -[O90]: A. M. Odlyzko, "The rise and fall of knapsack cryptosystems", Cryptology - and Computational Number Theory, pp.75-88, 1990 - -[DSS]: FIPS PUB 186-4, "Digital Signature Standard (DSS)", National Institute - of Standards and Technology, July 2013 - http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf diff --git a/doc/ecdh.md b/doc/ecdh.md deleted file mode 100644 index c86b140..0000000 --- a/doc/ecdh.md +++ /dev/null @@ -1,58 +0,0 @@ - -# ECDH - -[TOC] - -##ECDH description: -See https://en.wikipedia.org/wiki/Elliptic_curve_Diffie%E2%80%93Hellman - -##Bugs -Some libraries do not check if the elliptic curve points received from another -party are points on the curve. Encodings of public keys typically contain the -curve for the public key point. If such an encoding is used in the key exchange -then it is important to check that the public and secret key used to compute -the shared ECDH secret are using the same curve. -Some libraries fail to do this check. - -**Potential exploits:** -The damage done depends on the protocol that uses ECDH. E.g. if ECDH is used -with ephemeral keys then the damage is typically limited. If the EC keys are -static, i.e. used for multiple key exchanges then a failure to verify a public -point can disclose the private key used in the same protocol. -(To do: add papers describing the attack). - -##Libraries -**Sun JCE provider:** -ECDH does not check if the points are on the curve. -The implementer must do this. - -**Bouncycastle:** -The ECDH implementation does not check if the point is on the curve. -Furthermore, Bouncycastle does not even check if the public and private key are -on the same curve. It performs a point multiplication \\(x \cdot Y\\) over the -curve specified by the public key. - -**OpenSSL:** -Point verification is done in OpenSSL if the right functions are used. -Since OpenSSL is not well documented it is a bit tricky to find the right -functions. -(To do: maybe add an example). - -##Countermeasures -TODO: -* use point compression. Formats such as X509EncodedKeySpec -in Java include bits that indicate whether the point is compressed or not. -Hence an attacker can always choose to use uncompressed points as long as this -option is incorrectly implemented. -* check that public and private key use the same curve -* restrict the protocol to named curves -* reconstruct the public key explicitly using the parameters of the private - key. - -**Further recommendations:** -If possible I also check if the points are on the curve after point -multiplications on an elliptic curve in the hope to catch implementation -and hardware faults. - -## Some notable bugs: -* ECDHC in bouncy castle could be broken by modifying the order of the public key. diff --git a/doc/index.md b/doc/index.md deleted file mode 100644 index 9fe48b3..0000000 --- a/doc/index.md +++ /dev/null @@ -1,80 +0,0 @@ -# Project Wycheproof - -This page describes the goals and strategies of project Wycheproof. See -[README](../README.md) for an introduction to the project. - -## Defense in depth - -There are a number of tests where we check for expected behaviour -rather than exploitability. Examples: - -* default values: we expect that default values are reasonable and correspond - to recommendations by current standards. Concretely, in 2016 it is not OK - if an RSA key generation uses 1024 bits as default or digital signatures - use SHA-1 as default. -* timing attacks: any timing that relation between keys (or other sensitive) - data and the measured time fails the test. However tests are set up - such that too much noise during the test can prevent that a relation - is detected. -* wrong exceptions: The JCE interface often specifies the exceptions that - should be thrown when the input is invalid. We expect the specified - exceptions in the tests. -* leaking information through exceptions: While it is a good practice to not - return detailed logs to a sender, we consider text in exceptions as - information that a potential attacker can learn. For example padding - failures during decryption should not contain information about the - reason why a decryption failed. -* RSA PKCS #1 signatures: If a signature verification allows signatures - with lots of modifications, then RSA signatures can be forged for small - public exponents. Tests do not measure how many bytes can be modified. - Any accepted modification of the PKCS #1 padding fails the test. - -## Compatibility between providers - -One of the goals of Wycheproof is to test for compatibility issues. -Switching JCE providers should not introduce vulnerabilities simply because -the solution was developed by another provider. - -An example for this was the following observation: When using AES-GCM then -javax.crypto.CipherInputStream worked sort of with JCE and -org.bouncycastle.jcajce.io.CipherInputStream.java worked with BouncyCastle. -However, authentication was skipped in some cases when -javax.crypto.CipherInputStream was used with BouncyCastle. - -## Comparing cryptographic libraries is not a primary goal - -Because of the strategies mentioned above we expect that a comparison of -cryptographic libraries based on the bugs found would be biased: - -* Libraries used internally in Google get more attention. - Serious vulnerabilities in these libraries should be fixed at the time the - tests are added to Wycheproof. On the other hand it is also likely that - tests find a larger number of bugs in these libraries when old versions are - tested. -* Tests often check for expected behaviour and compatibility. - Expected behaviour is often defined by a prominent library. - Pointing out such problems can therefore penalize smaller third party - libraries. -* We are working toward covering as many potential vulnerabilities as possible - with test vectors, because this simplifies porting the tests to other - languages or interfaces. Thus a single test case can cover multiple - vulnerabilities. - -We are not trying to remove this bias when this interferes with more important -goals such as early reporting. -Hence we are reluctant to publish comparisons. - - -## Thoughts on the design of cryptographic libraries - -We should promote robust interfaces with the goal to simplify -the use of the library, code reviews of applications using the -library and testing the library. - -* When cryptographic primitives require randomness then the random - numbers should be chosen by the library. It shouldn't be possible - for a user to provide randomness. If the library itself chooses the - randomness then it is possible (at least to some degree) to check - that the random number generation is appropriate for the primitive. - If the user can provide the randomness then it is not possible to - catch this in our tests. diff --git a/doc/issues.md b/doc/issues.md deleted file mode 100644 index 5732586..0000000 --- a/doc/issues.md +++ /dev/null @@ -1,5 +0,0 @@ -# List of issues in common algorithms -* [RSA](rsa.md) -* [DSA](dsa.md) -* [ECDH](ecdh.md) -* [Diffie-Hellman](dh.md) diff --git a/doc/rsa.md b/doc/rsa.md deleted file mode 100644 index b1f47c5..0000000 --- a/doc/rsa.md +++ /dev/null @@ -1,131 +0,0 @@ -# RSA - -[TOC] - -## RSA key generation - -**Default size:** If a library supports a key default size for RSA keys then -this key size should be at least 2048 bits. This limit is based on the minimum -recommendation of [NIST SP 800-57] part1 revision 4, Table 2, page 53. NIST -recommends a minimal security strength of 112 bits for keys used until 2030. 112 -bit security strength translates to a minimal key size of 2048 bits. Other -organizations recommend somewhat different sizes: [Enisa], Section 3.6 also -suggests that 2048-bit RSA keys provide a security strength of about 112 bits, -but recommends a security strength of 128 bits for near term systems, hence 3072 -bit RSA keys. [ECRYPT II], Section 13.3 suggests at least 2432 bits for new -keys. - -All the references above clearly state that keys smaller than 2048 bits should -only be used in legacy cases. Therefore, it seems wrong to use a default key -size smaller than 2048 bits. If a user really wants a small RSA key then such a -choice should be made by explicitly providing the desired key length during the -initalization of a key pair generator. - -According to https://docs.oracle.com/javase/7/docs/api/javax/crypto/Cipher.html -every implementation of the Java platform is required to implement RSA with both -1024 and 2048 bit key sizes. Hence a 2048 bit default should not lead to -compatibility problems. - -**Cryptographically strong random numbers:** -So far the tests check that java.util.Random is not used. This needs to be -extended. - -**Other bugs:** -The public exponent e should be larger than 1 [CVE-1999-1444] - -## RSA PKCS #1 v1.5 encryption - -PKCS #1 v1.5 padding is susceptible to adaptive chosen ciphertext attacks and -hence should be avoided [B98]. The difficulty of exploiting protocols using -PKCS #1 v1.5 encryption often depends on the amount of information leaked after -decrypting corrupt ciphertexts. Implementations frequently leak information -about the decrypted plaintext in form of error messages. The content of the -error messages are extremely helpful to potential attackers. Bardou et al. -[BFKLSST12] analyze the difficult of attacks based on different types of -information leakage. Smart even describes an attack that only needs about 40 -chosen ciphertexts [S10], though in this case the encryption did not use PKCS #1 -padding. - -**Bugs** - -* Bouncycastle throws detailed exceptions: - InvalidCipherTextException("unknown block type") or - InvalidCipherTextException("block padding incorrect"). - - - -**Tests** To test whether an implementation leaks more information than -necessary a test decrypts some random ciphertexts and catches the exceptions. If -the exceptions are distinguishable then the test assumes that unnecessary -information about the padding is leaked. - -Due to the nature of unit tests not every attack can be detected this way. Some -attacks require a large number of ciphertexts to be detected if random -ciphertexts are used. For example Klima et al. [KPR03] describe an -implementation flaw that could not be detected with our test. - -Timing leakages because of differences in parsing the padding can leak -information (e.g. CVE-2015-7827). Such differences are too small to be reliably -detectable in unit tests. - -## RSA OAEP - -Manger describes an chosen ciphertext attack against RSA in [M01]. There are -implementations that were susceptible to Mangers attack, e.g. [CVE-2012-5081]. - -## RSA PKCS1 signatures -**Potential problems:** - -* Some libraries parse PKCS#1 padding during signature verification - incorrectly. -* Some libraries determine the hash function from the signature (rather than - encoding this in the key) Effect: -* If the verification is buggy then an attacker might be able to generate - signatures for keys with a small (i.e. e=3) public exponent. -* If the hash algorithm is not determined by in an authentic manner then - preimage attacks against weak hashes are possible, even if the hashes are - not used by the signer. - -**Countermeasures:** A good way to implement RSA signature verification is -described in the standard PKCS#1 v.2.2 Section 8.2.2. This standard proposes to -reconstruct the padding during verification and compare the padded hash to the -value $$s^e \bmod n$$ obtained from applying a public key exponentiation to the -signature s. Since this is a recurring bug it makes also a lot of sense to avoid -small public exponents and prefer for example e=65537 . - -**List of broken implementations** -This is a large list. - -## References - -\[B98]: D. Bleichenbacher, "Chosen ciphertext attacks against protocols based on -the RSA encryption standard PKCS# 1" Crypto 98 - -\[M01]: J. Manger, "A chosen ciphertext attack on RSA optimal asymmetric -encryption padding (OAEP) as standardized in PKCS# 1 v2.0", Crypto 2001 This -paper shows that OAEP is susceptible to a chosen ciphertext attack if error -messages distinguish between different failure condidtions. [S10]: N. Smart, -"Errors matter: Breaking RSA-based PIN encryption with thirty ciphertext -validity queries" RSA conference, 2010 This paper shows that padding oracle -attacks can be successful with even a small number of queries. - -\[KPR03]: V. Klima, O. Pokorny, and T. Rosa, "Attacking RSA-based Sessions in -SSL/TLS" https://eprint.iacr.org/2003/052/ - -\[BFKLSST12]: "Efficient padding oracle attacks on cryptographic hardware" R. -Bardou, R. Focardi, Y. Kawamoto, L. Simionato, G. Steel, J.K. Tsay, Crypto 2012 - -\[NIST SP 800-57]: -http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r4.pdf - -\[Enisa]: "Algorithms, key size and parameters report – 2014" -https://www.enisa.europa.eu/publications/algorithms-key-size-and-parameters-report-2014 - -\[ECRYPT II]: Yearly Report on Algorithms and Keysizes (2011-2012), -http://www.ecrypt.eu.org/ecrypt2/documents/D.SPA.20.pdf - -\[CVE-1999-1444]: Alibaba 2.0 generated RSA key pairs with an exponent 1 - -\[CVE-2012-5081]: Java JSSE provider leaked information through exceptions and -timing. Both the PKCS #1 padding and the OAEP padding were broken: -http://www-brs.ub.ruhr-uni-bochum.de/netahtml/HSS/Diss/MeyerChristopher/diss.pdf diff --git a/java/com/google/security/wycheproof/BouncyCastleAllTests.java b/java/com/google/security/wycheproof/BouncyCastleAllTests.java deleted file mode 100644 index 47a4dcf..0000000 --- a/java/com/google/security/wycheproof/BouncyCastleAllTests.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import com.google.security.wycheproof.WycheproofRunner.Provider; -import com.google.security.wycheproof.WycheproofRunner.ProviderType; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; - -/** - * BouncyCastleAllTests runs all tests. - */ -@RunWith(WycheproofRunner.class) -@SuiteClasses({ - AesEaxTest.class, - AesGcmTest.class, - BasicTest.class, - CipherInputStreamTest.class, - CipherOutputStreamTest.class, - DhTest.class, - DhiesTest.class, - DsaTest.class, - EcKeyTest.class, - EcdhTest.class, - EcdsaTest.class, - EciesTest.class, - RsaEncryptionTest.class, - RsaKeyTest.class, - RsaSignatureTest.class, -}) -@Provider(ProviderType.BOUNCY_CASTLE) -public final class BouncyCastleAllTests { - @BeforeClass - public static void setUp() throws Exception { - TestUtil.installOnlyThisProvider(new BouncyCastleProvider()); - } -} diff --git a/java/com/google/security/wycheproof/BouncyCastleTest.java b/java/com/google/security/wycheproof/BouncyCastleTest.java deleted file mode 100644 index 941b94f..0000000 --- a/java/com/google/security/wycheproof/BouncyCastleTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import com.google.security.wycheproof.WycheproofRunner.Fast; -import com.google.security.wycheproof.WycheproofRunner.Provider; -import com.google.security.wycheproof.WycheproofRunner.ProviderType; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; - -/** - * BouncyCastleTest excludes {@code @SlowTest} tests. - */ -@RunWith(WycheproofRunner.class) -@SuiteClasses({ - AesEaxTest.class, - AesGcmTest.class, - BasicTest.class, - CipherInputStreamTest.class, - CipherOutputStreamTest.class, - DhTest.class, - DhiesTest.class, - DsaTest.class, - EcKeyTest.class, - EcdhTest.class, - EcdsaTest.class, - EciesTest.class, - RsaEncryptionTest.class, - RsaKeyTest.class, - RsaSignatureTest.class, -}) -@Provider(ProviderType.BOUNCY_CASTLE) -@Fast -public final class BouncyCastleTest { - @BeforeClass - public static void setUp() throws Exception { - TestUtil.installOnlyThisProvider(new BouncyCastleProvider()); - } -} diff --git a/java/com/google/security/wycheproof/ConscryptTest.java b/java/com/google/security/wycheproof/ConscryptTest.java deleted file mode 100644 index c4f58d5..0000000 --- a/java/com/google/security/wycheproof/ConscryptTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import com.google.security.wycheproof.WycheproofRunner.Fast; -import com.google.security.wycheproof.WycheproofRunner.Provider; -import com.google.security.wycheproof.WycheproofRunner.ProviderType; -import org.conscrypt.OpenSSLProvider; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; - -/** - * Conscrypt is a Java security provider that uses OpenSSL. See {@link https://conscrypt.org/}. - * ConscryptTest excludes {@code @SlowTest} tests. - */ -@RunWith(WycheproofRunner.class) -@SuiteClasses({ - AesGcmTest.class, - BasicTest.class, - CipherInputStreamTest.class, - CipherOutputStreamTest.class, - EcKeyTest.class, - EcdhTest.class, - EcdsaTest.class, - RsaEncryptionTest.class, - RsaKeyTest.class, - RsaSignatureTest.class -}) -@Provider(ProviderType.CONSCRYPT) -@Fast -public final class ConscryptTest { - @BeforeClass - public static void setUp() throws Exception { - TestUtil.installOnlyThisProvider(new OpenSSLProvider()); - } -} diff --git a/java/com/google/security/wycheproof/EcUtil.java b/java/com/google/security/wycheproof/EcUtil.java deleted file mode 100644 index f464cba..0000000 --- a/java/com/google/security/wycheproof/EcUtil.java +++ /dev/null @@ -1,454 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import java.math.BigInteger; -import java.security.AlgorithmParameters; -import java.security.GeneralSecurityException; -import java.security.KeyPair; -import java.security.KeyPairGenerator; -import java.security.NoSuchAlgorithmException; -import java.security.interfaces.ECPublicKey; -import java.security.spec.ECField; -import java.security.spec.ECFieldFp; -import java.security.spec.ECGenParameterSpec; -import java.security.spec.ECParameterSpec; -import java.security.spec.ECPoint; -import java.security.spec.ECPublicKeySpec; -import java.security.spec.EllipticCurve; -import java.security.spec.InvalidParameterSpecException; -import java.util.Arrays; - -/** - * Some utilities for testing Elliptic curve crypto. This code is for testing only and hasn't been - * reviewed for production. - */ -public class EcUtil { - /** - * Returns the ECParameterSpec for a named curve. Not every provider implements the - * AlgorithmParameters. Therefore, most test use alternative functions. - */ - public static ECParameterSpec getCurveSpec(String name) - throws NoSuchAlgorithmException, InvalidParameterSpecException { - AlgorithmParameters parameters = AlgorithmParameters.getInstance("EC"); - parameters.init(new ECGenParameterSpec(name)); - return parameters.getParameterSpec(ECParameterSpec.class); - } - - /** - * Returns the ECParameterSpec for a named curve. Only a handful curves that are used in the tests - * are implemented. - */ - public static ECParameterSpec getCurveSpecRef(String name) throws NoSuchAlgorithmException { - if (name.equals("secp224r1")) { - return getNistP224Params(); - } else if (name.equals("secp256r1")) { - return getNistP256Params(); - } else if (name.equals("secp384r1")) { - return getNistP384Params(); - } else if (name.equals("secp521r1")) { - return getNistP521Params(); - } else if (name.equals("brainpoolp256r1")) { - return getBrainpoolP256r1Params(); - } else { - throw new NoSuchAlgorithmException("Curve not implemented:" + name); - } - } - - public static ECParameterSpec getNistCurveSpec( - String decimalP, String decimalN, String hexB, String hexGX, String hexGY) { - final BigInteger p = new BigInteger(decimalP); - final BigInteger n = new BigInteger(decimalN); - final BigInteger three = new BigInteger("3"); - final BigInteger a = p.subtract(three); - final BigInteger b = new BigInteger(hexB, 16); - final BigInteger gx = new BigInteger(hexGX, 16); - final BigInteger gy = new BigInteger(hexGY, 16); - final int h = 1; - ECFieldFp fp = new ECFieldFp(p); - java.security.spec.EllipticCurve curveSpec = new java.security.spec.EllipticCurve(fp, a, b); - ECPoint g = new ECPoint(gx, gy); - ECParameterSpec ecSpec = new ECParameterSpec(curveSpec, g, n, h); - return ecSpec; - } - - public static ECParameterSpec getNistP224Params() { - return getNistCurveSpec( - "26959946667150639794667015087019630673557916260026308143510066298881", - "26959946667150639794667015087019625940457807714424391721682722368061", - "b4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4", - "b70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21", - "bd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34"); - } - - public static ECParameterSpec getNistP256Params() { - return getNistCurveSpec( - "115792089210356248762697446949407573530086143415290314195533631308867097853951", - "115792089210356248762697446949407573529996955224135760342422259061068512044369", - "5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", - "6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", - "4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"); - } - - public static ECParameterSpec getNistP384Params() { - return getNistCurveSpec( - "3940200619639447921227904010014361380507973927046544666794829340" - + "4245721771496870329047266088258938001861606973112319", - "3940200619639447921227904010014361380507973927046544666794690527" - + "9627659399113263569398956308152294913554433653942643", - "b3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875a" - + "c656398d8a2ed19d2a85c8edd3ec2aef", - "aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a38" - + "5502f25dbf55296c3a545e3872760ab7", - "3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c0" - + "0a60b1ce1d7e819d7a431d7c90ea0e5f"); - } - - public static ECParameterSpec getNistP521Params() { - return getNistCurveSpec( - "6864797660130609714981900799081393217269435300143305409394463459" - + "18554318339765605212255964066145455497729631139148085803712198" - + "7999716643812574028291115057151", - "6864797660130609714981900799081393217269435300143305409394463459" - + "18554318339765539424505774633321719753296399637136332111386476" - + "8612440380340372808892707005449", - "051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef10" - + "9e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00", - "c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3d" - + "baa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66", - "11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e6" - + "62c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"); - } - - public static ECParameterSpec getBrainpoolP256r1Params() { - BigInteger p = - new BigInteger("A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377", 16); - BigInteger a = - new BigInteger("7D5A0975FC2C3057EEF67530417AFFE7FB8055C126DC5C6CE94A4B44F330B5D9", 16); - BigInteger b = - new BigInteger("26DC5C6CE94A4B44F330B5D9BBD77CBF958416295CF7E1CE6BCCDC18FF8C07B6", 16); - BigInteger x = - new BigInteger("8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262", 16); - BigInteger y = - new BigInteger("547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997", 16); - BigInteger n = - new BigInteger("A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7", 16); - final int h = 1; - ECFieldFp fp = new ECFieldFp(p); - EllipticCurve curve = new EllipticCurve(fp, a, b); - ECPoint g = new ECPoint(x, y); - return new ECParameterSpec(curve, g, n, h); - } - - /** - * Compute the Legendre symbol of x mod p. This implementation is slow. Faster would be the - * computation for the Jacobi symbol. - * - * @param x an integer - * @param p a prime modulus - * @returns 1 if x is a quadratic residue, -1 if x is a non-quadratic residue and 0 if x and p are - * not coprime. - * @throws GeneralSecurityException when the computation shows that p is not prime. - */ - public static int legendre(BigInteger x, BigInteger p) throws GeneralSecurityException { - BigInteger q = p.subtract(BigInteger.ONE).shiftRight(1); - BigInteger t = x.modPow(q, p); - if (t.equals(BigInteger.ONE)) { - return 1; - } else if (t.equals(BigInteger.ZERO)) { - return 0; - } else if (t.add(BigInteger.ONE).equals(p)) { - return -1; - } else { - throw new GeneralSecurityException("p is not prime"); - } - } - - /** - * Computes a modular square root. Timing and exceptions can leak information about the inputs. - * Therefore this method must only be used in tests. - * - * @param x the square - * @param p the prime modulus - * @returns a value s such that s^2 mod p == x mod p - * @throws GeneralSecurityException if the square root could not be found. - */ - public static BigInteger modSqrt(BigInteger x, BigInteger p) throws GeneralSecurityException { - if (p.signum() != 1) { - throw new GeneralSecurityException("p must be positive"); - } - x = x.mod(p); - BigInteger squareRoot = null; - // Special case for x == 0. - // This check is necessary for Cipolla's algorithm. - if (x.equals(BigInteger.ZERO)) { - return x; - } - if (p.testBit(0) && p.testBit(1)) { - // Case p % 4 == 3 - // q = (p + 1) / 4 - BigInteger q = p.add(BigInteger.ONE).shiftRight(2); - squareRoot = x.modPow(q, p); - } else if (p.testBit(0) && !p.testBit(1)) { - // Case p % 4 == 1 - // For this case we use Cipolla's algorithm. - // This alogorithm is preferrable to Tonelli-Shanks for primes p where p-1 is divisible by - // a large power of 2, which is a frequent choice since it simplifies modular reduction. - BigInteger a = BigInteger.ONE; - BigInteger d = null; - while (true) { - d = a.multiply(a).subtract(x).mod(p); - // Computes the Legendre symbol. Using the Jacobi symbol would be a faster. Using Legendre - // has the advantage, that it detects a non prime p with high probability. - // On the other hand if p = q^2 then the Jacobi (d/p)==1 for almost all d's and thus - // using the Jacobi symbol here can result in an endless loop with invalid inputs. - int t = legendre(d, p); - if (t == -1) { - break; - } else { - a = a.add(BigInteger.ONE); - } - } - // Since d = a^2 - n is a non-residue modulo p, we have - // a - sqrt(d) == (a+sqrt(d))^p (mod p), - // and hence - // n == (a + sqrt(d))(a - sqrt(d) == (a+sqrt(d))^(p+1) (mod p). - // Thus if n is square then (a+sqrt(d))^((p+1)/2) (mod p) is a square root of n. - BigInteger q = p.add(BigInteger.ONE).shiftRight(1); - BigInteger u = a; - BigInteger v = BigInteger.ONE; - for (int bit = q.bitLength() - 2; bit >= 0; bit--) { - // Compute (u + v sqrt(d))^2 - BigInteger tmp = u.multiply(v); - u = u.multiply(u).add(v.multiply(v).mod(p).multiply(d)).mod(p); - v = tmp.add(tmp).mod(p); - if (q.testBit(bit)) { - tmp = u.multiply(a).add(v.multiply(d)).mod(p); - v = a.multiply(v).add(u).mod(p); - u = tmp; - } - } - squareRoot = u; - } - // The methods used to compute the square root only guarantee a correct result if the - // preconditions (i.e. p prime and x is a square) are satisfied. Otherwise the value is - // undefined. Hence, it is important to verify that squareRoot is indeed a square root. - if (squareRoot != null && squareRoot.multiply(squareRoot).mod(p).compareTo(x) != 0) { - throw new GeneralSecurityException("Could not find square root"); - } - return squareRoot; - } - - /** - * Returns the modulus of the field used by the curve specified in ecParams. - * - * @param curve must be a prime order elliptic curve - * @return the order of the finite field over which curve is defined. - */ - public static BigInteger getModulus(EllipticCurve curve) throws GeneralSecurityException { - java.security.spec.ECField field = curve.getField(); - if (field instanceof java.security.spec.ECFieldFp) { - return ((java.security.spec.ECFieldFp) field).getP(); - } else { - throw new GeneralSecurityException("Only curves over prime order fields are supported"); - } - } - - /** - * Returns the size of an element of the field over which the curve is defined. - * - * @param curve must be a prime order elliptic curve - * @return the size of an element in bits - */ - public static int fieldSizeInBits(EllipticCurve curve) throws GeneralSecurityException { - return getModulus(curve).subtract(BigInteger.ONE).bitLength(); - } - - /** - * Returns the size of an element of the field over which the curve is defined. - * - * @param curve must be a prime order elliptic curve - * @return the size of an element in bytes. - */ - public static int fieldSizeInBytes(EllipticCurve curve) throws GeneralSecurityException { - return (fieldSizeInBits(curve) + 7) / 8; - } - - /** - * Checks that a point is on a given elliptic curve. This method implements the partial public key - * validation routine from Section 5.6.2.6 of NIST SP 800-56A - * http://csrc.nist.gov/publications/nistpubs/800-56A/SP800-56A_Revision1_Mar08-2007.pdf A partial - * public key validation is sufficient for curves with cofactor 1. See Section B.3 of - * http://www.nsa.gov/ia/_files/SuiteB_Implementer_G-113808.pdf The point validations above are - * taken from recommendations for ECDH, because parameter checks in ECDH are much more important - * than for the case of ECDSA. Performing this test for ECDSA keys is mainly a sanity check. - * - * @param point the point that needs verification - * @param ec the elliptic curve. This must be a curve over a prime order field. - * @throws GeneralSecurityException if the field is binary or if the point is not on the curve. - */ - public static void checkPointOnCurve(ECPoint point, EllipticCurve ec) - throws GeneralSecurityException { - BigInteger p = getModulus(ec); - BigInteger x = point.getAffineX(); - BigInteger y = point.getAffineY(); - if (x == null || y == null) { - throw new GeneralSecurityException("point is at infinity"); - } - // Check 0 <= x < p and 0 <= y < p. - if (x.signum() == -1 || x.compareTo(p) != -1) { - throw new GeneralSecurityException("x is out of range"); - } - if (y.signum() == -1 || y.compareTo(p) != -1) { - throw new GeneralSecurityException("y is out of range"); - } - // Check y^2 == x^3 + a x + b (mod p) - BigInteger lhs = y.multiply(y).mod(p); - BigInteger rhs = x.multiply(x).add(ec.getA()).multiply(x).add(ec.getB()).mod(p); - if (!lhs.equals(rhs)) { - throw new GeneralSecurityException("Point is not on curve"); - } - } - - /** - * Checks a public key. I.e. this checks that the point defining the public key is on the curve. - * - * @param key must be a key defined over a curve using a prime order field. - * @throws GeneralSecurityException if the key is not valid. - */ - public static void checkPublicKey(ECPublicKey key) throws GeneralSecurityException { - checkPointOnCurve(key.getW(), key.getParams().getCurve()); - } - - /** - * Decompress a point - * - * @param x The x-coordinate of the point - * @param bit0 true if the least significant bit of y is set. - * @param ecParams contains the curve of the point. This must be over a prime order field. - */ - public static ECPoint getPoint(BigInteger x, boolean bit0, ECParameterSpec ecParams) - throws GeneralSecurityException { - EllipticCurve ec = ecParams.getCurve(); - ECField field = ec.getField(); - if (!(field instanceof ECFieldFp)) { - throw new GeneralSecurityException("Only curves over prime order fields are supported"); - } - BigInteger p = ((java.security.spec.ECFieldFp) field).getP(); - if (x.compareTo(BigInteger.ZERO) == -1 || x.compareTo(p) != -1) { - throw new GeneralSecurityException("x is out of range"); - } - // Compute rhs == x^3 + a x + b (mod p) - BigInteger rhs = x.multiply(x).add(ec.getA()).multiply(x).add(ec.getB()).mod(p); - BigInteger y = modSqrt(rhs, p); - if (bit0 != y.testBit(0)) { - y = p.subtract(y).mod(p); - } - return new ECPoint(x, y); - } - - /** - * Decompress a point on an elliptic curve. - * - * @param bytes The compressed point. Its representation is z || x where z is 2+lsb(y) and x is - * using a unsigned fixed length big-endian representation. - * @param ecParams the specification of the curve. Only Weierstrass curves over prime order fields - * are implemented. - */ - public static ECPoint decompressPoint(byte[] bytes, ECParameterSpec ecParams) - throws GeneralSecurityException { - EllipticCurve ec = ecParams.getCurve(); - ECField field = ec.getField(); - if (!(field instanceof ECFieldFp)) { - throw new GeneralSecurityException("Only curves over prime order fields are supported"); - } - BigInteger p = ((java.security.spec.ECFieldFp) field).getP(); - int expectedLength = 1 + (p.bitLength() + 7) / 8; - if (bytes.length != expectedLength) { - throw new GeneralSecurityException("compressed point has wrong length"); - } - boolean lsb; - switch (bytes[0]) { - case 2: - lsb = false; - break; - case 3: - lsb = true; - break; - default: - throw new GeneralSecurityException("Invalid format"); - } - BigInteger x = new BigInteger(1, Arrays.copyOfRange(bytes, 1, bytes.length)); - if (x.compareTo(BigInteger.ZERO) == -1 || x.compareTo(p) != -1) { - throw new GeneralSecurityException("x is out of range"); - } - // Compute rhs == x^3 + a x + b (mod p) - BigInteger rhs = x.multiply(x).add(ec.getA()).multiply(x).add(ec.getB()).mod(p); - BigInteger y = modSqrt(rhs, p); - if (lsb != y.testBit(0)) { - y = p.subtract(y).mod(p); - } - return new ECPoint(x, y); - } - - /** - * Returns a weak public key of order 3 such that the public key point is on the curve specified - * in ecParams. This method is used to check ECC implementations for missing step in the - * verification of the public key. E.g. implementations of ECDH must verify that the public key - * contains a point on the curve as well as public and secret key are using the same curve. - * - * @param ecParams the parameters of the key to attack. This must be a curve in Weierstrass form - * over a prime order field. - * @return a weak EC group with a genrator of order 3. - */ - public static ECPublicKeySpec getWeakPublicKey(ECParameterSpec ecParams) - throws GeneralSecurityException { - EllipticCurve curve = ecParams.getCurve(); - KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); - keyGen.initialize(ecParams); - BigInteger p = getModulus(curve); - BigInteger three = new BigInteger("3"); - while (true) { - // Generate a point on the original curve - KeyPair keyPair = keyGen.generateKeyPair(); - ECPublicKey pub = (ECPublicKey) keyPair.getPublic(); - ECPoint w = pub.getW(); - BigInteger x = w.getAffineX(); - BigInteger y = w.getAffineY(); - // Find the curve parameters a,b such that 3*w = infinity. - // This is the case if the following equations are satisfied: - // 3x == l^2 (mod p) - // l == (3x^2 + a) / 2*y (mod p) - // y^2 == x^3 + ax + b (mod p) - BigInteger l; - try { - l = modSqrt(x.multiply(three), p); - } catch (GeneralSecurityException ex) { - continue; - } - BigInteger xSqr = x.multiply(x).mod(p); - BigInteger a = l.multiply(y.add(y)).subtract(xSqr.multiply(three)).mod(p); - BigInteger b = y.multiply(y).subtract(x.multiply(xSqr.add(a))).mod(p); - EllipticCurve newCurve = new EllipticCurve(curve.getField(), a, b); - // Just a sanity check. - checkPointOnCurve(w, newCurve); - // Cofactor and order are of course wrong. - ECParameterSpec spec = new ECParameterSpec(newCurve, w, p, 1); - return new ECPublicKeySpec(w, spec); - } - } -} diff --git a/java/com/google/security/wycheproof/JsonTest.java b/java/com/google/security/wycheproof/JsonTest.java deleted file mode 100644 index 145eebe..0000000 --- a/java/com/google/security/wycheproof/JsonTest.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Copyright 2017 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -/** Provider independent tests using the JSON test vectors */ -@RunWith(Suite.class) -@SuiteClasses({JsonSignatureTest.class}) -public final class JsonTest {} diff --git a/java/com/google/security/wycheproof/OpenJDKAllTests.java b/java/com/google/security/wycheproof/OpenJDKAllTests.java deleted file mode 100644 index a2b3b06..0000000 --- a/java/com/google/security/wycheproof/OpenJDKAllTests.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.google.security.wycheproof; - -import com.google.security.wycheproof.WycheproofRunner.Provider; -import com.google.security.wycheproof.WycheproofRunner.ProviderType; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; - -/** - * Tests for OpenJDK's providers: SunJCE, SunEC, etc. - * OpenJDKAllTests runs all tests. - */ -@RunWith(WycheproofRunner.class) -@SuiteClasses({ - AesGcmTest.class, - BasicTest.class, - CipherInputStreamTest.class, - CipherOutputStreamTest.class, - DhTest.class, - DsaTest.class, - EcKeyTest.class, - EcdhTest.class, - EcdsaTest.class, - RsaEncryptionTest.class, - RsaKeyTest.class, - RsaSignatureTest.class -}) -@Provider(ProviderType.OPENJDK) -public final class OpenJDKAllTests { - @BeforeClass - public static void setUp() throws Exception { - TestUtil.installOnlyOpenJDKProviders(); - } -} diff --git a/java/com/google/security/wycheproof/OpenJDKTest.java b/java/com/google/security/wycheproof/OpenJDKTest.java deleted file mode 100644 index b326fef..0000000 --- a/java/com/google/security/wycheproof/OpenJDKTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.google.security.wycheproof; - -import com.google.security.wycheproof.WycheproofRunner.Fast; -import com.google.security.wycheproof.WycheproofRunner.Provider; -import com.google.security.wycheproof.WycheproofRunner.ProviderType; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; - -/** - * Tests for OpenJDK's providers: SunJCE, SunEC, etc. - * OpenJDKTest excludes slow tests. - */ -@RunWith(WycheproofRunner.class) -@SuiteClasses({ - AesGcmTest.class, - BasicTest.class, - CipherInputStreamTest.class, - CipherOutputStreamTest.class, - DhTest.class, - DsaTest.class, - EcKeyTest.class, - EcdhTest.class, - EcdsaTest.class, - RsaEncryptionTest.class, - RsaKeyTest.class, - RsaSignatureTest.class -}) -@Provider(ProviderType.OPENJDK) -@Fast -public final class OpenJDKTest { - @BeforeClass - public static void setUp() throws Exception { - TestUtil.installOnlyOpenJDKProviders(); - } -} diff --git a/java/com/google/security/wycheproof/ProviderIndependentTest.java b/java/com/google/security/wycheproof/ProviderIndependentTest.java deleted file mode 100644 index 931fc64..0000000 --- a/java/com/google/security/wycheproof/ProviderIndependentTest.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -/** Provider independent tests */ -@RunWith(Suite.class) -@SuiteClasses({BigIntegerTest.class}) -public final class ProviderIndependentTest {} diff --git a/java/com/google/security/wycheproof/RandomUtil.java b/java/com/google/security/wycheproof/RandomUtil.java deleted file mode 100644 index 388c272..0000000 --- a/java/com/google/security/wycheproof/RandomUtil.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import java.math.BigInteger; -import java.nio.ByteBuffer; -import java.security.GeneralSecurityException; -import java.util.Random; - -/** - * A collection of utilities for testing random number generators. So far this util simply checks - * that random numbers are not generated by java.util.Random. Eventually we plan to add detection - * for other random number generators too. - * - * @author bleichen@google.com (Daniel Bleichenbacher) - */ -public class RandomUtil { - // Constants for java.util.Random; - static final long A = 0x5DEECE66DL; - static final long A_INVERSE = 246154705703781L; - static final long C = 0xBL; - - /** Given a state of a java.util.Random object compute the next state. */ - protected static long nextState(long seed) { - return (seed * A + C) & ((1L << 48) - 1); - } - - /** Give the state after stepping java.util.Random n times. */ - protected static long step(long seed, long n) { - long a = A; - long c = C; - n = n & 0xffffffffffffL; - while (n != 0) { - if ((n & 1) == 1) { - seed = seed * a + c; - } - c = c * (a + 1); - a = a * a; - n = n >> 1; - } - return seed & 0xffffffffffffL; - } - - /** Given a state of a java.util.Random object compute the previous state. */ - protected static long previousState(long seed) { - return ((seed - C) * A_INVERSE) & ((1L << 48) - 1); - } - - /** Computes a seed that would initialize a java.util.Random object with a given state. */ - protected static long getSeedForState(long seed) { - return seed ^ A; - } - - protected static long getStateForSeed(long seed) { - return (seed ^ A) & 0xffffffffffffL; - } - - /** - * Given two subsequent outputs x0 and x1 from java.util.Random this function computes the - * internal state of java.util.Random after returning x0 or returns -1 if no such state exists. - */ - protected static long getState(int x0, int x1) { - long mask = (1L << 48) - 1; - long multiplier = A; - // The state of the random number generator after returning x0 is - // l0 + eps for some 0 <= eps < 2**16. - long l0 = ((long) x0 << 16) & mask; - // The state of the random number generator after returning x1 is - // l1 + delta for some 0 <= delta < 2**16. - long l1 = ((long) x1 << 16) & mask; - // We have l1 + delta = (l0 + eps)*multiplier + 0xBL (mod 2**48). - // This allows to find an upper bound w for eps * multiplier mod 2**48 - // by assuming delta = 2**16-1. - long w = (l1 - l0 * multiplier + 65535L - 0xBL) & mask; - // The reduction eps * multiplier mod 2**48 only cuts off at most 3 bits. - // Hence a simple search is sufficient. The maximal number of loops is 6. - for (long em = w; em < (multiplier << 16); em += 1L << 48) { - // If the high order bits of em are guessed correctly then - // em == eps * multiplier + 65535 - delta. - long eps = em / multiplier; - long state0 = l0 + eps; - long state1 = nextState(state0); - if ((state1 & 0xffffffff0000L) == l1) { - return state0; - } - } - return -1; - } - - /** - * Find a seed such that this integer is the result of - * - *
{@code
- * Random rand = new Random();
- * rand.setSeed(seed);
- * return new BigInteger(k, rand);
- * }
- *
- * where k is max(64, x.BitLength());
- *
- * Returns -1 if no such seed exists. - */ - // TODO(bleichen): We want to detect cases where some of the bits - // (i.e. most significant bits or least significant bits have - // been modified. Often this happens during the generation - // of primes or other things. - // TODO(bleichen): This method is incomplete. - protected static long getSeedFor(java.math.BigInteger x) { - byte[] bytes = x.toByteArray(); - if (bytes.length == 0) { - return -1; - } - ByteBuffer buffer = ByteBuffer.allocate(8); - int offset = bytes[0] == 0 ? 1 : 0; - if (bytes.length - offset < 8) { - int size = bytes.length - offset; - buffer.position(8 - size); - buffer.put(bytes, offset, size); - } else { - buffer.put(bytes, offset, 8); - } - buffer.flip(); - buffer.order(java.nio.ByteOrder.LITTLE_ENDIAN); - int x0 = buffer.getInt(); - int x1 = buffer.getInt(); - long state = getState(x0, x1); - if (state == -1) { - return -1; - } - return getSeedForState(previousState(state)); - } - - /** Attempts to find a seed such that it generates the prime p. Returns -1 if no seed is found. */ - static long getSeedForPrime(BigInteger p) { - int confidence = 64; - Random rand = new Random(); - int size = p.bitLength(); - // Prime generation often sets the most significant bit. - // Hence, clearing the most significant bit can help to find - // the seed used for the prime generation. - for (BigInteger x : new BigInteger[] {p, p.clearBit(size - 1)}) { - long seed = getSeedFor(x); - if (seed != -1) { - rand.setSeed(seed); - BigInteger q = new BigInteger(size, confidence, rand); - if (q.equals(p)) { - return seed; - } - } - } - return -1; - } - - /** - * Checks whether p is a random prime. A prime generated with a secure random number generator - * passes with probability > 1-2^{-32}. No checks are performed for primes smaller than 96 bits. - * - * @throws GeneralSecurityException if the prime was generated using java.util.Random - */ - static void checkPrime(BigInteger p) throws GeneralSecurityException { - // We can't reliably detect java.util.Random for small primes. - if (p.bitLength() < 96) { - return; - } - long seed = getSeedForPrime(p); - if (seed != -1) { - throw new GeneralSecurityException( - "java.util.Random with seed " + seed + " was likely used to generate prime"); - } - } -} diff --git a/java/com/google/security/wycheproof/SpongyCastleAllTests.java b/java/com/google/security/wycheproof/SpongyCastleAllTests.java deleted file mode 100644 index 5566827..0000000 --- a/java/com/google/security/wycheproof/SpongyCastleAllTests.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import com.google.security.wycheproof.WycheproofRunner.Provider; -import com.google.security.wycheproof.WycheproofRunner.ProviderType; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; -import org.spongycastle.jce.provider.BouncyCastleProvider; - -/** - * SpongyCastleTest excludes {@code @SlowTest} tests. - * SpongyCastleAllTests runs all tests. - */ -@RunWith(WycheproofRunner.class) -@SuiteClasses({ - AesEaxTest.class, - AesGcmTest.class, - BasicTest.class, - CipherInputStreamTest.class, - CipherOutputStreamTest.class, - DhTest.class, - DhiesTest.class, - DsaTest.class, - EcKeyTest.class, - EcdhTest.class, - EcdsaTest.class, - EciesTest.class, - RsaEncryptionTest.class, - RsaKeyTest.class, - RsaSignatureTest.class, -}) -@Provider(ProviderType.SPONGY_CASTLE) -public final class SpongyCastleAllTests { - @BeforeClass - public static void setUp() throws Exception { - TestUtil.installOnlyThisProvider(new BouncyCastleProvider()); - } -} diff --git a/java/com/google/security/wycheproof/SpongyCastleTest.java b/java/com/google/security/wycheproof/SpongyCastleTest.java deleted file mode 100644 index 73c8ca1..0000000 --- a/java/com/google/security/wycheproof/SpongyCastleTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import com.google.security.wycheproof.WycheproofRunner.Fast; -import com.google.security.wycheproof.WycheproofRunner.Provider; -import com.google.security.wycheproof.WycheproofRunner.ProviderType; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; -import org.spongycastle.jce.provider.BouncyCastleProvider; - -/** - * Spongy Castle is a Bouncy Castle clone with a few changes to make it work on Android. - * SpongyCastleTest excludes {@code @SlowTest} tests. - */ -@RunWith(WycheproofRunner.class) -@SuiteClasses({ - AesEaxTest.class, - AesGcmTest.class, - BasicTest.class, - CipherInputStreamTest.class, - CipherOutputStreamTest.class, - DhTest.class, - DhiesTest.class, - DsaTest.class, - EcKeyTest.class, - EcdhTest.class, - EcdsaTest.class, - EciesTest.class, - RsaEncryptionTest.class, - RsaKeyTest.class, - RsaSignatureTest.class, -}) -@Provider(ProviderType.SPONGY_CASTLE) -@Fast -public final class SpongyCastleTest { - @BeforeClass - public static void setUp() throws Exception { - TestUtil.installOnlyThisProvider(new BouncyCastleProvider()); - } -} diff --git a/java/com/google/security/wycheproof/TestUtil.java b/java/com/google/security/wycheproof/TestUtil.java deleted file mode 100644 index ae21adc..0000000 --- a/java/com/google/security/wycheproof/TestUtil.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import java.nio.ByteBuffer; -import java.security.Provider; -import java.security.Security; - -/** Test utilities */ -public class TestUtil { - - public static String bytesToHex(byte[] bytes) { - // bytesToHex is used to convert output from Cipher. - // cipher.update can return null, which is equivalent to returning - // no plaitext rsp. ciphertext. - if (bytes == null) { - return ""; - } - String chars = "0123456789abcdef"; - StringBuilder result = new StringBuilder(2 * bytes.length); - for (byte b : bytes) { - // convert to unsigned - int val = b & 0xff; - result.append(chars.charAt(val / 16)); - result.append(chars.charAt(val % 16)); - } - return result.toString(); - } - - /** - * Returns a hexadecimal representation of the bytes written to ByteBuffer (i.e. all the bytes - * before position()). - */ - public static String byteBufferToHex(ByteBuffer buffer) { - ByteBuffer tmp = buffer.duplicate(); - tmp.flip(); - byte[] bytes = new byte[tmp.remaining()]; - tmp.get(bytes); - return bytesToHex(bytes); - } - - public static byte[] hexToBytes(String hex) throws IllegalArgumentException { - if (hex.length() % 2 != 0) { - throw new IllegalArgumentException("Expected a string of even length"); - } - int size = hex.length() / 2; - byte[] result = new byte[size]; - for (int i = 0; i < size; i++) { - int hi = Character.digit(hex.charAt(2 * i), 16); - int lo = Character.digit(hex.charAt(2 * i + 1), 16); - if ((hi == -1) || (lo == -1)) { - throw new IllegalArgumentException("input is not hexadecimal"); - } - result[i] = (byte) (16 * hi + lo); - } - return result; - } - - public static void installOnlyThisProvider(Provider provider) { - for (Provider p : Security.getProviders()) { - Security.removeProvider(p.getName()); - } - Security.insertProviderAt(provider, 1); - } - - public static void installOnlyOpenJDKProviders() throws Exception { - for (Provider p : Security.getProviders()) { - Security.removeProvider(p.getName()); - } - installOpenJDKProvider("com.sun.net.ssl.internal.ssl.Provider"); - installOpenJDKProvider("com.sun.crypto.provider.SunJCE"); - installOpenJDKProvider("com.sun.security.sasl.Provider"); - installOpenJDKProvider("org.jcp.xml.dsig.internal.dom.XMLDSigRI"); - installOpenJDKProvider("sun.security.ec.SunEC"); - installOpenJDKProvider("sun.security.jgss.SunProvider"); - installOpenJDKProvider("sun.security.provider.Sun"); - installOpenJDKProvider("sun.security.rsa.SunRsaSign"); - installOpenJDKProvider("sun.security.smartcardio.SunPCSC"); - } - - private static void installOpenJDKProvider(String className) throws Exception { - Provider provider = (Provider) Class.forName(className).getConstructor().newInstance(); - Security.insertProviderAt(provider, 1); - } -} diff --git a/java/com/google/security/wycheproof/WycheproofRunner.java b/java/com/google/security/wycheproof/WycheproofRunner.java deleted file mode 100644 index e4da431..0000000 --- a/java/com/google/security/wycheproof/WycheproofRunner.java +++ /dev/null @@ -1,206 +0,0 @@ -/** - * @license - * Copyright 2013 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.util.Arrays; -import org.junit.runner.Description; -import org.junit.runner.manipulation.Filter; -import org.junit.runner.manipulation.NoTestsRemainException; -import org.junit.runners.Suite; -import org.junit.runners.model.InitializationError; -import org.junit.runners.model.RunnerBuilder; - -/** - *
A custom JUnit4 runner that, with annotations, allows choosing tests to run on a specific - * provider. To use it, annotate a runner class with {@code RunWith(WycheproofRunner.class)}, and - * {@code SuiteClasses({AesGcmTest.class, ...})}. When you run this class, it will run all the tests - * in all the suite classes. - * - *
To exclude certain tests, a runner class should be annotated with {@code @Provider} which - * indicates the target provider. Test exclusion is defined as follows: - *
Usage: @Provider(ProviderType.BOUNCY_CASTLE) - */ - @Retention(RetentionPolicy.RUNTIME) - @Target({ElementType.TYPE}) - public @interface Provider { - ProviderType value(); - } - - /** - * Annotation to specify presubmit test runners that exclude {@code @NoPresubmitTets} tests. - * - *
Usage: @Presubmit(ProviderType.BOUNCY_CASTLE) - */ - @Retention(RetentionPolicy.RUNTIME) - @Target({ElementType.TYPE}) - public @interface Presubmit {} - - /** - * Annotation to specify fast test runners that exclude {@code @SlowTest} tests. - * - *
Usage: @Fast - */ - @Retention(RetentionPolicy.RUNTIME) - @Target({ElementType.TYPE}) - public @interface Fast {} - - // Annotations for test functions - - /** - * Tests that take too much time to run, should be excluded from TAP and wildcard target patterns - * like:..., :*, or :all. - * - *
Usage: @SlowTest(providers = {ProviderType.BOUNCY_CASTLE, ...}) - */ - @Retention(RetentionPolicy.RUNTIME) - @Target({ElementType.METHOD}) - public @interface SlowTest { - ProviderType[] providers(); - } - - /** - * Tests that should be excluded from presubmit checks on specific providers. - * - *
Usage: @NoPresubmitTest( - * providers = {ProviderType.BOUNCY_CASTLE, ...}, - * bugs = {"b/123456789"} - * ) - */ - @Retention(RetentionPolicy.RUNTIME) - @Target({ElementType.METHOD, ElementType.FIELD}) - public @interface NoPresubmitTest { - /** List of providers that this test method should not run as presubmit check. */ - ProviderType[] providers(); - - /** List of blocking bugs (and comments). */ - String[] bugs(); - } - - /** - * Annotation to specify test functions that should be excluded on specific providers. - * - *
Usage: @ExcludedTest(providers = {ProviderType.BOUNCY_CASTLE, ProviderType.OPENJDK}) - */ - @Retention(RetentionPolicy.RUNTIME) - @Target({ElementType.METHOD}) - public @interface ExcludedTest { - ProviderType[] providers(); - String comment(); - } - - /** - * Custom filter to exclude certain test functions. - * - */ - public static class ExcludeTestFilter extends Filter { - - Class> runnerClass; - Provider targetProvider; - Fast fast; - Presubmit presubmit; - - public ExcludeTestFilter(Class> runnerClass) { - this.runnerClass = runnerClass; - this.targetProvider = runnerClass.getAnnotation(Provider.class); - this.fast = runnerClass.getAnnotation(Fast.class); - this.presubmit = runnerClass.getAnnotation(Presubmit.class); - } - - @Override - public String describe() { - return "exclude certain tests on specific providers"; - } - - @Override - public boolean shouldRun(Description description) { - return isOkayToRunTest(description); - } - - private boolean isOkayToRunTest(Description description) { - if (targetProvider == null) { - // Run all test functions if the test runner is not annotated with {@code @Provider}. - return true; - } - // Skip @ExcludedTest tests - ExcludedTest excludedTest = description.getAnnotation(ExcludedTest.class); - if (excludedTest != null - && Arrays.asList(excludedTest.providers()).contains(targetProvider.value())) { - return false; - } - - // If the runner class is annotated with @Presubmit, skip non-presubmit tests - if (presubmit != null) { - NoPresubmitTest ignoreOn = description.getAnnotation(NoPresubmitTest.class); - if (ignoreOn != null - && Arrays.asList(ignoreOn.providers()).contains(targetProvider.value())) { - return false; - } - } - - // If the runner class is annotated with @Fast, skip slow tests - if (fast != null) { - SlowTest ignoreOn = description.getAnnotation(SlowTest.class); - if (ignoreOn != null - && Arrays.asList(ignoreOn.providers()).contains(targetProvider.value())) { - return false; - } - } - - // run everything else - return true; - } - } - - /** Required constructor: called by JUnit reflectively. */ - public WycheproofRunner(Class> runnerClass, RunnerBuilder builder) throws InitializationError { - super(runnerClass, builder); - addFilter(new ExcludeTestFilter(runnerClass)); - } - - private void addFilter(Filter filter) { - try { - filter(filter); - } catch (NoTestsRemainException ex) { - System.out.println("No tests remain exception: " + ex); - } - } -} diff --git a/java/com/google/security/wycheproof/testcases/AesEaxTest.java b/java/com/google/security/wycheproof/testcases/AesEaxTest.java deleted file mode 100644 index a259ec6..0000000 --- a/java/com/google/security/wycheproof/testcases/AesEaxTest.java +++ /dev/null @@ -1,289 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// TODO(bleichen): -// - So far only 16 byte tags are tested. -// - default values: BC uses a 64-bit default for tags. -// Tag size is not such a big problem as with AES-GCM, -// since a 64 bit tag gives 64 bit strength for AES-EAX. - -package com.google.security.wycheproof; - -import static org.junit.Assert.*; - -import javax.crypto.Cipher; -import javax.crypto.spec.GCMParameterSpec; -import javax.crypto.spec.SecretKeySpec; -import org.junit.Test; - -/** AES-EAX tests */ -public class AesEaxTest { - - /** Test vectors */ - public static class EaxTestVector { - final byte[] pt; - final byte[] aad; - final byte[] ct; - final String ptHex; - final String ctHex; - final GCMParameterSpec parameters; - final SecretKeySpec key; - - public EaxTestVector( - String message, String keyMaterial, String nonce, String aad, String ciphertext) { - this.ptHex = message; - this.pt = TestUtil.hexToBytes(message); - this.aad = TestUtil.hexToBytes(aad); - this.ct = TestUtil.hexToBytes(ciphertext); - this.ctHex = ciphertext; - // BouncyCastle uses GCMParameterSpec to specify the parameters for EAX. - // This solution is a bit of a hack, but so far we don't know a better way to - // specify these parameters. - // So far all test vectors use a 128 bit tag. - this.parameters = new GCMParameterSpec(128, TestUtil.hexToBytes(nonce)); - this.key = new SecretKeySpec(TestUtil.hexToBytes(keyMaterial), "AES"); - } - }; - - private static final EaxTestVector[] EAX_TEST_VECTOR = { - new EaxTestVector( - "", - "010511c5e24ee7097dca93272ebfae9e", - "93ad516bc6f7302b8edb884ca37f2e65", - "", - "12edfdb379ef62e845da3d17995b4a1e"), - new EaxTestVector( - "", - "acf877a5aa71e794efd6dc82d5b1a155", - "4e301710ae15b2f0ee6335d774741f7e", - "c0e0f00a919b7652", - "eb3dae1fc33be95848da9fd24e7dbae3"), - new EaxTestVector( - "c3", - "95d8e3675bbc3b96befdc5efb7433a68", - "0d40fdefd9289e3a49114454b3c4a5f4", - "f2", - "c5814dfc2f4ee1719bd5f1d5a649174c1a"), - new EaxTestVector( - "5810842d", - "2eed51af91b178b26e9b53c8877a7af6", - "e78747ca46cb9f2068e07717d5226e8a", - "", - "24245c5bb54aa8bfaceca3665867fa2d7de1653d"), - new EaxTestVector( - "5ae11bb3b7d60e55", - "cb782da180e97023530d1612e2287f0d", - "ba641ebe03057b387dd3132e0c7a3853", - "", - "f6f64fa858708b8f445812fd75a9639f635045fd5972b820"), - new EaxTestVector( - "54332ed26cd966761710ea58a8f248", - "8b4457d52e5c04b38d306f8f38480e97", - "3f9d6faca5dd97eb1bc74e1954304cca", - "", - "3ebbf1fe11e2f454e0ef587fb42a7588e1e32ea788cae20d1700584f448814"), - new EaxTestVector( - "82ce1f2934dcafe9dee7e0e7cbfdfcd0", - "2892cf62d2cc0e8e9c796624e05920f5", - "8a0da6d1c4b7a4f426ad62f6829cc310", - "c3ed66484eb367c8", - "c374afaa42d9497326af332f42d2dee8fb478c82a2b2567b0ab9597c93f137cf"), - new EaxTestVector( - "e0c993ff5d1d00b4cbee523a1df01db011794d54ab7a504c", - "463d89aadfa7d8158dcff9b9c3fc32aa", - "356ab4709b32fc85ff82f40561e9f08b", - "5ab01a3bfa141f8d33720bd1", - "d34bc706a9d7a2be6c2d8805cec2fac270ec6d17844b0911accb612cbb3b373438c74c1280445359"), - new EaxTestVector( - "e9dfb2897e44236880baf166fa62fa5b8a4713aa981dbc3fe6cf65d9f0c30f47", - "54617abbeb90fff7095b26af0e596064", - "2621c97c4fe379d9d42f04c479ae1bac", - "b6b29c2fbe29dcd2", - "212263116062443db28d6abd2c3bca880ea4d178282247fffbc10532d40e9cea" - + "6f580fdaca33d446dd6f38a4425be844"), - new EaxTestVector( - "7537f3e4cbe228468a7837c66aec8a9b6033cba4f1b3d8", - "7c74da83b1f292b869c891c80850e85f8237412e13a0bf3f", - "cfab2c573a0e723613e6e5b58787af60", - "", - "98a55f7db58fde8ed8bc00c01c97a6e5bda137b03e56e0dddfbe396c44a14646cbc89979f38736"), - // Some test vectors for counter overflow: - // Initial counter value == 2^128-1 - new EaxTestVector( - "0000000000000000000000000000000011111111111111111111111111111111", - "000102030405060708090a0b0c0d0e0f", - "3c8cc2970a008f75cc5beae2847258c2", - "", - "3c441f32ce07822364d7a2990e50bb13d7b02a26969e4a937e5e9073b0d9c968" - + "db90bdb3da3d00afd0fc6a83551da95e"), - // counter value overflows at 64-bit boundary - new EaxTestVector( - "0000000000000000000000000000000011111111111111111111111111111111", - "000102030405060708090a0b0c0d0e0f", - "aef03d00598494e9fb03cd7d8b590866", - "", - "d19ac59849026a91aa1b9aec29b11a202a4d739fd86c28e3ae3d588ea21d70c6" - + "c30f6cd9202074ed6e2a2a360eac8c47"), - // no counter overflow, but the 64 most significant bits are set. - new EaxTestVector( - "0000000000000000000000000000000011111111111111111111111111111111", - "000102030405060708090a0b0c0d0e0f", - "55d12511c696a80d0514d1ffba49cada", - "", - "2108558ac4b2c2d5cc66cea51d6210e046177a67631cd2dd8f09469733acb517" - + "fc355e87a267be3ae3e44c0bf3f99b2b"), - // counter value overflows at 32-bit boundary - new EaxTestVector( - "0000000000000000000000000000000011111111111111111111111111111111", - "000102030405060708090a0b0c0d0e0f", - "79422ddd91c4eee2deaef1f968305304", - "", - "4d2c1524ca4baa4eefcce6b91b227ee83abaff8105dcafa2ab191f5df2575035" - + "e2c865ce2d7abdac024c6f991a848390"), - // no counter overflow, but bits 32-64 and 96-128 are set. - new EaxTestVector( - "0000000000000000000000000000000011111111111111111111111111111111", - "000102030405060708090a0b0c0d0e0f", - "0af5aa7a7676e28306306bcd9bf2003a", - "", - "8eb01e62185d782eb9287a341a6862ac5257d6f9adc99ee0a24d9c22b3e9b38a" - + "39c339bc8a74c75e2c65c6119544d61e"), - // no counter overflow, lower 64 bits are 2^63-1 - new EaxTestVector( - "0000000000000000000000000000000011111111111111111111111111111111", - "000102030405060708090a0b0c0d0e0f", - "af5a03ae7edd73471bdcdfac5e194a60", - "", - "94c5d2aca6dbbce8c24513a25e095c0e54a942860d327a222a815cc713b163b4" - + "f50b30304e45c9d411e8df4508a98612"), - // counter overflow between block 2 and block 3. - new EaxTestVector( - "0000000000000000000000000000000011111111111111111111111111111111" - + "2222222222222222222222222222222233333333333333333333333333333333", - "000102030405060708090a0b0c0d0e0f", - "b37087680f0edd5a52228b8c7aaea664", - "", - "3bb6173e3772d4b62eef37f9ef0781f360b6c74be3bf6b371067bc1b090d9d66" - + "22a1fbec6ac471b3349cd4277a101d40890fbf27dfdcd0b4e3781f9806daabb6" - + "a0498745e59999ddc32d5b140241124e"), - // no counter overflow, the lower 64 bits are 2^63-4. - new EaxTestVector( - "0000000000000000000000000000000011111111111111111111111111111111" - + "2222222222222222222222222222222233333333333333333333333333333333" - + "44444444444444444444444444444444", - "000102030405060708090a0b0c0d0e0f", - "4f802da62a384555a19bc2b382eb25af", - "", - "e9b0bb8857818ce3201c3690d21daa7f264fb8ee93cc7a4674ea2fc32bf182fb" - + "2a7e8ad51507ad4f31cefc2356fe7936a7f6e19f95e88fdbf17620916d3a6f3d" - + "01fc17d358672f777fd4099246e436e167910be744b8315ae0eb6124590c5d8b"), - // 192-bit keys - new EaxTestVector( - "", - "03dd258601c1d4872a52b27892db0356911b2df1436dc7f4", - "723cb2022102113018dcd2d204022114", - "", - "c472b1c6c22b4f2b7e02409499aa2ade"), - new EaxTestVector( - "", - "d33dda72649575e42d6eb1f3255e686084b8a9cf4480803c", - "ad2a1d2ef236dfaeb109ab29b1084d63", - "fb9c0938a5d317fad5f43edc", - "6edc358f22358e1d328c4c1cd98184c6"), - new EaxTestVector( - "abcdef", - "03dd258601c1d4872a52b27892db0356911b2df1436dc7f4", - "025f3d2286c143976412022102696708231208", - "8917328de211", - "520f4f2cf1b893ae3ba8ecbac3a08ea57de2cd"), - new EaxTestVector( - "4e43dbebe316b7d684b56236fdd928dd", - "a36eed1cb54130f547664c184c249e777a3d8ba2e2251b58", - "e9587847b1e81511e0643f7dda5b725c", - "80c7cb954463b6067b081ff66b1d40cc", - "e2645cd32a6e8c1e7cd1991d879b335756f848aba8e51f0b56712bb2889c4783"), - new EaxTestVector( - "1111111111111111111111111111111122222222222222222222222222222222", - "0172acf299142c001d0c231287c1182784554ca3a21908276ac2c92af1294612", - "000102030405060708090a0b0c0d0e0f1a1b1c1d", - "77922d34e452e0a40962873d22901dd22ad1c303", - "5917879b9fa85f4007b7bd0cd46f067d5a7bf287f19dfcc5475c95a4acce520a" - + "4c5df804bc091a3b5d6c838b7e494571"), - // 256-bit keys - new EaxTestVector( - "", - "0172acf299142c001d0c231287c1182784554ca3a21908276ac2c92af1294612", - "696708231208", - "", - "7c8f86f837a4f72c574678d92f637f07"), - new EaxTestVector( - "abcdef", - "0172acf299142c001d0c231287c1182784554ca3a21908276ac2c92af1294612", - "696708231208", - "8917328de211", - "12486c87bf9a7f22fa65a9493ec0f57f8070f5"), - new EaxTestVector( - "13d106d7be0890093f44a457d4cc5309", - "db50934278a8d8101d1c538acfbfaa13aba9fe53408b6205a0c996d53cf04e8d", - "eaef04607a36b2e1b1c539bc335aee9a", - "d50e7dbdcc7cf92822dd9dd762a0fc12", - "2202165697a2d21316c5f65d2aedb3c52b5567b3f8a25e247cfda1f02bc6cf6f"), - new EaxTestVector( - "17672288fff3e93a45b3b951bbcfa8a4cb", - "1cd28aca6542a4df7316b2c6e9232a4e2cc88cf7aaece33eec7da32ab514051f", - "d219298abb115ccbb473cf8e2da9671a", - "9c504ab2e5ce0f46844833aba6a11c9186e500239460bb26", - "aa518b62c5422e56ce393951aa0441e99df8cafb1555d5a30c90391bb9272c32b9"), - new EaxTestVector( - "1111111111111111111111111111111122222222222222222222222222222222", - "0172acf299142c001d0c231287c1182784554ca3a21908276ac2c92af1294612", - "000102030405060708090a0b0c0d0e0f1a1b1c1d", - "92d3e42e0409273291d2dc034450", - "5917879b9fa85f4007b7bd0cd46f067d5a7bf287f19dfcc5475c95a4acce520a" - + "e632946e4999be20159977431bef0454"), - }; - - @Test - public void testEax() throws Exception { - for (EaxTestVector test : EAX_TEST_VECTOR) { - Cipher cipher = Cipher.getInstance("AES/EAX/NoPadding"); - cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); - cipher.updateAAD(test.aad); - byte[] ct = cipher.doFinal(test.pt); - assertEquals(test.ctHex, TestUtil.bytesToHex(ct)); - } - } - - @Test - public void testLateUpdateAAD() throws Exception { - for (EaxTestVector test : EAX_TEST_VECTOR) { - Cipher cipher = Cipher.getInstance("AES/EAX/NoPadding"); - cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters); - byte[] c0 = cipher.update(test.pt); - try { - cipher.updateAAD(test.aad); - } catch (java.lang.IllegalStateException ex) { - // Typically one should pass the AAD in first. - // Hence it is OK to get this exception. - // For example, this is the behaviour of SUNJce. - continue; - } - byte[] c1 = cipher.doFinal(); - String result = TestUtil.bytesToHex(c0) + TestUtil.bytesToHex(c1); - assertEquals(test.ctHex, result); - } - } -} diff --git a/java/com/google/security/wycheproof/testcases/AesGcmTest.java b/java/com/google/security/wycheproof/testcases/AesGcmTest.java deleted file mode 100644 index 27873d4..0000000 --- a/java/com/google/security/wycheproof/testcases/AesGcmTest.java +++ /dev/null @@ -1,687 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import static org.junit.Assert.*; - -import com.google.security.wycheproof.WycheproofRunner.ExcludedTest; -import com.google.security.wycheproof.WycheproofRunner.ProviderType; -import com.google.security.wycheproof.WycheproofRunner.SlowTest; -import java.nio.ByteBuffer; -import java.security.AlgorithmParameterGenerator; -import java.security.AlgorithmParameters; -import java.security.InvalidAlgorithmParameterException; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.util.ArrayList; -import java.util.Arrays; -import javax.crypto.Cipher; -import javax.crypto.ShortBufferException; -import javax.crypto.spec.GCMParameterSpec; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; -import org.junit.Test; - -// TODO(bleichen): -// - For EAX I was able to derive some special cases by inverting OMAC. -// Not sure if that is possible here. -/** - * Testing AES-GCM - * - *
Other tests using AES-GCM are: CipherInputStreamTest.java CipherOuputStreamTest.java - */ -public class AesGcmTest { - - /** Test vectors */ - public static class GcmTestVector { - final byte[] pt; - final byte[] aad; - final byte[] ct; - final String ptHex; - final String ctHex; - final GCMParameterSpec parameters; - final SecretKeySpec key; - final int nonceLengthInBits; - final int tagLengthInBits; - - public GcmTestVector( - String message, - String keyMaterial, - String nonce, - String aad, - String ciphertext, - String tag) { - this.ptHex = message; - this.pt = TestUtil.hexToBytes(message); - this.aad = TestUtil.hexToBytes(aad); - this.ct = TestUtil.hexToBytes(ciphertext + tag); - this.ctHex = ciphertext + tag; - this.tagLengthInBits = 4 * tag.length(); - this.nonceLengthInBits = 4 * nonce.length(); - this.parameters = new GCMParameterSpec(tagLengthInBits, TestUtil.hexToBytes(nonce)); - this.key = new SecretKeySpec(TestUtil.hexToBytes(keyMaterial), "AES"); - } - }; - - private static final GcmTestVector[] GCM_TEST_VECTORS = { - new GcmTestVector( - "001d0c231287c1182784554ca3a21908", - "5b9604fe14eadba931b0ccf34843dab9", - "028318abc1824029138141a2", - "", - "26073cc1d851beff176384dc9896d5ff", - "0a3ea7a5487cb5f7d70fb6c58d038554"), - new GcmTestVector( - "001d0c231287c1182784554ca3a21908", - "5b9604fe14eadba931b0ccf34843dab9", - "921d2507fa8007b7bd067d34", - "00112233445566778899aabbccddeeff", - "49d8b9783e911913d87094d1f63cc765", - "1e348ba07cca2cf04c618cb4"), - new GcmTestVector( - "2035af313d1346ab00154fea78322105", - "aa023d0478dcb2b2312498293d9a9129", - "0432bc49ac34412081288127", - "aac39231129872a2", - "eea945f3d0f98cc0fbab472a0cf24e87", - "4bb9b4812519dadf9e1232016d068133"), - new GcmTestVector( - "2035af313d1346ab00154fea78322105", - "aa023d0478dcb2b2312498293d9a9129", - "0432bc49ac344120", - "aac39231129872a2", - "64c36bb3b732034e3a7d04efc5197785", - "b7d0dd70b00d65b97cfd080ff4b819d1"), - new GcmTestVector( - "02efd2e5782312827ed5d230189a2a342b277ce048462193", - "2034a82547276c83dd3212a813572bce", - "3254202d854734812398127a3d134421", - "1a0293d8f90219058902139013908190bc490890d3ff12a3", - "64069c2d58690561f27ee199e6b479b6369eec688672bde9", - "9b7abadd6e69c1d9ec925786534f5075"), - // GCM uses GHASH to compute the initial counter J0 if the nonce is not 12 bytes long. - // The counter is incremented modulo 2^32 in counter mode. The following test vectors verify - // the behavior of an implementation for initial counter values J0 close to a 2^32 limit. - // J0:00000000000000000000000000000000 - new GcmTestVector( - "00000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00112233445566778899aabbccddeeff", - "7b95b8c356810a84711d68150a1b7750", - "", - "84d4c9c08b4f482861e3a9c6c35bc4d91df927374513bfd49f436bd73f325285daef4ff7e13d46a6", - "213a3cb93855d18e69337eee66aeec07"), - // J0:ffffffffffffffffffffffffffffffff - new GcmTestVector( - "00000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00112233445566778899aabbccddeeff", - "1a552e67cdc4dc1a33b824874ebf0bed", - "", - "948ca37a8e6649e88aeffb1c598f3607007702417ea0e0bc3c60ad5a949886de968cf53ea6462aed", - "99b381bfa2af9751c39d1b6e86d1be6a"), - // J0:000102030405060708090a0bffffffff - new GcmTestVector( - "00000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00112233445566778899aabbccddeeff", - "99821c2dd5daecded07300f577f7aff1", - "", - "127af9b39ecdfc57bb11a2847c7c2d3d8f938f40f877e0c4af37d0fe9af033052bd537c4ae978f60", - "07eb2fe4a958f8434d40684899507c7c"), - // J0:000102030405060708090a0bfffffffe - new GcmTestVector( - "00000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00112233445566778899aabbccddeeff", - "5e4a3900142358d1c774d8d124d8d27d", - "", - "0cf6ae47156b14dce03c8a07a2e172b1127af9b39ecdfc57bb11a2847c7c2d3d8f938f40f877e0c4", - "f145c2dcaf339eede427be934357eac0"), - }; - - /** - * Returns the GCM test vectors supported by the current provider. - * This is necessary since not every provider supports all parameters sizes. - * For example SUNJCE does not support 8 byte tags and Conscrypt only supports - * 12 byte nonces. - * Such restrictions are often made because AES-GCM is a relatively weak algorithm and - * especially small parameter sizes can lead to easy attacks. - * Avoiding such small parameter sizes should not be seen as a bug in the library. - * - *
The only assumption we make here is that all test vectors with 128 bit tags and nonces
- * with at least 96 bits are supported.
- */
- private Iterable For example, OpenJdk did compute incorrect tags in this case. The bug has been fixed in
- * http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/89c06ca1e6cc
- *
- * For example BouncyCastle computes correct tags if the calls are reversed, SunJCE and OpenJdk
- * now throw exceptions.
- */
- @Test
- public void testLateUpdateAAD() throws Exception {
- for (GcmTestVector test : getTestVectors()) {
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters);
- byte[] c0 = cipher.update(test.pt);
- try {
- cipher.updateAAD(test.aad);
- } catch (java.lang.IllegalStateException ex) {
- // Throwing an exception is valid behaviour.
- continue;
- }
- byte[] c1 = cipher.doFinal();
- String result = TestUtil.bytesToHex(c0) + TestUtil.bytesToHex(c1);
- assertEquals(test.ctHex, result);
- }
- }
-
- /**
- * JCE has a dangerous feature: after a doFinal the cipher is typically reinitialized using the
- * previous IV. This "feature" can easily break AES-GCM usages, because encrypting twice with
- * the same key and IV leaks the authentication key. Hence any reasonable implementation of
- * AES-GCM should not allow this. The expected behaviour of OpenJDK can be derived from the tests
- * in jdk/test/com/sun/crypto/provider/Cipher/AES/TestGCMKeyAndIvCheck.java.
- * OpenJDK does not allow two consecutive initializations for encryption with the same key and IV.
- *
- * The test here is weaker than the restrictions in OpenJDK. The only requirement here is that
- * reusing a Cipher without an explicit init() is caught.
- *
- * BouncyCastle 1.52 failed this test
- *
- * Conscrypt failed this test
- */
- @Test
- public void testIvReuse() throws Exception {
- for (GcmTestVector test : getTestVectors()) {
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters);
- cipher.updateAAD(test.aad);
- byte[] ct1 = cipher.doFinal(test.pt);
- try {
- byte[] ct2 = cipher.doFinal(test.pt);
- fail(
- "It should not possible to reuse an IV."
- + " ct1:"
- + TestUtil.bytesToHex(ct1)
- + " ct2:"
- + TestUtil.bytesToHex(ct2));
- } catch (java.lang.IllegalStateException ex) {
- // This is expected.
- }
- }
- }
-
- /** Encryption with ByteBuffers. */
- @Test
- public void testByteBuffer() throws Exception {
- for (GcmTestVector test : getTestVectors()) {
- // Encryption
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- ByteBuffer ptBuffer = ByteBuffer.wrap(test.pt);
- cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters);
- int outputSize = cipher.getOutputSize(test.pt.length);
- ByteBuffer ctBuffer = ByteBuffer.allocate(outputSize);
- cipher.updateAAD(test.aad);
- cipher.doFinal(ptBuffer, ctBuffer);
- assertEquals(test.ctHex, TestUtil.byteBufferToHex(ctBuffer));
-
- // Decryption
- ctBuffer.flip();
- cipher.init(Cipher.DECRYPT_MODE, test.key, test.parameters);
- outputSize = cipher.getOutputSize(test.ct.length);
- ByteBuffer decrypted = ByteBuffer.allocate(outputSize);
- cipher.updateAAD(test.aad);
- cipher.doFinal(ctBuffer, decrypted);
- assertEquals(test.ptHex, TestUtil.byteBufferToHex(decrypted));
- }
- }
-
- /** Encryption with ByteBuffers should be copy-safe. */
- @Test
- public void testByteBufferAlias() throws Exception {
- for (GcmTestVector test : getTestVectors()) {
- // Encryption
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters);
- int outputSize = cipher.getOutputSize(test.pt.length);
- byte[] backingArray = new byte[outputSize];
- ByteBuffer ptBuffer = ByteBuffer.wrap(backingArray);
- ptBuffer.put(test.pt);
- ptBuffer.flip();
- ByteBuffer ctBuffer = ByteBuffer.wrap(backingArray);
- cipher.updateAAD(test.aad);
- cipher.doFinal(ptBuffer, ctBuffer);
- assertEquals(test.ctHex, TestUtil.byteBufferToHex(ctBuffer));
-
- // Decryption
- ByteBuffer decrypted = ByteBuffer.wrap(backingArray);
- ctBuffer.flip();
- cipher.init(Cipher.DECRYPT_MODE, test.key, test.parameters);
- cipher.updateAAD(test.aad);
- cipher.doFinal(ctBuffer, decrypted);
- assertEquals(test.ptHex, TestUtil.byteBufferToHex(decrypted));
- }
- }
-
- /** Encryption and decryption with large arrays should be copy-safe. */
- @Test
- public void testLargeArrayAlias() throws Exception {
- byte[] ptVector = new byte[8192];
-
- // this offset is relative to the start of the input, not the start of the buffer.
- for (int outputOffset = -32; outputOffset <= 32; outputOffset++) {
- // try with doFinal directly as well as with update followed by doFinal
- for (int useUpdate = 0; useUpdate <= 1; useUpdate++) {
- SecretKeySpec key = new SecretKeySpec(new byte[16], "AES");
- GCMParameterSpec parameters = new GCMParameterSpec(128, new byte[16]);
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- cipher.init(Cipher.ENCRYPT_MODE, key, parameters);
-
- // these offsets are relative to the start of the buffer
- int inputOffsetInBuffer = 32;
- int outputOffsetInBuffer = inputOffsetInBuffer + outputOffset;
- int sliceLength = cipher.getOutputSize(ptVector.length);
-
- byte[] inBuf = new byte[sliceLength + Math.max(inputOffsetInBuffer, outputOffsetInBuffer)];
- byte[] outBuf = inBuf;
-
- System.arraycopy(ptVector, 0, inBuf, inputOffsetInBuffer, ptVector.length);
-
- try {
- int ctLength = 0;
- if (useUpdate > 0) {
- ctLength += cipher.update(inBuf, inputOffsetInBuffer, ptVector.length, outBuf, outputOffsetInBuffer);
- ctLength += cipher.doFinal(inBuf, 0, 0, outBuf, outputOffsetInBuffer + ctLength);
- } else {
- ctLength += cipher.doFinal(inBuf, inputOffsetInBuffer, ptVector.length, outBuf, outputOffsetInBuffer);
- }
-
- System.arraycopy(outBuf, outputOffsetInBuffer, inBuf, inputOffsetInBuffer, ctLength);
-
- cipher = Cipher.getInstance("AES/GCM/NoPadding");
- cipher.init(Cipher.DECRYPT_MODE, key, parameters);
-
- int resultPtLength = 0;
- if (useUpdate > 0) {
- resultPtLength += cipher.update(inBuf, inputOffsetInBuffer, ctLength, outBuf, outputOffsetInBuffer);
- resultPtLength += cipher.doFinal(inBuf, 0, 0, outBuf, outputOffsetInBuffer + resultPtLength);
- } else {
- resultPtLength += cipher.doFinal(inBuf, inputOffsetInBuffer, ctLength, outBuf, outputOffsetInBuffer);
- }
-
- assertEquals(resultPtLength, ptVector.length);
- assertArrayEquals(ptVector,
- Arrays.copyOfRange(outBuf, outputOffsetInBuffer, outputOffsetInBuffer + resultPtLength));
- } catch (Throwable t) {
- throw new AssertionError("testLargeByteBufferAlias failed with outputOffset=" + outputOffset, t);
- }
- }
- }
- }
-
- /**
- * Encryption with ByteBuffers should be copy-safe even if the buffers have different starting
- * offsets and/or do not make the backing array visible.
- *
- * Note that bugs in this often require a sizeable input to reproduce; the default implementation
- * of engineUpdate(ByteBuffer, ByteBuffer) copies through 4KB bounce buffers, so we need to use
- * something larger to see any problems - 8KB is what we use here.
- *
- * @see https://bugs.openjdk.java.net/browse/JDK-8181386
- */
- @Test
- public void testByteBufferShiftedAlias() throws Exception {
- byte[] ptVector = new byte[8192];
-
- for (int i = 0; i < 3; i++) {
- // outputOffset = offset relative to start of input.
- for (int outputOffset = -1; outputOffset <= 1; outputOffset++) {
-
- SecretKeySpec key = new SecretKeySpec(new byte[16], "AES");
- GCMParameterSpec parameters = new GCMParameterSpec(128, new byte[16]);
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- cipher.init(Cipher.ENCRYPT_MODE, key, parameters);
-
- ByteBuffer output, input, inputRO;
-
- // We'll try three scenarios: Ordinary array backed buffers, array backed buffers where one
- // is read-only, and direct byte buffers.
- String mode;
- // offsets relative to start of buffer
- int inputOffsetInBuffer = 1;
- int outputOffsetInBuffer = inputOffsetInBuffer + outputOffset;
- int sliceLength = cipher.getOutputSize(ptVector.length);
- int bufferSize = sliceLength + Math.max(inputOffsetInBuffer, outputOffsetInBuffer);
- switch (i) {
- case 0:
- case 1: {
- byte[] buffer = new byte[bufferSize];
- // It's important to slice() here as otherwise later when we flip() position will be
- // reset to 0.
- output = ByteBuffer.wrap(buffer, outputOffsetInBuffer, sliceLength).slice();
- input = ByteBuffer.wrap(buffer, inputOffsetInBuffer, sliceLength).slice();
-
- if (i == 1) {
- mode = "array backed buffers with RO buffer";
- inputRO = input.asReadOnlyBuffer();
- } else {
- mode = "array backed buffers";
- inputRO = input.duplicate();
- }
-
- break;
- }
- case 2: {
- mode = "direct buffers";
- ByteBuffer buf = ByteBuffer.allocateDirect(bufferSize);
- output = buf.duplicate();
- output.position(outputOffsetInBuffer);
- output.limit(sliceLength + outputOffsetInBuffer);
- output = output.slice();
-
- input = buf.duplicate();
- input.position(inputOffsetInBuffer);
- input.limit(sliceLength + inputOffsetInBuffer);
- input = input.slice();
-
- inputRO = input.duplicate();
- break;
- }
- default: {
- throw new AssertionError("Unknown test index " + i);
- }
- }
-
- // Now that we have our overlapping 'input' and 'output' buffers, we can write our plaintext
- // into the input buffer.
- input.put(ptVector);
- input.flip();
- // Make sure the RO input buffer has the same limit in case the plaintext is shorter than
- // sliceLength (which it generally will be for anything other than ECB or CTR mode)
- inputRO.limit(input.limit());
-
- try {
-
- int ctSize = cipher.doFinal(inputRO, output);
-
- // Now flip the buffers around and undo everything
- byte[] tmp = new byte[ctSize];
- output.flip();
- output.get(tmp);
-
- output.clear();
- input.clear();
- inputRO.clear();
-
- input.put(tmp);
- input.flip();
- inputRO.limit(input.limit());
-
- cipher.init(Cipher.DECRYPT_MODE, key, parameters);
- cipher.doFinal(inputRO, output);
-
- output.flip();
- assertEquals(ByteBuffer.wrap(ptVector), output);
- } catch (Throwable t) {
- throw new AssertionError("Overlapping buffers test failed with buffer type: "
- + mode + " and output offset " + outputOffset, t);
- }
- }
- }
-
- }
-
- @Test
- public void testReadOnlyByteBuffer() throws Exception {
- for (GcmTestVector test : getTestVectors()) {
- // Encryption
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- ByteBuffer ptBuffer = ByteBuffer.wrap(test.pt).asReadOnlyBuffer();
- cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters);
- int outputSize = cipher.getOutputSize(test.pt.length);
- ByteBuffer ctBuffer = ByteBuffer.allocate(outputSize);
- cipher.updateAAD(test.aad);
- cipher.doFinal(ptBuffer, ctBuffer);
- assertEquals(test.ctHex, TestUtil.byteBufferToHex(ctBuffer));
-
- // Decryption
- ctBuffer.flip();
- ctBuffer = ctBuffer.asReadOnlyBuffer();
- cipher.init(Cipher.DECRYPT_MODE, test.key, test.parameters);
- outputSize = cipher.getOutputSize(test.ct.length);
- ByteBuffer decrypted = ByteBuffer.allocate(outputSize);
- cipher.updateAAD(test.aad);
- cipher.doFinal(ctBuffer, decrypted);
- assertEquals(test.ptHex, TestUtil.byteBufferToHex(decrypted));
- }
- }
-
- /**
- * If a ByteBuffer is backed by an array and not readonly, then it is possible to access the data
- * through the .array() method. An implementation using this possiblity must ensure that it
- * considers the offset.
- */
- @Test
- public void testByteBufferWithOffset() throws Exception {
- for (GcmTestVector test : getTestVectors()) {
- // Encryption
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- ByteBuffer ptBuffer = ByteBuffer.wrap(new byte[test.pt.length + 50]);
- ptBuffer.position(5);
- ptBuffer = ptBuffer.slice();
- ptBuffer.put(test.pt);
- ptBuffer.flip();
-
- ByteBuffer ctBuffer = ByteBuffer.wrap(new byte[test.ct.length + 50]);
- ctBuffer.position(8);
- ctBuffer = ctBuffer.slice();
- cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters);
- cipher.updateAAD(test.aad);
- cipher.doFinal(ptBuffer, ctBuffer);
- assertEquals(test.ctHex, TestUtil.byteBufferToHex(ctBuffer));
- ctBuffer.flip();
-
- // Decryption
- ByteBuffer decBuffer = ByteBuffer.wrap(new byte[test.pt.length + 50]);
- decBuffer.position(6);
- decBuffer = decBuffer.slice();
- cipher.init(Cipher.DECRYPT_MODE, test.key, test.parameters);
- cipher.updateAAD(test.aad);
- cipher.doFinal(ctBuffer, decBuffer);
- assertEquals(test.ptHex, TestUtil.byteBufferToHex(decBuffer));
- }
- }
-
- @Test
- public void testByteBufferTooShort() throws Exception {
- for (GcmTestVector test : getTestVectors()) {
- // Encryption
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- ByteBuffer ptBuffer = ByteBuffer.wrap(test.pt);
- ByteBuffer ctBuffer = ByteBuffer.allocate(test.ct.length - 1);
- cipher.init(Cipher.ENCRYPT_MODE, test.key, test.parameters);
- cipher.updateAAD(test.aad);
- try {
- cipher.doFinal(ptBuffer, ctBuffer);
- fail("This should not work");
- } catch (ShortBufferException ex) {
- // expected
- }
-
- // Decryption
- ctBuffer = ByteBuffer.wrap(test.ct);
- ByteBuffer decrypted = ByteBuffer.allocate(test.pt.length - 1);
- cipher.init(Cipher.DECRYPT_MODE, test.key, test.parameters);
- cipher.updateAAD(test.aad);
- try {
- cipher.doFinal(ctBuffer, decrypted);
- fail("This should not work");
- } catch (ShortBufferException ex) {
- // expected
- }
- }
- }
-
- /**
- * The default authentication tag size should be 128-bit by default for the following reasons:
- * BouncyCastle used to have this bug (CVE-2015-6644).
- *
- * OpenJDK8 used to have this bug (http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/0c3ed12cdaf5)
- *
- * The test is slow as we have to encrypt 2^32 blocks.
- */
- // TODO(quannguyen): Is there a faster way to test it?
- @ExcludedTest(
- providers = {ProviderType.CONSCRYPT},
- comment = "Conscrypt doesn't support streaming, would crash")
- @SlowTest(
- providers = {ProviderType.BOUNCY_CASTLE, ProviderType.SPONGY_CASTLE, ProviderType.OPENJDK})
- @Test
- public void testWrappedAroundCounter() throws Exception {
- try {
- byte[] iv = new byte[12];
- byte[] input = new byte[16];
- byte[] key = new byte[16];
- (new SecureRandom()).nextBytes(key);
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- cipher.init(
- Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES"), new GCMParameterSpec(16 * 8, iv));
- byte[] output = cipher.update(input);
- for (long i = 0; i < 4294967296L + 2; i++) {
- byte[] output1 = cipher.update(input);
- assertFalse("GCM Wrapped Around Counter" + i, Arrays.equals(output, output1));
- }
- fail("Expected Exception");
- } catch (Exception expected) {
- System.out.println("testWrappedAroundcounter:" + expected.toString());
- }
- }
-}
diff --git a/java/com/google/security/wycheproof/testcases/BasicTest.java b/java/com/google/security/wycheproof/testcases/BasicTest.java
deleted file mode 100644
index c4c2816..0000000
--- a/java/com/google/security/wycheproof/testcases/BasicTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @license
- * Copyright 2016 Google Inc. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.security.wycheproof;
-
-import static org.junit.Assert.*;
-
-import java.security.Provider;
-import java.security.Security;
-import java.util.TreeSet;
-import org.junit.Test;
-
-/** Not a true test: reports information about the provider. */
-public class BasicTest {
-
- /** List all algorithms known to the security manager. */
- @Test
- public void testListAllAlgorithms() {
- for (Provider p : Security.getProviders()) {
- System.out.println();
- System.out.println("Provider:" + p.getName());
- // Using a TreeSet here, because the elements are sorted.
- TreeSet This unit tests focuses on checking security relevant properties.
- */
-public class BigIntegerTest {
- public static final BigInteger[] NONPRIMES =
- new BigInteger[] {
- // small non prime integers
- new BigInteger("-1"),
- new BigInteger("0"),
- new BigInteger("1"),
- // If p is prime then the Mersenne number 2^p-1 is pseudoprime for base 2.
- new BigInteger("147573952589676412927"),
- new BigInteger("2361183241434822606847"),
- // pseudoprime squares derived from Wiefrich primes
- new BigInteger("1194649"),
- new BigInteger("12327121"),
- // G. Jaeschke: "On strong pseudoprimes to several bases", Math o. comp. v.61, p 915-926
- new BigInteger("2152302898747"),
- new BigInteger("3474749660383"),
- new BigInteger("341550071728321"),
- new BigInteger("41234316135705689041"),
- new BigInteger("1553360566073143205541002401"),
- new BigInteger("56897193526942024370326972321"),
- // A list of strong pseudoprimes to 12 or more bases from
- // https://arxiv.org/pdf/1509.00864v1.pdf
- new BigInteger("360681321802296925566181"),
- new BigInteger("164280218643672633986221"),
- new BigInteger("318665857834031151167461"),
- new BigInteger("7395010240794120709381"),
- new BigInteger("2995741773170734841812261"),
- new BigInteger("667636712015520329618581"),
- new BigInteger("3317044064679887385961981"),
- new BigInteger("3110269097300703345712981"),
- new BigInteger("552727880697763694556181"),
- new BigInteger("3404730287403079539471001"),
- // Richarg G.E. Pinch, "Some primality testing algorithms"
- // Some composites that passed Maple V's primality test.
- new BigInteger("10710604680091"),
- new BigInteger("4498414682539051"),
- new BigInteger("6830509209595831"),
- // Composites that passed the primality test of Mathematica 2.0
- new BigInteger("38200901201"),
- new BigInteger("6646915915638769"),
- // Composites that passed Axioms primality tests
- new BigInteger("168790877523676911809192454171451"),
- new BigInteger("68528663395046912244223605902738356719751082784386681071"),
- // A composite q that was acceptied by Gnu Crypto. p = 2*q + 1 is prime and could have been
- // used to break the SRP with that library.
- // http://www.iacr.org/archive/pkc2005/33860010/33860010.pdf
- new BigInteger(
- "2338274894573145273314679073561004052325493799717332496500873981"
- + "9154269566267911565762670147721173495706686483597956042863296855"
- + "8985491020031718032728786934761830612407539788738389834804112831"
- + "0484933712924414264511799715503596253054638290097305254378560604"
- + "3457282155730383806702845548017315217454390994052035233808454053"
- + "2209678251"),
- // I. Damgard, P. Landrock, and C. Pomerance. "Average case error estimates for the strong
- // probable prime test." Math. of Comp. v.61 (203), pp. 177-194.
- //
- // This paper gives bounds for the number of bases necessary to distinguish composites from
- // primes assuming that the tested integer has been chosen at random.
- //
- // The result is sometimes misinterpreted and used for pseudo primality tests. There the
- // assumption of the paper may not be valid, especially if the integer to test has been
- // chosen by a potentially malicious party. The following pseudoprimes are 1024 to 1280 bits
- // long, pass the MR test for about 1/4 of all bases. They may expose pseudo primality tests
- // that misinterpret the paper above.
- new BigInteger(
- "1730626114143993906582329178627391355248485443639984363030847275"
- + "1308542667309368405802823431259718338553667079600118481458180717"
- + "8685660312964257923307841168376622412972295432300191118906455596"
- + "0636099366430317210651098229261736987868487865820945209431391380"
- + "09108180649097618810676094425505547347369635059151651"),
- new BigInteger(
- "1360998858923994584770803056737393786894832450662215840614559215"
- + "7078401469699701619693552331616875038702785662417391573713804038"
- + "4334162971247398689854706029275431407028615888533012918610480990"
- + "0223861487963796923928503972465761214360888693859314270808955367"
- + "40913457414488449790876563256100025424908640036566991"),
- new BigInteger(
- "3166883756083864374213797577792765404121225450334428749136082272"
- + "6277047033553982548405648549530365358167591776542577633638251648"
- + "4708794514891794859629545011811469601460428778510574606216627610"
- + "9305946545256861710197652701722202600572822026157108510694466031"
- + "21873496655525294839125742517721479483987924741221051"),
- new BigInteger(
- "1867856940026786421328012256561867196437042470176831233408635728"
- + "4012048133274069029642553787088950310027377534718962029124718226"
- + "6051117402306961193255486702389001315623336948708913938663766675"
- + "8226042898352219886123870222547007370332879734207273564946511954"
- + "31833673259400609717994958747847898007198993092012403"),
- new BigInteger(
- "1796390661263009677994016718416108866609292079197277387452323006"
- + "0275054640418696223480642324316099214952402651731083265854610369"
- + "8224730515713772933976457906751697355710699183284927973990745341"
- + "2311585789546147810071014069499060003398982340466066800822746698"
- + "64309065127941774208780103317444828873858305613764441"),
- new BigInteger(
- "1971945240855615239359385779848543278459852521629467703761094672"
- + "8118959477624582999696057042356627216821194209090396598966531204"
- + "6718418693934025583647341695134065566474352554207810854787929284"
- + "0150420997586371167811999782663434687606795518115913678131471778"
- + "75984898571603525952885934025286780854976730638309011"),
- new BigInteger(
- "3150008132483461686934076250569912489352161839369648385736587811"
- + "5997183822673267428826594197361084397177321281419482762875475084"
- + "9549588421903702315436565970387119142993552663715551586581960248"
- + "0385985798377103010348982470471826679560834315129605222126122792"
- + "66245495948831504762364224662571600318327270033084451"),
- new BigInteger(
- "1708946102366142320715649564941267111465045510329061281476212740"
- + "3257341007679575909346478379354045686824680545379443269343860874"
- + "7656833753674500442989626468892341565281803639470271121897646438"
- + "0297951614184327979794615696929197488480659590917557764806142256"
- + "64177795195470929762281195447906351417368682849843661"),
- new BigInteger(
- "3440003701993474165051634746793659123122285886429390887874425798"
- + "0539628797086399700050400512078053335053587477375429177907276765"
- + "7299212000552180980839328379536622696237474649639004862671352175"
- + "9289352494669383679530748723706821659664185661303953233767365167"
- + "67872755699135674189217223109386132423577475778316621"),
- new BigInteger(
- "1384489093437226718803143517408309162781203263729355872818628349"
- + "4469526441585078582037579393159945688413133085030944516305313234"
- + "8118439725196722488178936032989162127096990828542718648126854836"
- + "3215014994571003679167792328172868632219526006267874696849394364"
- + "51238457213158274397103569820623680840515654121967511"),
- new BigInteger(
- "3164393868232068713466361644489248900506521258778648162638744470"
- + "1911965299134147189251276735683301303659631352068168884603764242"
- + "2058303711027020977731971469313828021385806157441077657252831199"
- + "5151267291454080409585783805054468065763411635886980943812129069"
- + "12979884469786023782783106107762632814558326808787771"),
- new BigInteger(
- "3429610981008641614862240834440649965306153336087134811684334214"
- + "2781784784880823158748073620472850986640780368357758806487624898"
- + "6627917970721407574366482474956464008840562218539437088991213443"
- + "6865812444686702307687466249240837612849694711488568460832793683"
- + "75653516879275492605255161494494045951397742913942521"),
- new BigInteger(
- "1452625971469501984029833170297844688666257429198467445330023676"
- + "9656278238192507513913993052034672663086092503841752084104847874"
- + "8173408690100803386628315407260460724324957380860416531476612359"
- + "3906755149555321240901275978836270398698785709389076413509994529"
- + "42901485886289548101644664410043634050840333618736241"),
- new BigInteger(
- "1038759703926769528247935492263828939187707228977771863002037516"
- + "6447956205097712397228992931571755867770661683705025240420111189"
- + "2868394359927108413461144788316226799790655169187714036057483534"
- + "1379449940364129845302840193911613461736295410032863048528135257"
- + "04436628490382188950208123780350213139500089456366841"),
- new BigInteger(
- "2092626848347087607813788288260128832160456227715887480495928337"
- + "8143090879636401536763351823849725734769339835456348322174433133"
- + "2528919261931329808331753456631473557050588173643619875493912344"
- + "2621229276297788264420214803881217267094948976676445054939538411"
- + "22580436721054077839958796624587867034849970594728503"),
- new BigInteger(
- "2599619740922490310102276030628575944314398371981276430688469612"
- + "6677200542107317525516057185980658562393307608335402672015071146"
- + "4375869967746325500371685760342898099183114419807958654613613854"
- + "3992594086574371567802232690430810966098771990068625112489903295"
- + "89067604336669355585402887916288037943709029191674911"),
- new BigInteger(
- "1484944124031033226177904474729672080414277081288126930486713099"
- + "2951571588154552341076434413035940622712601649739964234772603407"
- + "4857469854866669198948655053082186111410005989963123962723450119"
- + "6642285521712848015932226566546835102733706632115364632204156914"
- + "64644614536183219912321808854090915103775109695786903"),
- new BigInteger(
- "1989518237873611249304118136102198299910749751063921465712157675"
- + "0160983808717982713586255483659294934004326549705203383719900307"
- + "1263871954417468537542759843054899935687365194283002403584007149"
- + "4878371117610681917576307737065411378178051858121032451282900716"
- + "73542006653340382017735899123084476453857081318545991"),
- new BigInteger(
- "1001516549472529960430483041632117547467775871427023066924341669"
- + "8403875533009883195522874469432253701609651260735835128759135299"
- + "5655554893223580483857764100115214746205606713424344869011314868"
- + "3107942731565140938612794494135227597999675233998980692687287393"
- + "67463341929936509718884001903262839905032784262429503"),
- new BigInteger(
- "9523120659259647017050060990584944204556454726505878376759616021"
- + "0162649328723702952067039028722189901551617226203049071432575686"
- + "9121080710327716161595367835528315683397536615084723082551568364"
- + "5739952184995573677453019127607472426963971562388390300785220049"
- + "6655144350028488056721467755918814393298596327869403"),
- new BigInteger(
- "1132692896131390459872218381686704761578367301590229517271338668"
- + "7180351798454882497438382954425835621126393661367213143371283272"
- + "0317909560575328664237540188143415517690966913820407105917871661"
- + "6365405171372246705778112163771743546945868623307467307997875571"
- + "40869529264839386342569691698111927128704157615097153"),
- new BigInteger(
- "1468478445343635885853097900396288249751127795088868633754583040"
- + "9902362001013473990040942210829761549194134324343879441927807081"
- + "4832779046634885071582835688508933384516245429006116427382617949"
- + "0797131644177507421862332328509904031871287120929769029086074503"
- + "38866991708762791875618755240139448209180903665732503"),
- new BigInteger(
- "3584128102219288461651881096063603237206550481422480899564693370"
- + "6989198816192527918220789937223699304075118319904981106473056074"
- + "6022073963857677172123650694187762839204698560127083582857191356"
- + "7619601857134928125369766912580367127840531257344393938629885107"
- + "16841734490107828355376447675347185589367615046902903"),
- new BigInteger(
- "1364132540730201251194341844655148002850736352953819312409033451"
- + "0581806956034928961765696532883678319811153534823893271895441595"
- + "1560405730847235775035340408484490592989244418679611824558459897"
- + "3970103405588145228028549820125837425523682281669049087481368021"
- + "33702260393866732616878693744975284760231993354960641"),
- new BigInteger(
- "1201213090774136737579735845388953400530787071160074364126728551"
- + "5147303301856817241515212573079940841340044269783294804816431383"
- + "8284868252529547559069691488487393115675459439240223181642866729"
- + "3429931964973711015111163544551414299071832349845971998375812575"
- + "43510797169400923829329952407436122292964382266031253"),
- new BigInteger(
- "2749611624987217008377958765718501619519235049877079452181305657"
- + "4724564026272242180811435338643866876903591496649439319889570905"
- + "0358277453956447636555409300854018401232502616530331143658908539"
- + "1682266093367017969369633046927346949982338985082398103545735993"
- + "26268702707614772584950389057955691219494031838859791"),
- new BigInteger(
- "2472982114742145360236684931488791833991329788857529670921519821"
- + "2275589064185672494327017904494686810840150314271250166999768972"
- + "5488277075239138647902134463451436706674384070937644414378922408"
- + "3974240802538174272534726968041801996779685771019246098603577098"
- + "48139330190576017582503777009836399771498662905893541"),
- new BigInteger(
- "1865347188865809981733701115448160790425846704558108501171803277"
- + "4616363375301457541345495992357828826645510919897778446537615423"
- + "0882378024111971510810465276396395657415178370245114122816237302"
- + "3283933030997110906700611097744954222271394790237582780817507949"
- + "50528224900273599212004329531461848157373189908642761"),
- new BigInteger(
- "2852220663043188088074403487569592065121097371561337653207919689"
- + "5806125544163953214258963319594971029379263400735515369955250013"
- + "4028759770788754166339078427645792536001991144766729628117371050"
- + "3065276544543379585207323093069812639902415298676791716773723086"
- + "01834079961869281917489638496882679996929360595283091"),
- new BigInteger(
- "1812266945737014247808099956042081894034544124660090203840602123"
- + "8933795306490611245152382127750687774085253618514158494675518742"
- + "0904863344271961110077635791220319963938065397633608138595169161"
- + "4365952732191284608496816156732317034130054052863296504407952482"
- + "70402413500178325587999299003705988651612697260381081"),
- new BigInteger(
- "3461478020849089881636057301867459968070516872602987322072552610"
- + "6122696717667098851127207650635960731479969936151065921604956606"
- + "9966154794154897232197433347544538725616640069913605417680979153"
- + "7941663920296351630552463916932109774095427601318332413237900565"
- + "33380330505490643091283956267491266793755039018149751"),
- new BigInteger(
- "2919979800970068658905539811038971051531482233418344434620488229"
- + "7069955478191515351496193695554391114007400265274653645749899336"
- + "1682279972987736655018586409178146143048864596533190807270958265"
- + "8386345811616055097769189859096393752934393213978617302764485594"
- + "27971296399182413971389773786687947710326691137231821"),
- new BigInteger(
- "4145154657949019520090421067892641813006171355169512965016842717"
- + "9656056083456770700476740539321891137934371895885040718614132068"
- + "7659642286859932894319946334724710913927915623235424403674960713"
- + "3015105499354740364264523832014989327244648027567866644179973588"
- + "6851400410006028767095438327490143741004842299878541824964849824"
- + "9350463409537126165182086675091928210325509674933575383432172361"
- + "1"),
- new BigInteger(
- "7263570684005586918409651676342477962666063384721447164820162267"
- + "3637900031379949446961412145104626127789865770334124795558653625"
- + "0265693033953361779942717984970881106667840356057452866357943677"
- + "0299187611159071848712668510417692823114550446719084221850233353"
- + "5448622581084864206413295247972240845959033925761759264503271102"
- + "8711358281311325650083539770515252900036932499310037595977096965"
- + "3"),
- new BigInteger(
- "3266663369261434628530741133725226939380890029427130078147736465"
- + "2996576096098663002890375510448427552966457154556853852292297530"
- + "3748877081504218804805934729044054195328441392083622877088337833"
- + "3839361634881282676119589334709165541036798092721269225600972531"
- + "5718770210834831734568895865334347621480511738343920340920819445"
- + "8602267925535790135884214787193459118783550610652631217006506945"
- + "3"),
- new BigInteger(
- "2714275054823322283846947242758076394288969833351667671546539844"
- + "8651643040817257191932781992745878593029648459331742640462067216"
- + "1697889841582474665251728415469605782526629276939159099241968231"
- + "4563946417035619325266947257091436696492494177352417584114484475"
- + "6610785746958696759938071286674788996869751533043564234638049802"
- + "5949514917474176492949501669603402532532836245346872590582496734"
- + "1"),
- new BigInteger(
- "9266983839147571189339684823228253420616685503762301572754412275"
- + "1127843293258964600702452397526178329259267484695086911638972315"
- + "4961995491900251718105624646921122900256992784437600453557273835"
- + "3861591882136393291951512396743267427648075154617935904316277726"
- + "4493865072538820667287351636308197262473273185496543102226470825"
- + "6662877019047683511136380480413028925833068997034750517865449915"
- + "3"),
- new BigInteger(
- "6943685859962113005380005918916483733270787990846044283782171250"
- + "1096851232736318325302320935157976786131666696364333532268184395"
- + "8665950723719162662956110077840013184726020313880442980629145593"
- + "2383952066228056762115442513166346145910224582828425403465971492"
- + "7260150227126350939033438077449255619231502836209591891037493966"
- + "9366963730251619187615962926310287121840421140621429191345783703"
- + "1"),
- new BigInteger(
- "8697498751458522624235585703214358189002281420472600166267178848"
- + "9809876665869248037334395420081653868096056103537493131465377226"
- + "0261527380426559408040456405219848362023445401145511114936506394"
- + "6240472545398288332411818055040869427951279027405975059749360297"
- + "5868667379863439430711990295232153128900808256212596912819669440"
- + "8461633147852596585348243485566178333170181585431955731179108942"
- + "1"),
- new BigInteger(
- "4252141813347264797276096871298065242070358505647997888003056375"
- + "0053145248543520793105289129514510723624029989029530989695904117"
- + "1040883775014117200916554841688641022136017868157290925811239787"
- + "3664014299809018676076741787758620956387796785085878200748397774"
- + "1000982778291877557074489243525397961477916369196578483491169386"
- + "2005017885694815977695115290403992818456642027646266206320076800"
- + "3"),
- new BigInteger(
- "3356647398302910967427184201762737607743709740247537918189248572"
- + "1755339542838026890625250818518527348898974773340867800840791470"
- + "3182072707032492007084043715576322632015800128489921814932124611"
- + "2300036417841991332124497348096579076242448857352000771247540736"
- + "1254949324799638105796121388483225300620211599611028678202393567"
- + "8095635541751658983704832859578366318530922805928053806070359946"
- + "1"),
- new BigInteger(
- "3687125575229624930459923973437509789116885700012081850445193578"
- + "4486423768425089350932846437401841871613673810991112360643320652"
- + "0225782089986669258803208183278659152741552450801685341843048568"
- + "1125008729650000322084879372381541270180139663134377177885154388"
- + "9558281508372272794193460069397070875763691455289959733530070186"
- + "0360525342531389354962332229432027179470095997955180502375530175"
- + "3"),
- new BigInteger(
- "6088560764944279853795552546797623009536823218028533977947580608"
- + "2015023514992395624319060987001625566234648211868300524182306472"
- + "7026872385780533326083682960047644674758988927136149502626557718"
- + "2561494515318563339483672950711193945073071458843901227339418284"
- + "3084182493461642555372639047162641075337152622892862251731700231"
- + "6672547426448574167370804559242233207791080547486632014153528258"
- + "1"),
- new BigInteger(
- "6081766267938901970682791123502557184373300073506187731779846380"
- + "4083193288475152882563422230130613717216469536080649276981712202"
- + "8895707724700107471391574673087393411637415445150131834443587280"
- + "4243131225731630921851260690656608624225797294197741881140769183"
- + "0474230365914155543155728342161658185646742117306992051014301383"
- + "8040790841165308968256142923362988225719340573836171022480960175"
- + "3"),
- new BigInteger(
- "5000879164859908887599881582814678322611278734193303790540199067"
- + "6946804876309491380295619810590406766227048051997595053442615914"
- + "2677702465219525342790323338314172797422380779526016709102650201"
- + "6058553529785304239405043134061167377896985489252957729348463979"
- + "6066933483020351454994081895283883114206539208013308687170796286"
- + "8268752695525736731805658439398227370325903928664994918343915975"
- + "3"),
- new BigInteger(
- "5033660524073962747735388920230339629907033897027296197974576730"
- + "5654422857706257645566447425553553516325935964234373316093019314"
- + "9125347663842235853602126989737378697014753612431648011618832921"
- + "3881347704723060451053853932258315572365588301231482715348124261"
- + "9244292433503547002496906691530720882968955274299548904791181715"
- + "4190217453383503386985567684902027707247767653326442247588135031"
- + "1"),
- new BigInteger(
- "7656692474335471169217545128846872228367812415627865759181393395"
- + "8241618825828371173259648247363305034462523584509943049089351382"
- + "5433879053475325827330864407124355159557574919864955631956757119"
- + "9044097578241324151657090338112756973390540016908863938814598847"
- + "5396824620980380695503598397306050849284639259137342875066075738"
- + "4060141031090753207116787791385102134328808638802350088507846845"
- + "1"),
- new BigInteger(
- "6916552449605114038869281931877716049700938960849845402874660241"
- + "3416574115770967736955518993475194932835724065347138687353620520"
- + "8331524408574865319265572656228099650675609929009824224767253657"
- + "5459382651810818256784829505942965567114371502731619372511210627"
- + "1610362520274480185346478545007812850057950851029848830710521787"
- + "8356932374617076535457900683468313279449103472700012568700849319"
- + "1"),
- // F. Arnault, "Rabin-Miller primality test: composite numbers which pass it", Math. comp.
- // v.64, n.209, p 355-361.
- //
- // A strong pseudoprime for the first 46 primes
- new BigInteger(
- "8038374574536394912570796143419421081388376882875581458374889175"
- + "2229742737653336521865023361639600454579150420236032087665699667"
- + "6098728404396540823292873879185086916685732826776177102938969773"
- + "9470167082304286871099974399765441448453411558724506334092790222"
- + "7529622941498423068816854043264575340183297861112989606448452161"
- + "91652872597534901"),
- // Richard G.E. Pinch, Absolute quadratic pseudorprimes
- // http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.210.6783&rep=rep1&type=pdf
- // Lucas-Charmichael-(-) numbers
- new BigInteger("28295303263921"),
- new BigInteger("443372888629441"),
- new BigInteger("582920080863121"),
- new BigInteger("894221105778001"),
- new BigInteger("2013745337604001"),
- // Lucas-Charmichael-(+) numbers
- new BigInteger("6479"),
- new BigInteger("84419"),
- new BigInteger("1930499"),
- new BigInteger("7110179"),
- new BigInteger("15857855"),
- new BigInteger("63278892599"),
- new BigInteger("79397009999"),
- };
-
- /**
- * Tests BigInteger.isProbablePrime with a list of composite integers. The integers have been
- * chosen to check for weak pseudoprimality tests. E.g., they are counterexamples to weak
- * implementations. The implementation in jdk uses a combination of a Miller-Rabin test and a
- * Lucas test. This is similar to the Baillie-PSW test
- * https://en.wikipedia.org/wiki/Baillie%E2%80%93PSW_primality_test
- */
- @Test
- public void testIsProbablePrime() throws Exception {
- // The probability that a non-prime passes should be at most 1-2^{-certainty}.
- int certainty = 80;
- for (BigInteger n : NONPRIMES) {
- if (n.isProbablePrime(certainty)) {
- fail("Composite number " + n.toString() + " passed as probable prime test");
- }
- }
- }
-}
diff --git a/java/com/google/security/wycheproof/testcases/CipherInputStreamTest.java b/java/com/google/security/wycheproof/testcases/CipherInputStreamTest.java
deleted file mode 100644
index cb8828c..0000000
--- a/java/com/google/security/wycheproof/testcases/CipherInputStreamTest.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/**
- * @license
- * Copyright 2016 Google Inc. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.security.wycheproof;
-
-import static org.junit.Assert.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-import java.security.spec.AlgorithmParameterSpec;
-import java.util.ArrayList;
-import java.util.Arrays;
-import javax.crypto.Cipher;
-import javax.crypto.CipherInputStream;
-import javax.crypto.spec.GCMParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
-import org.junit.Test;
-
-/** CipherInputStream tests */
-public class CipherInputStreamTest {
- static final SecureRandom rand = new SecureRandom();
-
- static byte[] randomBytes(int size) {
- byte[] bytes = new byte[size];
- rand.nextBytes(bytes);
- return bytes;
- }
-
- static SecretKeySpec randomKey(String algorithm, int keySizeInBytes) {
- return new SecretKeySpec(randomBytes(keySizeInBytes), "AES");
- }
-
- static AlgorithmParameterSpec randomParameters(
- String algorithm, int ivSizeInBytes, int tagSizeInBytes) {
- if ("AES/GCM/NoPadding".equals(algorithm) || "AES/EAX/NoPadding".equals(algorithm)) {
- return new GCMParameterSpec(8 * tagSizeInBytes, randomBytes(ivSizeInBytes));
- }
- return null;
- }
-
- /** Test vectors */
- public static class TestVector {
- public String algorithm;
- public SecretKeySpec key;
- public AlgorithmParameterSpec params;
- public byte[] pt;
- public byte[] aad;
- public byte[] ct;
-
- @SuppressWarnings("InsecureCryptoUsage")
- public TestVector(
- String algorithm, int keySize, int ivSize, int tagSize, int ptSize, int aadSize)
- throws Exception {
- this.algorithm = algorithm;
- this.key = randomKey(algorithm, keySize);
- this.params = randomParameters(algorithm, ivSize, tagSize);
- this.pt = randomBytes(ptSize);
- this.aad = randomBytes(aadSize);
- Cipher cipher = Cipher.getInstance(algorithm);
- cipher.init(Cipher.ENCRYPT_MODE, this.key, this.params);
- cipher.updateAAD(aad);
- this.ct = cipher.doFinal(pt);
- }
- }
-
- Iterable Subgroup confinment attacks:
- * The papers by van Oorshot and Wiener rsp. Lim and Lee show that Diffie-Hellman keys can
- * be found much faster if the short exponents are used and if the multiplicative group modulo p
- * contains small subgroups. In particular an attacker can try to send a public key that is an
- * element of a small subgroup. If the receiver does not check for such elements then may be
- * possible to find the private key modulo the order of the small subgroup.
- * Several countermeasures against such attacks have been proposed: For example IKE uses
- * fields of order p where p is a safe prime (i.e. q=(p-1)/2), hence the only elements of small
- * order are 1 and p-1.
- * NIST SP 800-56A rev. 2, Section 5.5.1.1 only requires that the size of the subgroup generated
- * by the generator g is big enough to prevent the baby-step giant-step algorithm. I.e. for 80-bit
- * security p must be at least 1024 bits long and the prime q must be at least 160 bits long. A 2048
- * bit prime p and a 224 bit prime q are sufficient for 112 bit security. To avoid subgroup
- * confinment attacks NIST requires that public keys are validated, i.e. by checking that a public
- * key y satisfies the conditions 2 <= y <= p-2 and y^q mod p == 1 (Section 5.6.2.3.1). Further,
- * after generating the shared secret z = y_a ^ x_b mod p each party should check that z != 1. RFC
- * 2785 contains similar recommendations.
- * The public key validation described by NIST requires that the order q of the generator g
- * is known to the verifier. Unfortunately, the order q is missing in PKCS #3. PKCS #3 describes
- * the Diffie-Hellman parameters only by the values p, g and optionally the key size in bits.
- *
- * The class DHParameterSpec that defines the Diffie-Hellman parameters in JCE contains the same
- * values as PKCS#3. In particular, it does not contain the order of the subgroup q.
- * Moreover, the SUN provider uses the minimal sizes specified by NIST for q.
- * Essentially the provider reuses the parameters for DSA.
- *
- * Therefore, there is no guarantee that an implementation of Diffie-Hellman is secure against
- * subgroup confinement attacks. Without a key validation it is insecure to use the key-pair
- * generation from NIST SP 800-56A Section 5.6.1.1 (The key-pair generation there only requires that
- * static and ephemeral private keys are randomly chosen in the range 1..q-1).
- *
- * To avoid big disasters the tests below require that key sizes are not minimal. I.e., currently
- * the tests require at least 512 bit keys for 1024 bit fields. We use this lower limit because that
- * is what the SUN provider is currently doing. TODO(bleichen): Find a reference supporting or
- * disproving that decision.
- *
- * References: P. C. van Oorschot, M. J. Wiener, "On Diffie-Hellman key agreement with short
- * exponents", Eurocrypt 96, pp 332–343.
- *
- * C.H. Lim and P.J. Lee, "A key recovery attack on discrete log-based schemes using a prime
- * order subgroup", CRYPTO' 98, pp 249–263.
- *
- * NIST SP 800-56A, revision 2, May 2013
- * http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar2.pdf
- *
- * PKCS #3, Diffie–Hellman Key Agreement
- * http://uk.emc.com/emc-plus/rsa-labs/standards-initiatives/pkcs-3-diffie-hellman-key-agreement-standar.htm
- *
- * RFC 2785, "Methods for Avoiding 'Small-Subgroup' Attacks on the Diffie-Hellman Key Agreement
- * Method for S/MIME", March 2000
- * https://www.ietf.org/rfc/rfc2785.txt
- *
- * D. Adrian et al. "Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice"
- * https://weakdh.org/imperfect-forward-secrecy-ccs15.pdf
- * A good analysis of various DH implementations.
- * Some misconfigurations pointed out in the paper are: p is composite, p-1 contains no large
- * prime factor, q is used instead of the generator g.
- *
- * Sources that might be used for additional tests:
- *
- * CVE-2015-3193: The Montgomery squaring implementation in crypto/bn/asm/x86_64-mont5.pl
- * in OpenSSL 1.0.2 before 1.0.2e on the x86_64 platform, as used by the BN_mod_exp function,
- * mishandles carry propagation
- * https://blog.fuzzing-project.org/31-Fuzzing-Math-miscalculations-in-OpenSSLs-BN_mod_exp-CVE-2015-3193.html
- *
- * CVE-2016-0739: libssh before 0.7.3 improperly truncates ephemeral secrets generated for the
- * (1) diffie-hellman-group1 and (2) diffie-hellman-group14 key exchange methods to 128 bits ...
- *
- * CVE-2015-1787 The ssl3_get_client_key_exchange function in s3_srvr.c in OpenSSL 1.0.2 before
- * 1.0.2a, when client authentication and an ephemeral Diffie-Hellman ciphersuite are enabled,
- * allows remote attackers to cause a denial of service (daemon crash) via a ClientKeyExchange
- * message with a length of zero.
- *
- * CVE-2015-0205 The ssl3_get_cert_verify function in s3_srvr.c in OpenSSL 1.0.0 before 1.0.0p
- * and 1.0.1 before 1.0.1k accepts client authentication with a Diffie-Hellman (DH) certificate
- * without requiring a CertificateVerify message, which allows remote attackers to obtain access
- * without knowledge of a private key via crafted TLS Handshake Protocol traffic to a server that
- * recognizes a Certification Authority with DH support.
- *
- * CVE-2016-0701 The DH_check_pub_key function in crypto/dh/dh_check.c in OpenSSL 1.0.2 before
- * 1.0.2f does not ensure that prime numbers are appropriate for Diffie-Hellman (DH) key exchange,
- * which makes it easier for remote attackers to discover a private DH exponent by making multiple
- * handshakes with a peer that chose an inappropriate number, as demonstrated by a number in an
- * X9.42 file.
- *
- * CVE-2006-1115 nCipher HSM before 2.22.6, when generating a Diffie-Hellman public/private key
- * pair without any specified DiscreteLogGroup parameters, chooses random parameters that could
- * allow an attacker to crack the private key in significantly less time than a brute force attack.
- *
- * CVE-2015-1716 Schannel in Microsoft Windows Server 2003 SP2, Windows Vista SP2, Windows Server
- * 2008 SP2 and R2 SP1, Windows 7 SP1, Windows 8, Windows 8.1, Windows Server 2012 Gold and R2, and
- * Windows RT Gold and 8.1 does not properly restrict Diffie-Hellman Ephemeral (DHE) key lengths,
- * which makes it easier for remote attackers to defeat cryptographic protection mechanisms via
- * unspecified vectors, aka "Schannel Information Disclosure Vulnerability.
- *
- * CVE-2015-2419: Random generation of the prime p allows Pohlig-Hellman and probably other
- * stuff.
- *
- * J. Fried et al. "A kilobit hidden SNFS discrete logarithm computation".
- * http://eprint.iacr.org/2016/961.pdf
- * Some crypto libraries use fields that can be broken with the SNFS.
- *
- * @author bleichen@google.com (Daniel Bleichenbacher)
- */
-public class DhTest {
- public DHParameterSpec ike1536() {
- final BigInteger p =
- new BigInteger(
- "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74"
- + "020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f1437"
- + "4fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed"
- + "ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf05"
- + "98da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb"
- + "9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff",
- 16);
- final BigInteger g = new BigInteger("2");
- return new DHParameterSpec(p, g);
- }
-
- public DHParameterSpec ike2048() {
- final BigInteger p =
- new BigInteger(
- "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74"
- + "020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f1437"
- + "4fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed"
- + "ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf05"
- + "98da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb"
- + "9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3b"
- + "e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf695581718"
- + "3995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff",
- 16);
- final BigInteger g = new BigInteger("2");
- return new DHParameterSpec(p, g);
- }
-
- // The default parameters returned for 1024 bit DH keys from OpenJdk as defined in
- // openjdk7/releases/v6/trunk/jdk/src/share/classes/sun/security/provider/ParameterCache.java
- // I.e., these are the same parameters as used for DSA.
- public DHParameterSpec openJdk1024() {
- final BigInteger p =
- new BigInteger(
- "fd7f53811d75122952df4a9c2eece4e7f611b7523cef4400c31e3f80b6512669"
- + "455d402251fb593d8d58fabfc5f5ba30f6cb9b556cd7813b801d346ff26660b7"
- + "6b9950a5a49f9fe8047b1022c24fbba9d7feb7c61bf83b57e7c6a8a6150f04fb"
- + "83f6d3c51ec3023554135a169132f675f3ae2b61d72aeff22203199dd14801c7",
- 16);
- final BigInteger unusedQ = new BigInteger("9760508f15230bccb292b982a2eb840bf0581cf5", 16);
- final BigInteger g =
- new BigInteger(
- "f7e1a085d69b3ddecbbcab5c36b857b97994afbbfa3aea82f9574c0b3d078267"
- + "5159578ebad4594fe67107108180b449167123e84c281613b7cf09328cc8a6e1"
- + "3c167a8b547c8d28e0a3ae1e2bb3a675916ea37f0bfa213562f1fb627a01243b"
- + "cca4f1bea8519089a883dfe15ae59f06928b665e807b552564014c3bfecf492a",
- 16);
- return new DHParameterSpec(p, g);
- }
-
- /** Check that key agreement using DH works. */
- @SuppressWarnings("InsecureCryptoUsage")
- @Test
- public void testDh() throws Exception {
- KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DH");
- DHParameterSpec dhparams = ike2048();
- keyGen.initialize(dhparams);
- KeyPair keyPairA = keyGen.generateKeyPair();
- KeyPair keyPairB = keyGen.generateKeyPair();
-
- KeyAgreement kaA = KeyAgreement.getInstance("DH");
- KeyAgreement kaB = KeyAgreement.getInstance("DH");
- kaA.init(keyPairA.getPrivate());
- kaB.init(keyPairB.getPrivate());
- kaA.doPhase(keyPairB.getPublic(), true);
- kaB.doPhase(keyPairA.getPublic(), true);
- byte[] kAB = kaA.generateSecret();
- byte[] kBA = kaB.generateSecret();
- assertEquals(TestUtil.bytesToHex(kAB), TestUtil.bytesToHex(kBA));
- }
-
- /**
- * Returns the product of primes that can be found by a simple variant of Pollard-rho.
- * The result should contain all prime factors of n smaller than 10^8.
- * This method is heuristic, since it could in principle find large prime factors too.
- * However, for a random 160-bit prime q the probability of this should be less than 2^{-100}.
- */
- private BigInteger smoothDivisor(BigInteger n) {
- // By examination we verified that for every prime p < 10^8
- // the iteration x_n = x_{n-1}^2 + 1 mod p enters a cycle of size < 50000 after at
- // most 50000 steps.
- int pollardRhoSteps = 50000;
- BigInteger u = new BigInteger("2");
- for (int i = 0; i < pollardRhoSteps; i++) {
- u = u.multiply(u).add(BigInteger.ONE).mod(n);
- }
- BigInteger v = u;
- BigInteger prod = BigInteger.ONE;
- for (int i = 0; i < pollardRhoSteps; i++) {
- v = v.multiply(v).add(BigInteger.ONE).mod(n);
- // This implementation is only looking for the product of small primes.
- // Therefore, instead of continuously computing gcds of v-u and n, it is sufficient
- // and more efficient to compute the product of of v-u for all v and compute the gcd
- // at the end.
- prod = prod.multiply(v.subtract(u).abs()).mod(n);
- }
- BigInteger result = BigInteger.ONE;
- while (true) {
- BigInteger f = n.gcd(prod);
- if (f.equals(BigInteger.ONE)) {
- return result;
- }
- result = result.multiply(f);
- n = n.divide(f);
- }
- }
-
- @SlowTest(providers = {ProviderType.BOUNCY_CASTLE, ProviderType.SPONGY_CASTLE})
- public void testKeyPair(KeyPair keyPair, int expectedKeySize) throws Exception {
- DHPrivateKey priv = (DHPrivateKey) keyPair.getPrivate();
- BigInteger p = priv.getParams().getP();
- BigInteger g = priv.getParams().getG();
- int keySize = p.bitLength();
- assertEquals("wrong key size", expectedKeySize, keySize);
-
- // Checks the key size of the private key.
- // NIST SP 800-56A requires that x is in the range (1, q-1).
- // Such a choice would require a full key validation. Since such a validation
- // requires the value q (which is not present in the DH parameters) larger keys
- // should be chosen to prevent attacks.
- int minPrivateKeyBits = keySize / 2;
- BigInteger x = priv.getX();
- assertTrue(x.bitLength() >= minPrivateKeyBits - 32);
- // TODO(bleichen): add tests for weak random number generators.
-
- // Verify the DH parameters.
- System.out.println("p=" + p.toString(16));
- System.out.println("g=" + g.toString(16));
- System.out.println("testKeyPairGenerator L=" + priv.getParams().getL());
- // Basic parameter checks
- assertTrue("Expecting g > 1", g.compareTo(BigInteger.ONE) > 0);
- assertTrue("Expecting g < p - 1", g.compareTo(p.subtract(BigInteger.ONE)) < 0);
- // Expecting p to be prime.
- // No high certainty is needed, since this is a unit test.
- assertTrue(p.isProbablePrime(4));
- // The order of g should be a large prime divisor q of p-1.
- // (see e.g. NIST SP 800-56A, section 5.5.1.1.)
- // If the order of g is composite then the the Decision Diffie Hellman assumption is
- // not satisfied for the group generated by g. Moreover, attacks using Pohlig-Hellman
- // might be feasible.
- // A good way to achieve these requirements is to select a safe prime p (i.e. a prime
- // where q=(p-1)/2 is prime too. NIST SP 800-56A does not require (or even recommend)
- // safe primes and allows Diffie-Hellman parameters where q is significantly smaller.
- // Unfortunately, the key does not contain q and thus the conditions above cannot be
- // tested easily.
- // We perform a partial test that performs a partial factorization of p-1 and then
- // test whether one of the small factors found by the partial factorization divides
- // the order of g.
- boolean isSafePrime = p.shiftRight(1).isProbablePrime(4);
- System.out.println("p is a safe prime:" + isSafePrime);
- BigInteger r; // p-1 divided by small prime factors.
- if (isSafePrime) {
- r = p.shiftRight(1);
- } else {
- BigInteger p1 = p.subtract(BigInteger.ONE);
- r = p1.divide(smoothDivisor(p1));
- }
- System.out.println("r=" + r.toString(16));
- assertEquals("g likely does not generate a prime oder subgroup", BigInteger.ONE,
- g.modPow(r, p));
-
- // Checks that there are not too many short prime factors.
- // I.e., subgroup confinment attacks can find at least keySize - r.bitLength() bits of the key.
- // At least 160 unknown bits should remain.
- // Only very weak parameters are detected here, since the factorization above only finds small
- // prime factors.
- assertTrue(minPrivateKeyBits - (keySize - r.bitLength()) > 160);
-
- // DH parameters are sometime misconfigures and g and q are swapped.
- // A large g that divides p-1 is suspicious.
- if (g.bitLength() >= 160) {
- assertTrue(p.mod(g).compareTo(BigInteger.ONE) > 0);
- }
- }
-
- /**
- * Tests Diffie-Hellman key pair generation.
- *
- * This is a slow test since some providers (e.g. BouncyCastle) generate new safe primes
- * for each new key.
- */
- @SuppressWarnings("InsecureCryptoUsage")
- @SlowTest(providers = {ProviderType.BOUNCY_CASTLE, ProviderType.SPONGY_CASTLE})
- @Test
- public void testKeyPairGenerator() throws Exception {
- int keySize = 1024;
- KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DH");
- keyGen.initialize(keySize);
- KeyPair keyPair = keyGen.generateKeyPair();
- testKeyPair(keyPair, keySize);
- }
-
- /** This test tries a key agreement with keys using distinct parameters. */
- @SuppressWarnings("InsecureCryptoUsage")
- @Test
- public void testDHDistinctParameters() throws Exception {
- KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DH");
- keyGen.initialize(ike1536());
- KeyPair keyPairA = keyGen.generateKeyPair();
-
- keyGen.initialize(ike2048());
- KeyPair keyPairB = keyGen.generateKeyPair();
-
- KeyAgreement kaA = KeyAgreement.getInstance("DH");
- kaA.init(keyPairA.getPrivate());
- try {
- kaA.doPhase(keyPairB.getPublic(), true);
- byte[] kAB = kaA.generateSecret();
- fail("Generated secrets with mixed keys " + TestUtil.bytesToHex(kAB) + ", ");
- } catch (java.security.GeneralSecurityException ex) {
- // This is expected.
- }
- }
-
- /**
- * Tests whether a provider accepts invalid public keys that result in predictable shared secrets.
- * This test is based on RFC 2785, Section 4 and NIST SP 800-56A, If an attacker can modify both
- * public keys in an ephemeral-ephemeral key agreement scheme then it may be possible to coerce
- * both parties into computing the same predictable shared key.
- *
- * Note: the test is quite whimsical. If the prime p is not a safe prime then the provider
- * itself cannot prevent all small-subgroup attacks because of the missing parameter q in the
- * Diffie-Hellman parameters. Implementations must add additional countermeasures such as the ones
- * proposed in RFC 2785.
- *
- * CVE-2016-1000346: BouncyCastle before v.1.56 did not validate the other parties public key.
- */
- @SuppressWarnings("InsecureCryptoUsage")
- @Test
- public void testSubgroupConfinement() throws Exception {
- KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DH");
- DHParameterSpec params = ike2048();
- BigInteger p = params.getP();
- BigInteger g = params.getG();
- keyGen.initialize(params);
- PrivateKey priv = keyGen.generateKeyPair().getPrivate();
- KeyAgreement ka = KeyAgreement.getInstance("DH");
- BigInteger[] weakPublicKeys = {
- BigInteger.ZERO,
- BigInteger.ONE,
- p.subtract(BigInteger.ONE),
- p,
- p.add(BigInteger.ONE),
- BigInteger.ONE.negate()
- };
- for (BigInteger weakKey : weakPublicKeys) {
- ka.init(priv);
- try {
- KeyFactory kf = KeyFactory.getInstance("DH");
- DHPublicKeySpec weakSpec = new DHPublicKeySpec(weakKey, p, g);
- PublicKey pub = kf.generatePublic(weakSpec);
- ka.doPhase(pub, true);
- byte[] kAB = ka.generateSecret();
- fail(
- "Generated secrets with weak public key:"
- + weakKey.toString()
- + " secret:"
- + TestUtil.bytesToHex(kAB));
- } catch (GeneralSecurityException ex) {
- // this is expected
- }
- }
- }
-}
diff --git a/java/com/google/security/wycheproof/testcases/DhiesTest.java b/java/com/google/security/wycheproof/testcases/DhiesTest.java
deleted file mode 100644
index 999186f..0000000
--- a/java/com/google/security/wycheproof/testcases/DhiesTest.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * @license
- * Copyright 2016 Google Inc. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.security.wycheproof;
-
-import static org.junit.Assert.*;
-
-import com.google.security.wycheproof.WycheproofRunner.ProviderType;
-import com.google.security.wycheproof.WycheproofRunner.SlowTest;
-import java.math.BigInteger;
-import java.security.GeneralSecurityException;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-import java.util.Arrays;
-import javax.crypto.Cipher;
-import javax.crypto.spec.DHParameterSpec;
-import org.junit.Test;
-
-/**
- * Testing DHIES.
- *
- * @author bleichen@google.com (Daniel Bleichenbacher)
- */
-// TODO(bleichen):
-// - maybe again CipherInputStream, CipherOutputStream,
-// - byteBuffer.
-// - Exception handling
-// - Is DHIES using the key derivation function for the key stream?
-// - BouncyCastle knows an algorithm IES. Is this the same as DHIES?
-// - Bouncy fixed a padding oracle bug in version 1.56 (CVE-2016-1000345)
-// So far we have no test for this bug mainly because this cannot be tested
-// through the JCA interface. BC does not register and algorithm such as
-// Cipher.DHIESWITHAES-CBC.
-// - So far only BouncyCastles is tesed because this is the only provider
-// we use that implements DHIES.
-public class DhiesTest {
-
- // TODO(bleichen): This is the same as DhTest.java
- // We could move this into some TestUtil.
- public DHParameterSpec ike2048() {
- final BigInteger p =
- new BigInteger(
- "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1"
- + "29024E088A67CC74020BBEA63B139B22514A08798E3404DD"
- + "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245"
- + "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED"
- + "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D"
- + "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F"
- + "83655D23DCA3AD961C62F356208552BB9ED529077096966D"
- + "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B"
- + "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9"
- + "DE2BCBF6955817183995497CEA956AE515D2261898FA0510"
- + "15728E5A8AACAA68FFFFFFFFFFFFFFFF",
- 16);
- final BigInteger g = new BigInteger("2");
- return new DHParameterSpec(p, g);
- }
-
- /**
- * WARNING: This test uses weak crypto (i.e. DHIESWithAES), if supported. Checks that key
- * agreement using DHIES works in the sense that it can decrypt what it encrypts. Unfortunately it
- * seems that there is no secure mode using AES.
- */
- @SuppressWarnings("InsecureCryptoUsage")
- @Test
- public void testDhiesBasic() throws Exception {
- DHParameterSpec params = ike2048();
- KeyPairGenerator kf = KeyPairGenerator.getInstance("DH");
- kf.initialize(params);
- KeyPair keyPair = kf.generateKeyPair();
- PrivateKey priv = keyPair.getPrivate();
- PublicKey pub = keyPair.getPublic();
- byte[] message = "Hello".getBytes("UTF-8");
- Cipher dhies;
- try {
- dhies = Cipher.getInstance("DHIESwithAES");
- } catch (NoSuchAlgorithmException ex) {
- // The algorithm isn't supported - even better!
- return;
- }
- dhies.init(Cipher.ENCRYPT_MODE, pub);
- byte[] ciphertext = dhies.doFinal(message);
- System.out.println("testDhiesBasic:" + TestUtil.bytesToHex(ciphertext));
- dhies.init(Cipher.DECRYPT_MODE, priv);
- byte[] decrypted = dhies.doFinal(ciphertext);
- assertEquals(TestUtil.bytesToHex(message), TestUtil.bytesToHex(decrypted));
- }
-
- /**
- * WARNING: This test uses weak crypto (i.e. DHIESWithAES). DHIES should be secure against chosen
- * ciphertexts. Checks that a modification of the ciphertext is dectected.
- */
- @SlowTest(providers = {ProviderType.BOUNCY_CASTLE, ProviderType.SPONGY_CASTLE})
- @SuppressWarnings("InsecureCryptoUsage")
- @Test
- public void testDhiesCorrupt() throws Exception {
- KeyPairGenerator kf = KeyPairGenerator.getInstance("DH");
- kf.initialize(ike2048());
- KeyPair keyPair = kf.generateKeyPair();
- PrivateKey priv = keyPair.getPrivate();
- PublicKey pub = keyPair.getPublic();
- byte[] message = new byte[32];
- Cipher dhies;
- try {
- dhies = Cipher.getInstance("DHIESwithAES");
- } catch (NoSuchAlgorithmException ex) {
- // The algorithm isn't supported - even better!
- return;
- }
- dhies.init(Cipher.ENCRYPT_MODE, pub);
- byte[] ciphertext = dhies.doFinal(message);
- for (int i = 0; i < ciphertext.length; i++) {
- byte[] corrupt = Arrays.copyOf(ciphertext, ciphertext.length);
- corrupt[i] ^= (byte) 1;
- try {
- dhies.init(Cipher.DECRYPT_MODE, priv);
- dhies.doFinal(corrupt);
- fail("Corrupt ciphertext accepted:" + i);
- } catch (GeneralSecurityException ex) {
- // This is expected
- }
- }
- }
-
- /**
- * Tries to detect if an algorithm is using ECB. Unfortunately, many JCE algorithms use ECB if no
- * encryption mode is specified.
- */
- @SuppressWarnings("InsecureCryptoUsage")
- public void testNotEcb(String algorithm) throws Exception {
- Cipher dhies;
- try {
- dhies = Cipher.getInstance(algorithm);
- } catch (NoSuchAlgorithmException ex) {
- // This test is called with short algorithm names such as just "DHIES".
- // Requiring full names is typically a good practice. Hence it is OK
- // to not assigning default algorithms.
- System.out.println("No implementation for:" + algorithm);
- return;
- }
- KeyPairGenerator kf = KeyPairGenerator.getInstance("DH");
- kf.initialize(ike2048());
- KeyPair keyPair = kf.generateKeyPair();
- PublicKey pub = keyPair.getPublic();
- byte[] message = new byte[512];
- dhies.init(Cipher.ENCRYPT_MODE, pub);
- byte[] ciphertext = dhies.doFinal(message);
- for (int i = 0; i + 32 <= ciphertext.length; i++) {
- String block1 = TestUtil.bytesToHex(Arrays.copyOfRange(ciphertext, i, i + 16));
- String block2 = TestUtil.bytesToHex(Arrays.copyOfRange(ciphertext, i + 16, i + 32));
- assertTrue(
- "Ciphertext repeats at " + i + ":" + TestUtil.bytesToHex(ciphertext),
- !block1.equals(block2));
- }
- }
-
- @Test
- public void testSemanticSecurityDhies() throws Exception {
- testNotEcb("DHIES");
- }
-}
diff --git a/java/com/google/security/wycheproof/testcases/DsaTest.java b/java/com/google/security/wycheproof/testcases/DsaTest.java
deleted file mode 100644
index 6ddab64..0000000
--- a/java/com/google/security/wycheproof/testcases/DsaTest.java
+++ /dev/null
@@ -1,1156 +0,0 @@
-/**
- * @license
- * Copyright 2016 Google Inc. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// TODO(bleichen):
-// - add tests for SHA1WithDSA with wrong key
-// - add tests for "alternative" algorithm names
-// - convert tests for deterministic DSA variants.
-// Deterministic DSA has a few new drawbacks:
-// * implementations flaws that generate k incorrectly can leak
-// the key if multiple implementations (e.g. one correct one incorrect)
-// is used.
-// * timing attacks are more serious if the attacker can ask for the same
-// signature multiple times, since this allows to get more accurate timings.
-package com.google.security.wycheproof;
-
-import static org.junit.Assert.*;
-
-import com.google.security.wycheproof.WycheproofRunner.ProviderType;
-import com.google.security.wycheproof.WycheproofRunner.SlowTest;
-import java.lang.management.ManagementFactory;
-import java.lang.management.ThreadMXBean;
-import java.math.BigInteger;
-import java.security.GeneralSecurityException;
-import java.security.KeyFactory;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.PublicKey;
-import java.security.Signature;
-import java.security.SignatureException;
-import java.security.interfaces.DSAParams;
-import java.security.interfaces.DSAPrivateKey;
-import java.security.interfaces.DSAPublicKey;
-import java.security.spec.DSAPrivateKeySpec;
-import java.security.spec.DSAPublicKeySpec;
-import java.util.Arrays;
-import javax.crypto.Cipher;
-import org.junit.Test;
-
-/**
- * Tests DSA against invalid signatures. The motivation for this test is the DSA implementation in
- * gpg4browsers. This implementation accepts signatures with r=1 and s=0 as valid.
- *
- * @author bleichen@google.com (Daniel Bleichenbacher)
- */
-public class DsaTest {
- static final String MESSAGE = "Hello";
-
- static final DSAPrivateKeySpec privateKey1 =
- new DSAPrivateKeySpec(
- // x
- new BigInteger("15382583218386677486843706921635237927801862255437148328980464126979"),
- // p
- new BigInteger(
- "181118486631420055711787706248812146965913392568235070235446058914"
- + "1170708161715231951918020125044061516370042605439640379530343556"
- + "4101919053459832890139496933938670005799610981765220283775567361"
- + "4836626483403394052203488713085936276470766894079318754834062443"
- + "1033792580942743268186462355159813630244169054658542719322425431"
- + "4088256212718983105131138772434658820375111735710449331518776858"
- + "7867938758654181244292694091187568128410190746310049564097068770"
- + "8161261634790060655580211122402292101772553741704724263582994973"
- + "9109274666495826205002104010355456981211025738812433088757102520"
- + "562459649777989718122219159982614304359"),
- // q
- new BigInteger("19689526866605154788513693571065914024068069442724893395618704484701"),
- // g
- new BigInteger(
- "2859278237642201956931085611015389087970918161297522023542900348"
- + "0877180630984239764282523693409675060100542360520959501692726128"
- + "3149190229583566074777557293475747419473934711587072321756053067"
- + "2532404847508798651915566434553729839971841903983916294692452760"
- + "2490198571084091890169933809199002313226100830607842692992570749"
- + "0504363602970812128803790973955960534785317485341020833424202774"
- + "0275688698461842637641566056165699733710043802697192696426360843"
- + "1736206792141319514001488556117408586108219135730880594044593648"
- + "9237302749293603778933701187571075920849848690861126195402696457"
- + "4111219599568903257472567764789616958430"));
-
- static final DSAPublicKeySpec publicKey1 =
- new DSAPublicKeySpec(
- new BigInteger(
- "3846308446317351758462473207111709291533523711306097971550086650"
- + "2577333637930103311673872185522385807498738696446063139653693222"
- + "3528823234976869516765207838304932337200968476150071617737755913"
- + "3181601169463467065599372409821150709457431511200322947508290005"
- + "1780020974429072640276810306302799924668893998032630777409440831"
- + "4314588994475223696460940116068336991199969153649625334724122468"
- + "7497038281983541563359385775312520539189474547346202842754393945"
- + "8755803223951078082197762886933401284142487322057236814878262166"
- + "5072306622943221607031324846468109901964841479558565694763440972"
- + "5447389416166053148132419345627682740529"),
- privateKey1.getP(),
- privateKey1.getQ(),
- privateKey1.getG());
-
- // Signatures for Key1.
- static final String[] VALID_SIGNATURES = {
- "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd"
- + "021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- };
-
- /**
- * The following test vectos are derived from a valid signature by
- * using alternative BER encoding as well as legacy formats.
- * Accepting such signatures is in many cases benign. Hence the tests
- * below will pass if such signatures are accepted as valid.
- * The test vectors could be used to check for signature malleability.
- * An example where this kind of signature malleability was a problem is
- * https://en.bitcoin.it/wiki/Transaction_Malleability
- */
- static final String[] MODIFIED_SIGNATURES = {
- // BER:long form encoding of length
- "30813d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9"
- + "cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "303e02811c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9"
- + "cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "303e021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd"
- + "02811d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- // BER:length contains leading 0
- "3082003d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8"
- + "c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862"
- + "36",
- "303f0282001c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8"
- + "c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862"
- + "36",
- "303f021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd"
- + "0282001d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862"
- + "36",
- // BER:prepending 0's to integer
- "303f021e00001e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8"
- + "c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862"
- + "36",
- "303f021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd"
- + "021f000000ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862"
- + "36",
- // The Sun provider accepts DSA signatures where a leading 00 has
- // been omitted in the ASN encoding.
- "303c021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd"
- + "021cade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- };
-
- /**
- * The following test vectors are invalid DSA signatures.
- * According to {@link java.security.Signature#verify(byte[])} verifying an invalid
- * signature may either return false or throw a SignatureException.
- * We expect that a correct implementation of DSA signatures satisfies this contract.
- * Throwing a RuntimeException instead of a SignatureException could for example
- * result in a denial of service attack.
- *
- * A list of problems that are caught by these signatures:
- *
- * (1) Security: Ferguson, N., Authentication Weaknesses in GCM, Natl. Inst. Stand. Technol. [Web
- * page], http://www.csrc.nist.gov/groups/ST/toolkit/BCM/documents/comments/
- * CWC-GCM/Ferguson2.pdf, May 20, 2005. This paper points out that a n-bit tag has lower strength
- * than expected.
- * (2) Compatibility: Assume an implementer tests some code using one provider than switches to
- * another provider. Such a switch should ideally not lower the security.
- * Conscrypt used to have only 12-byte authentication tag (b/26186727).
- */
- @Test
- public void testDefaultTagSizeIvParameterSpec() throws Exception {
- byte[] counter = new byte[12];
- byte[] input = new byte[16];
- byte[] key = new byte[16];
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- try {
- cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES"), new IvParameterSpec(counter));
- } catch (InvalidAlgorithmParameterException ex) {
- // OpenJDK8 does not support IvParameterSpec for GCM.
- System.out.println("testDefaultTagSizeIvParameterSpec:" + ex.toString());
- return;
- }
- byte[] output = cipher.doFinal(input);
- assertEquals(input.length + 16, output.length);
- }
-
- /**
- * The default authentication tag size should be 128-bit by default for the following reasons:
- *
- * (1) Security: Ferguson, N., Authentication Weaknesses in GCM, Natl. Inst. Stand. Technol. [Web
- * page], http://www.csrc.nist.gov/groups/ST/toolkit/BCM/documents/comments/
- * CWC-GCM/Ferguson2.pdf, May 20, 2005. This paper points out that a n-bit tag has lower strength
- * than expected.
- * (2) Compatibility: Assume an implementer tests some code using one provider than switches to
- * another provider. Such a switch should ideally not lower the security.
- * BouncyCastle used to have only 12-byte authentication tag (b/26186727).
- */
- @Test
- public void testDefaultTagSizeAlgorithmParameterGenerator() throws Exception {
- byte[] input = new byte[10];
- byte[] key = new byte[16];
- Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
- try {
- AlgorithmParameterGenerator.getInstance("GCM");
- } catch (NoSuchAlgorithmException ex) {
- // Conscrypt does not support AlgorithmParameterGenerator for GCM.
- System.out.println("testDefaultTagSizeAlgorithmParameterGenerator:" + ex.toString());
- return;
- }
- AlgorithmParameters param = AlgorithmParameterGenerator.getInstance("GCM").generateParameters();
- cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES"), param);
- byte[] output = cipher.doFinal(input);
- assertEquals(input.length + 16, output.length);
- }
-
- /**
- * Test AES-GCM wrapped around counter bug which leaks plaintext and authentication key. Let's
- * consider 12-byte IV, counter = IV || 0^31 || 1. For each encryption block, the last 4 bytes of
- * the counter is increased by 1. After 2^32 blocks, the counter will be wrapped around causing
- * counter collision and hence, leaking plaintext and authentication key as explained below. The
- * library must make a check to make sure that the plaintext's length never exceeds 2^32 - 2
- * blocks. Note that this is different from usual IV collisions because it happens even if users
- * use different IVs.
- * We have:
- * J0 = IV || 0^31 || 1
- * Plaintext: P[0], P[1], P[2], ....
- * Ciphertext:
- * C[0] = Enc(K, (J0 + 1) % 2^32) XOR P[0]
- * C[1] = Enc(K, (J0 + 2) % 2^32) XOR P[1]
- * C[2] = Enc(K, (J0 + 3) % 2^32) XOR P[2]
- * ...
- * C[2^32 - 1] = Enc(K, J0) XOR P[2^32 - 1]
- * C[2^32] = Enc(K, (J0 + 1)% 2^32) XOR P[2^32]
- * It means that after 2^32 blocks, the counter is wrapped around causing counter collisions. In
- * counter mode, once the counter is collided then it's reasonable to assume that the plaintext is
- * leaked. As the ciphertext is already known to attacker, Enc(K, J0) is leaked.
- * Now, as the authentication tag T is computed as GHASH(H, {}, C) XOR E(K, J0), the attacker can
- * learn GHASH(H, {}, C}. It essentially means that the attacker finds a polynomial where H is the
- * root (see Joux attack http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/Joux_comments.pdf).
- * Solving polynomial equation in GF(2^128) is enough to extract the authentication key.
- *
- *
Problems found: - *
An algorithm to extract the key from the signatures has been described for example in the - * paper Lattice Attacks on - * Digital Signature Schemes by N.A. Howgrave-Graham, N.P. Smart. - * - *
This bug is the same as US-CERT: VU # 940388: GnuPG generated ElGamal signatures that leaked - * the private key. - */ - @SlowTest(providers = {ProviderType.BOUNCY_CASTLE, ProviderType.SPONGY_CASTLE}) - @SuppressWarnings("InsecureCryptoUsage") - @Test - public void testBiasSha1WithDSA() throws Exception { - String hashAlgorithm = "SHA"; - String message = "Hello"; - byte[] messageBytes = message.getBytes("UTF-8"); - byte[] digest = MessageDigest.getInstance(hashAlgorithm).digest(messageBytes); - BigInteger h = new BigInteger(1, digest); - - KeyPairGenerator generator = java.security.KeyPairGenerator.getInstance("DSA"); - generator.initialize(2048); - KeyPair keyPair = generator.generateKeyPair(); - DSAPrivateKey priv = (DSAPrivateKey) keyPair.getPrivate(); - Signature signer = Signature.getInstance("DSA"); - try { - // Private key and selected algorithm by signer do not match. - // Hence throwing an exception at this point would be the reasonable. - signer.initSign(priv); - signer.update(messageBytes); - byte[] signature = signer.sign(); - BigInteger q = priv.getParams().getQ(); - BigInteger k = extractK(signature, h, priv, true); - - // Now check if k is heavily biased. - int lengthDiff = q.bitLength() - k.bitLength(); - if (lengthDiff > 32) { - fail( - "Severly biased DSA signature:" - + " len(q)=" - + q.bitLength() - + " len(k)=" - + k.bitLength()); - } - } catch (GeneralSecurityException ex) { - // The key is invalid, hence getting here is reasonable. - return; - } - } - - /** - * This test checks for potential of a timing attack. The test generates a number of signatures, - * selects a fraction of them with a small timing and then compares the values k for the selected - * signatures with a normal distribution. The test fails if these ks are much smaller than - * expected. An implementation flaw that can lead to a test failure is to compute the signature - * with a modular exponentiation with a runtime that depend on the length of the exponent. - * - *
A failing test simply means that the timing can be used to get information about k. Further - * analysis is necessary to determine if the bias is exploitable and how many timings are - * necessary for an attack. A passing test does not mean that the implementation is secure against - * timing attacks. The test only catches relatively big timing differences. It requires high - * confidence to fail. Noise on the test machine can prevent that a relation between timing and k - * can be detected. - * - *
Claims of what is exploitable: http://www.hpl.hp.com/techreports/1999/HPL-1999-90.pdf 30 - * signatures are sufficient to find the private key if the attacker knows 8 bits of each k. - * http://eprint.iacr.org/2004/277.pdf 27 signatures are sufficient if 8 bits of each k is known. - * Our own old experiments (using 1GB memory on a Pentium-4? CPU): 2^11 signatures are sufficient - * with a 3 bit leakage. 2^15 signatures are sufficient with a 2 bit leakage. 2^24 signatures are - * sufficient with a 1 bit leakage. Estimate for biased generation in the NIST standard: e.g. 2^22 - * signatures, 2^40 memory, 2^64 time - * - *
Sample output for the SUN provider:
- * count:50000 cutoff:4629300 relative average:0.9992225872624547 sigmas:0.3010906585642381
- * count:25000 cutoff:733961 relative average:0.976146066585879 sigmas:6.532668708070148
- * count:12500 cutoff:688305 relative average:0.9070352192339134 sigmas:18.00255238454385
- * count:6251 cutoff:673971 relative average:0.7747148791368986 sigmas:30.850903417893825
- * count:3125 cutoff:667045 relative average:0.5901994097874541 sigmas:39.67877152897901
- * count:1563 cutoff:662088 relative average:0.4060286694971057 sigmas:40.67294313795137
- * count:782 cutoff:657921 relative average:0.2577955312387898 sigmas:35.94906247333319
- * count:391 cutoff:653608 relative average:0.1453438859272699 sigmas:29.271192100879457
- * count:196 cutoff:649280 relative average:0.08035497211567771 sigmas:22.300206785132406
- * count:98 cutoff:645122 relative average:0.05063589092661368 sigmas:16.27820353139225
- * count:49 cutoff:641582 relative average:0.018255560447883384 sigmas:11.903018745467488
- * count:25 cutoff:638235 relative average:0.009082660721102722 sigmas:8.581595888660086
- * count:13 cutoff:633975 relative average:0.0067892346039088326 sigmas:6.20259924188633
- *
- *
- *
What this shows: The first line uses all 50'000 signatures. The average k of these - * signatures is close to the expected value q/2. Being more selective gives us signatures with a - * more biased k. For example, the 196 signatures with the fastest timing have about a 3-bit bias. - * From this we expect that 2^19 signatures and timings are sufficient to find the private key. - * - *
A list of problems caught by this test: - *
This following test vectors are public key encodings with invalid parameters where we expect - * that KeyFactory.generatePublic recognizes the problem. The documentation simply claims that an - * InvalidKeySpecException is thrown if the given key specification is inappropriate but does not - * specify what an appropriate key exactly is. Nonetheless we expect that the following minimal - * validations are performed: order is a positive integer, cofactor is a small positive integer. - * Some modifications may not be detected and must be caught by the primitives using them. E.g., - * it is expensive to verify the order of the group generated by the generator and hence the key - * factory may not verify the correctness of this parameter. Thus an implementation of ECDH must - * not trust an order claimed in the public key. - * - *
TODO(bleichen): The encoding is defined in https://tools.ietf.org/html/rfc3279 Section - * 2.3.5. This document defines a few additional requirements and options which are not yet - * checked: - OID for id-public-key_type must be ansi-X9.62 2 - OID for id-ecPublicKey must be - * id-publicKeyType 1 - The intended application for the key may be indicated in the key usage - * field (RFC 3280). - EcpkParameters can be implicitlyCA (not sure how we would specify the curve - * in this case) - the version is always 1 - the points on the curves can be either compressed or - * uncompressed (so far all points are uncompressed) - the seed value is optional (so far no test - * vector specifies the seed) - the cofactor is optional but must be included for ECDH keys. (so - * far all test vectors have a cofactor) - * - *
RFC 3279 also specifies curves over binary fields. Because of attacks against such curves, - * i.e. "New algorithm for the discrete logarithm problem on elliptic curves" by I.Semaev - * https://eprint.iacr.org/2015/310 such curves should no longer be used and hence testing them - * has low priority. - */ - public static final String[] EC_INVALID_PUBLIC_KEYS = { - // order = -115792089210356248762697446949407573529996955224135760342422259061068512044369 - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f50221ff00000000ffffffff0000000000000000" - + "4319055258e8617b0c46353d039cdaaf02010103420004cdeb39edd03e2b1a11" - + "a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b" - + "49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - // order = 0 - "308201123081cb06072a8648ce3d02013081bf020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f5020002010103420004cdeb39edd03e2b1a11a5" - + "e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b49" - + "bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - // cofactor = -1 - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f5022100ffffffff00000000ffffffffffffffff" - + "bce6faada7179e84f3b9cac2fc6325510201ff03420004cdeb39edd03e2b1a11" - + "a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b" - + "49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - // cofactor = 0 - "308201323081eb06072a8648ce3d02013081df020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f5022100ffffffff00000000ffffffffffffffff" - + "bce6faada7179e84f3b9cac2fc632551020003420004cdeb39edd03e2b1a11a5" - + "e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b49" - + "bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - // cofactor = 115792089210356248762697446949407573529996955224135760342422259061068512044369 - "308201553082010d06072a8648ce3d020130820100020101302c06072a8648ce" - + "3d0101022100ffffffff00000001000000000000000000000000ffffffffffff" - + "ffffffffffff30440420ffffffff00000001000000000000000000000000ffff" - + "fffffffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0" - + "cc53b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277" - + "037d812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162b" - + "ce33576b315ececbb6406837bf51f5022100ffffffff00000000ffffffffffff" - + "ffffbce6faada7179e84f3b9cac2fc632551022100ffffffff00000000ffffff" - + "ffffffffffbce6faada7179e84f3b9cac2fc63255103420004cdeb39edd03e2b" - + "1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b842959" - + "8c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - }; - - @Test - public void testEncodedPublicKey() throws Exception { - KeyFactory kf = KeyFactory.getInstance("EC"); - for (String encodedHex : EC_INVALID_PUBLIC_KEYS) { - byte[] encoded = TestUtil.hexToBytes(encodedHex); - X509EncodedKeySpec x509keySpec = new X509EncodedKeySpec(encoded); - try { - ECPublicKey unused = (ECPublicKey) kf.generatePublic(x509keySpec); - fail("Constructed invalid public key from:" + encodedHex); - } catch (InvalidKeySpecException ex) { - // OK, since the public keys have been modified. - System.out.println(ex.toString()); - } - } - } - - @Test - public void testEncodedPrivateKey() throws Exception { - KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); - keyGen.initialize(EcUtil.getNistP256Params()); - KeyPair keyPair = keyGen.generateKeyPair(); - ECPrivateKey priv = (ECPrivateKey) keyPair.getPrivate(); - byte[] encoded = priv.getEncoded(); - System.out.println("Encoded ECPrivateKey:" + TestUtil.bytesToHex(encoded)); - PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(encoded); - KeyFactory kf = KeyFactory.getInstance("EC"); - ECPrivateKey decoded = (ECPrivateKey) kf.generatePrivate(spec); - assertEquals(priv.getS(), decoded.getS()); - assertEquals(priv.getParams().getCofactor(), decoded.getParams().getCofactor()); - assertEquals(priv.getParams().getCurve(), decoded.getParams().getCurve()); - assertEquals(priv.getParams().getGenerator(), decoded.getParams().getGenerator()); - assertEquals(priv.getParams().getOrder(), decoded.getParams().getOrder()); - } - - /** - * Tests key generation for given parameters. The test can be skipped if the curve is not a - * standard curve. - */ - void testKeyGeneration(ECParameterSpec ecParams, boolean isStandard) throws Exception { - KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); - KeyPair keyPair; - try { - keyGen.initialize(ecParams); - keyPair = keyGen.generateKeyPair(); - } catch (InvalidAlgorithmParameterException ex) { - if (!isStandard) { - return; - } - throw ex; - } - ECPublicKey pub = (ECPublicKey) keyPair.getPublic(); - ECPrivateKey priv = (ECPrivateKey) keyPair.getPrivate(); - EcUtil.checkPublicKey(pub); - BigInteger s = priv.getS(); - // Check the length of s. Could fail with probability 2^{-32}. - assertTrue(s.bitLength() >= EcUtil.fieldSizeInBits(ecParams.getCurve()) - 32); - // TODO(bleichen): correct curve? - // TODO(bleichen): use RandomUtil - } - - @Test - public void testKeyGenerationAll() throws Exception { - testKeyGeneration(EcUtil.getNistP224Params(), true); - testKeyGeneration(EcUtil.getNistP256Params(), true); - testKeyGeneration(EcUtil.getNistP384Params(), true); - testKeyGeneration(EcUtil.getNistP521Params(), true); - // Curves that are sometimes not supported. - testKeyGeneration(EcUtil.getBrainpoolP256r1Params(), false); - } - - /** - * Checks that the default key size for ECDSA is up to date. - * The test uses NIST SP 800-57 part1 revision 4, Table 2, page 53 - * http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r4.pdf - * for the minimal key size of EC keys. - * Nist recommends a minimal security strength of 112 bits for the time until 2030. - * To achieve this security strength EC keys of at least 224 bits are required. - */ - @Test - public void testDefaultKeyGeneration() throws Exception { - KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); - KeyPair keyPair = keyGen.generateKeyPair(); - ECPublicKey pub = (ECPublicKey) keyPair.getPublic(); - int keySize = EcUtil.fieldSizeInBits(pub.getParams().getCurve()); - if (keySize < 224) { - fail("Expected a default key size of at least 224 bits. Size of generate key is " + keySize); - } - } - - /** - * Tries to generate a public key with a point at infinity. Public keys with a point at infinity - * should be rejected to prevent subgroup confinement attacks. - */ - @Test - public void testPublicKeyAtInfinity() throws Exception { - ECParameterSpec ecSpec = EcUtil.getNistP256Params(); - try { - ECPublicKeySpec pubSpec = new ECPublicKeySpec(ECPoint.POINT_INFINITY, ecSpec); - fail( - "Point at infinity is not a valid public key. " - + pubSpec.getW().equals(ECPoint.POINT_INFINITY)); - } catch (java.lang.IllegalArgumentException ex) { - // This is expected - } - } -} diff --git a/java/com/google/security/wycheproof/testcases/EcdhTest.java b/java/com/google/security/wycheproof/testcases/EcdhTest.java deleted file mode 100644 index 8f32d5a..0000000 --- a/java/com/google/security/wycheproof/testcases/EcdhTest.java +++ /dev/null @@ -1,1134 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import static org.junit.Assert.*; - -import java.math.BigInteger; -import java.security.GeneralSecurityException; -import java.security.InvalidKeyException; -import java.security.KeyFactory; -import java.security.KeyPair; -import java.security.KeyPairGenerator; -import java.security.NoSuchAlgorithmException; -import java.security.interfaces.ECPrivateKey; -import java.security.interfaces.ECPublicKey; -import java.security.spec.ECFieldFp; -import java.security.spec.ECGenParameterSpec; -import java.security.spec.ECParameterSpec; -import java.security.spec.ECPoint; -import java.security.spec.ECPrivateKeySpec; -import java.security.spec.ECPublicKeySpec; -import java.security.spec.EllipticCurve; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.X509EncodedKeySpec; -import javax.crypto.KeyAgreement; -import org.junit.Test; - -/** - * Testing ECDH. - * - *
Defense in depth: The tests for ECDH assume that a attacker has control over all - * aspects of the public key in an exchange. That means that the attacker can potentially send weak - * or invalid public keys. For example, invalid public keys can contain points not on the curve, - * curves that have been deliberately chosen so that DLs are easy to compute as well as orders or - * cofactors that are wrong. It is expected that implementations validate the inputs of a key - * agreement and that in no case information about the private key is leaked. - * - *
References: Ingrid Biehl, Bernd Meyer, Volker Müller, "Differential Fault Attacks on - * Elliptic Curve Cryptosystems", Crypto '00, pp. 131-164 - * - *
Adrian Antipa, Daniel Brown, Alfred Menezes, Rene Struik, and Scott Vanstone, "Validation of - * Elliptic Curve Public Keys", PKC 2003, https://www.iacr.org/archive/pkc2003/25670211/25670211.pdf - * - *
# Bugs: CVE-2015-7940: BouncyCastle before 1.51 does not validate a point is on the - * curve. BouncyCastle v.1.52 checks that the public key point is on the public key curve but does - * not check whether public key and private key use the same curve. BouncyCastle v.1.53 is still - * vulnerable to attacks with modified public keys. An attacker can change the order of the curve - * used by the public key. ECDHC would then reduce the private key modulo this order, which can be - * used to find the private key. - * - *
SunEC had similar problem. CVE ? - * - * @author bleichen@google.com (Daniel Bleichenbacher) - */ -// TODO(bleichen): Stuff we haven't implemented: -// - timing attacks -// Stuff we are delaying because there are more important bugs: -// - testWrongOrder using BouncyCastle with ECDHWithSHA1Kdf throws -// java.lang.UnsupportedOperationException: KDF can only be used when algorithm is known -// Not sure if that is expected or another bug. -// CVEs for ECDH we haven't used anywhere. -// - CVE-2014-3470: OpenSSL anonymous ECDH denial of service: triggered by NULL value in -// certificate. -// - CVE-2014-3572: OpenSSL downgrades ECDHE to ECDH -// - CVE-2011-3210: OpenSSL was not thread safe -public class EcdhTest { - - static final String[] ECDH_VARIANTS = { - // Raw ECDH. The shared secret is the x-coordinate of the ECDH computation. - // The tests below assume that this variant is implemenented. - "ECDH", - // ECDHC is a variant described in P1363 7.2.2 ECSVDP-DHC. - // BouncyCastle implements this variant. - "ECDHC", - // A variant with an explicit key derivation function. - // This is implemented by BouncyCastle. - "ECDHWITHSHA1KDF", - }; - - /** ECDH test vectors */ - public static class EcdhTestVector { - final String curvename; - final String pub; // hexadecimal representation of the X509 encoding - final BigInteger s; // private key - final String shared; // hexadecimal representation of the shared secret - - public EcdhTestVector(String curvename, String pub, BigInteger s, String shared) { - this.curvename = curvename; - this.pub = pub; - this.s = s; - this.shared = shared; - } - - public ECPublicKey getPublicKey() throws NoSuchAlgorithmException, InvalidKeySpecException { - KeyFactory kf = KeyFactory.getInstance("EC"); - byte[] encoded = TestUtil.hexToBytes(pub); - return (ECPublicKey) kf.generatePublic(new X509EncodedKeySpec(encoded)); - } - - public ECPrivateKey getPrivateKey() throws NoSuchAlgorithmException, InvalidKeySpecException { - KeyFactory kf = KeyFactory.getInstance("EC"); - ECPrivateKeySpec spec = new ECPrivateKeySpec(s, EcUtil.getCurveSpecRef(curvename)); - return (ECPrivateKey) kf.generatePrivate(spec); - } - } - - public static final EcdhTestVector[] ECDH_TEST_VECTORS = { - // vectors with normal ECDH values - new EcdhTestVector( - "secp224r1", - "304e301006072a8648ce3d020106052b81040021033a00049c08bb3788a5cb8d" - + "22591f2520791cdaf61765a84f0419d28ff8fb2dcb5d51e5714d8740420d0945" - + "187f97be42872bae9bf3f5b1857a475f", - new BigInteger("8af784fe9cebd363df85f598dcc2ab82b2ca725360dadb77b3708032", 16), - "c1921af3d06d813ccb009e363a647836d30b3f9c211c26e64a3bb0b6"), - new EcdhTestVector( - "secp256r1", - "3059301306072a8648ce3d020106082a8648ce3d030107034200044b3b0a5231" - + "76309f259498c55e3a9be45c9fb65ad4e60d6064e04b89c1bd0a1835039219c1" - + "22b89e2b539bb16d3afced502137f02944c374863137035fd3f1ae", - new BigInteger("051a995be2a8499e2c9331b3b5f3c012048bb02a1a6f044ed93d9bd295fcec16", 16), - "33befba428b295b9a0123d3a848d91d1e9a5266959e036d1a25e28d83d06421f"), - new EcdhTestVector( - "secp384r1", - "3076301006072a8648ce3d020106052b8104002203620004c1d31b771bb123f4" - + "fb2b789a2880c57a68b3bbfa7da3d80b8325b73428bd2a4e79b55b57ac454f52" - + "8ac02b62d54dfc315b9ba04363e94b825767951a9338f5d1db4c6d3f0e9a15bc" - + "9b834fc11a01e4b310c22aba73766fd769ea684fbad5d9d2", - new BigInteger("ff65a2bf5e1347e2286fb29273fb118a76996038bea2fcfd2032e8663f7588e5" - + "3130d195b161eba39085abbc3e24bcef", 16), - "dbd85b2caaca6d69460c94bd9f99b3bd51404788a58334a18709a882050fe1bf" - + "a4dd74de6e4368c1243443e5f64b60c7"), - new EcdhTestVector( - "secp521r1", - "30819b301006072a8648ce3d020106052b81040023038186000401ca6ec5476b" - + "ae3cf0f28f370ac3a9a0de2091418a590978bf87a6f1aeadebde98925e8fb42c" - + "d03d57ff9aeb9890646067a3095874828a392b80a88880e5f456e4d000493581" - + "376d20d711a487e0106a3fc047b91803ed154e274b26d858cf2f55e356b45765" - + "2101b925b7d36b542d2a3e33e01404fb4f944c3b8ef276b6f5082e591135", - new BigInteger("01f362c182f1eaae2920578a2f30c228e28b996e74d4bd799621300d5f2e6c69" - + "30204f00476732c95a79ae527503621edf633dbb87400740f54adc4430706221" - + "2f68", 16), - "0107b9c99c80e2bc834e10c44afe2d611aafe8aad0eb80384aefbd9bb8196ea3" - + "b5797bedac39de3362532c9b04aeb98a3e60034c3d2dcb4a43b8f8b44e9528d3" - + "eeb8"), - new EcdhTestVector( - "brainpoolp256r1", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100a9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d" - + "1f6e5377304404207d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6c" - + "e94a4b44f330b5d9042026dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7" - + "e1ce6bccdc18ff8c07b60441048bd2aeb9cb7e57cb2c4b482ffc81b7afb9de27" - + "e1e3bd23c23a4453bd9ace3262547ef835c3dac4fd97f8461a14611dc9c27745" - + "132ded8e545c1d54c72f046997022100a9fb57dba1eea9bc3e660a909d838d71" - + "8c397aa3b561a6f7901e0e82974856a7020101034200048178776ff8332108da" - + "d4fa59bce3111133a30e33fa7f96d0211ec9fa4904dcca084de67f52fd720ccd" - + "ada5c49305200a6028793a83cbe692c08237ecd0572fa2", - new BigInteger("143be522a9d0420f6bd19b95ce3a5e19c61970c31f13448276546625e607e7c9", 16), - "3658b819481f00f74cfd76b9dcf82867c3c3186f948cbc75bf296c6d332aedf0"), - // vectors with extreme values for the shared secret - new EcdhTestVector( - "secp256r1", - "3059301306072a8648ce3d020106082a8648ce3d03010703420004983f80374a" - + "4730f9decd7221fa3ebb527d44f459b6c6afcf7de7069481400a748fb8733ba0" - + "8e01cd53d54af45975554d0dbd6d5f0acf0fd95692606347cace7e", - new BigInteger("56556c546751dee664ae71baa0189a2e69b1e1f8939a49ed7cc35d7ea98fbcc7", 16), - "0000000000000000000000000000000000000000000000000000000000000000"), - new EcdhTestVector( - "secp384r1", - "3076301006072a8648ce3d020106052b8104002203620004d64af08419f8a0aa" - + "5d830a2b0f42e6a27a3c17e0e98f64a1e7e10c6a41a308832dcd9a493db0cd43" - + "7e47063c1db6c967494c8460f03bf95ff619b7c7499e1bc08fd759fc44c4af3d" - + "03de541a719baf996b4f91a9af5bf08fa671af0899f91359", - new BigInteger("ee383acde7e5b3e6c246833e183c4272a1714a13097b4b57bc2eeecdccbd69b6" - + "cff435215a3c92b5d4e0b2c36444a7fa", 16), - "0000000000000000000000000000000000000000000000000000000000000000" - + "00000000000000000000000000000000"), - new EcdhTestVector( - "secp384r1", - "3076301006072a8648ce3d020106052b81040022036200041c1ed3f66b6ae370" - + "411ac30fda63c784c5cbc3951a7cfe567d8bfa3ea535a2eb8c192d349e69ea2a" - + "39eb5013a5cf383cf91c82e81eee1a9bc97386e340e65b2b2d8cf2633b919a82" - + "10a638b8e2345cda054ce96efcaeee20dcce82d13d40eb6a", - new BigInteger("98f230ef0c0ab02c78179ba9ea3e1c8d16c3ec276665c432b9040b803dfff657" - + "a6c77512b6a602d416785016c3cd3da7", 16), - "0000000000000000000000000000000000000000000000000000000000000000" - + "00000000000000000000000000000002"), - new EcdhTestVector( - "secp384r1", - "3076301006072a8648ce3d020106052b8104002203620004d10b0df120b1324d" - + "8b76ee43065e4f4be63f68cf5b381ae79046920108a8f21cf8097bf313225b74" - + "1125eb5a66105ee445961b28ad1843613775c063a85319f1353d8bf2a217210e" - + "309f2c7c27b57d42fdc042abb00b37a0f3118cf74b4174f0", - new BigInteger("5b8e9af3c17fa0d683f3bc94f8685f33c0b616281f91b466cac9da0a0e085ba6" - + "f48aafcdb4fc13d55f1a33ac436f82bb", 16), - "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" - + "ffffffff0000000000000000fffffffe"), - new EcdhTestVector( - "secp521r1", - "30819b301006072a8648ce3d020106052b810400230381860004008269c7d0ff" - + "febadbf5bdfa2adf0f378d0844268e5acb57d0157fe688488cef91256e15939d" - + "311aaf6479e29ef14de3981c3a5768c7b66693e956fa515d4a0c847c0054a32b" - + "4a8f615ba5550f204ebf1f7f02f7252b5ae564361eec468adf4d59caa4c4b424" - + "a30761d805d521c2e1f1dfde385e9146624cb2b84f94888730acbfbf1294", - new BigInteger("019ad2de5943f5112021a3215cee84c4e8d40e188641419a5b7958636f1843d0" - + "cbda4747aad69fd806b333b82b095d0f10bda8dbeca7ee9f67d09caffb4869e4" - + "1172", 16), - "0000000000000000000000000000000000000000000000000000000000000000" - + "0000000000000000000000000000000000000000000000000000000000000000" - + "0000"), - new EcdhTestVector( - "secp521r1", - "30819b301006072a8648ce3d020106052b810400230381860004003b0d698705" - + "0fad0f76ac1ac7a1c7e91e24addf821c06ae0844a3f1b6338c111a32a94a5369" - + "fdf8fd1cc137314c7d7a99dfabba1cc92f10026e45388714fe453ed50015e59a" - + "c4bab161635e0df0f5553ee6112fc60f744ffc607965975c0843f7a893441c4f" - + "e5e6e290426dd219ecbc159f39302b52b37b69a890e9fc4cf70eba39bbf6", - new BigInteger("0147492d3019808024569dc81b0e6aef9f27bfd43e009e8b4b6b0512b220490e" - + "08f98324b16d3ed91a54d391f92973f5376c66b9f8a9cbf893b0900968fd8d6e" - + "5e7d", 16), - "0000000000000000000000000000000000000000000000000000000000000000" - + "0000000000000000000000000000000000000000000000000000000000000000" - + "0001"), - new EcdhTestVector( - "secp521r1", - "30819b301006072a8648ce3d020106052b81040023038186000401bb2936bfc5" - + "8f1e9819d62ed2a38a0ce618f000546fe8af4983d8dbbda7b7ae914a656ac540" - + "7c153f6edacb170fd2129d126d987d5032c7a31540bb6a4e93f8af15015c23ce" - + "1263e691903cd2c859d883c980fada91b764aef7e5a20fb22bcf5949e62c8082" - + "c8245bcf8686a6a39b7ef2eec49b1a047b73aeb06e3793c1d01fa24fd156", - new BigInteger("5a5f98ceb2f856685c51ba714d5e1db06d1e6542a8d02b9c13efeeb1f3e6613d" - + "8ef83e49748cb63aad268ba68c9295c507dac125f51ba75c82f6029dcc14d4ab" - + "16", 16), - "0000000000000000000000000000000000000000000000000000000000000000" - + "0000000000000000000000000000000000000000000000000000000000000000" - + "0002"), - new EcdhTestVector( - "secp521r1", - "30819b301006072a8648ce3d020106052b81040023038186000401ce7a5356fd" - + "002ff3d9a193dd910795b56f8bd2f975367d982d27e04b4e0935425fdef6b3e1" - + "6fac26a898a757ddbfb01a45236a8a06ead9db3dff644ed87a7f09310000c862" - + "7374a123b1c0fdf7efaaee362fa7fdeb1c56bd787e81484d21a818ff49552704" - + "af2d2fe714a1576299ff6d3745349cdb463e8c003641c13c870391cfd360", - new BigInteger("c5dd96d1f0aa141f184d0a749809dc0749a0629b9b7d99d1cbe40c14204d70c7" - + "f63413756040a4c2a67551df6723c4b784ace44d7e35f46233c78b2c7548594b" - + "3d", 16), - "01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - + "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - + "fffd"), - new EcdhTestVector( - "secp521r1", - "30819b301006072a8648ce3d020106052b81040023038186000400d4574ad46e" - + "42824b7738f0ed19f0dbec65e743ed6a1798e8168546713a929c97cb8b2f3c20" - + "928bed9fad88319ef216e42c7a82707befead2b21000e06e6ca37709004848c1" - + "34a7fa6d0f8cd9aa237b84ffa02cb3bc8d84b8022153a3e01248dfc87403e8f3" - + "f1b70b52b7eabffd01fe1b4101fa901494a2067e2321a47e87cce45eecfd", - new BigInteger("01ac34343b1814a092e48f1c60de0bacced8c328246f103428ab0ce6611807e6" - + "90022dbc6bc558265b917dc513152cd1661b30e3b62a2cc2bf9f909e3fd51918" - + "de5b", 16), - "01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - + "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - + "fffe"), - new EcdhTestVector( - "brainpoolp256r1", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100a9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d" - + "1f6e5377304404207d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6c" - + "e94a4b44f330b5d9042026dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7" - + "e1ce6bccdc18ff8c07b60441048bd2aeb9cb7e57cb2c4b482ffc81b7afb9de27" - + "e1e3bd23c23a4453bd9ace3262547ef835c3dac4fd97f8461a14611dc9c27745" - + "132ded8e545c1d54c72f046997022100a9fb57dba1eea9bc3e660a909d838d71" - + "8c397aa3b561a6f7901e0e82974856a70201010342000498703a894131de3f81" - + "5836bdb1d5a03e59fbf50ffde6575ee690e9ebf6a32e785ad50d1eb00062a9b8" - + "176ba32f06f3908f82a3ddd9da10eafcac61f57a180bcb", - new BigInteger("17617237e4ec2629d798a81ca086c1a73494e70619dd7b77cb7360174de82107", 16), - "0000000000000000000000000000000000000000000000000000000000000001"), - new EcdhTestVector( - "brainpoolp256r1", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100a9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d" - + "1f6e5377304404207d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6c" - + "e94a4b44f330b5d9042026dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7" - + "e1ce6bccdc18ff8c07b60441048bd2aeb9cb7e57cb2c4b482ffc81b7afb9de27" - + "e1e3bd23c23a4453bd9ace3262547ef835c3dac4fd97f8461a14611dc9c27745" - + "132ded8e545c1d54c72f046997022100a9fb57dba1eea9bc3e660a909d838d71" - + "8c397aa3b561a6f7901e0e82974856a702010103420004055f1b89b08c1c4a0f" - + "96ff15dd284bdad79b90636ce73c461cb6da001e19638c07490bed6a644e944a" - + "c3e8684c4d5cf469a3f5b039690cba52dc0dccb095e61e", - new BigInteger("7988ceedd4ce4f516f083261dc0dbb4d59c71b058bf00876135fb1d5e72a1cea", 16), - "0000000000000000000000000000000000000000000000000000000000000002"), - new EcdhTestVector( - "brainpoolp256r1", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100a9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d" - + "1f6e5377304404207d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6c" - + "e94a4b44f330b5d9042026dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7" - + "e1ce6bccdc18ff8c07b60441048bd2aeb9cb7e57cb2c4b482ffc81b7afb9de27" - + "e1e3bd23c23a4453bd9ace3262547ef835c3dac4fd97f8461a14611dc9c27745" - + "132ded8e545c1d54c72f046997022100a9fb57dba1eea9bc3e660a909d838d71" - + "8c397aa3b561a6f7901e0e82974856a70201010342000424f99dbc3d8f4989f2" - + "43662e67de0f8d03d0f84031caa553f4a3ccc1c999de1e43530fcd456a5d83d5" - + "11aedc8bda7c2b18cc509cabe47e76d46501fd82ebbfae", - new BigInteger("844649c38c375c5f4959b129c6510e54f71a60b91d1b09a7b1a8dd0e954da186", 16), - "a9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5376"), - // vectors with extreme values for the public key - new EcdhTestVector( - "secp256r1", - "3059301306072a8648ce3d020106082a8648ce3d030107034200040000000000" - + "00000000000000000000000000000000000000000000000000000066485c780e" - + "2f83d72433bd5d84a06bb6541c2af31dae871728bf856a174f93f4", - new BigInteger("2e0a2c5159af006f28f5b51e55ce9270f17a431ebefee2d95bf2f954c3c460c5", 16), - "bb4b8e7b1b5d766d7e6d3de41e0ab0703cadcca4e039f310e3ed0004e2c1ba67"), - new EcdhTestVector( - "secp384r1", - "3076301006072a8648ce3d020106052b81040022036200040000000000000000" - + "0000000000000000000000000000000000000000000000000000000000000000" - + "00000000000000003cf99ef04f51a5ea630ba3f9f960dd593a14c9be39fd2bd2" - + "15d3b4b08aaaf86bbf927f2c46e52ab06fb742b8850e521e", - new BigInteger("b0a8c4804a2b9769216a51b51ece43391cf3f66c383a748d54f1c15f27bbf041" - + "a3b9470a6d49f8abe9e6b4db6bd7c59f", 16), - "6598237fdfd3f38e00c3c58a3045b9d54c510f0f5523293af1966635f2ddf963" - + "87b12065ad8e1a5b72618e6441c72841"), - new EcdhTestVector( - "secp384r1", - "3076301006072a8648ce3d020106052b8104002203620004ffffffffffffffff" - + "fffffffffffffffffffffffffffffffffffffffffffffffeffffffff00000000" - + "00000000fffffffe732152442fb6ee5c3e6ce1d920c059bc623563814d79042b" - + "903ce60f1d4487fccd450a86da03f3e6ed525d02017bfdb3", - new BigInteger("135b5751b27de8fe0e34d452ad81c4ca90def546275c349f467aabd24e039b75" - + "28c473bc5732cb96921d01e6ca11739a", 16), - "ef5ceb524843eb0277f574b278b09f82670dbcdacbe51a646441a45ebdfa4976" - + "1fb3b534bfccd957edb99e9a4e329467"), - new EcdhTestVector( - "secp521r1", - "30819b301006072a8648ce3d020106052b810400230381860004000000000000" - + "0000000000000000000000000000000000000000000000000000000000000000" - + "0000000000000000000000000000000000000000000000000000000000d20ec9" - + "fea6b577c10d26ca1bb446f40b299e648b1ad508aad068896fee3f8e614bc630" - + "54d5772bf01a65d412e0bcaa8e965d2f5d332d7f39f846d440ae001f4f87", - new BigInteger("7ca82bb7bdd0ab3805e1d25ce49f71780e93a0314f579a474d0b0f81812c8365" - + "bc3917eb00208a1cfdb44cdc53f112930560e86bcad563d0bd4ff951f2c41454" - + "f6", 16), - "00d6283f6a7b59628920dd3afe97a5021c79e26c71adf5c0774cedaaf5b25b92" - + "ed2776cfefbe95e467a15032c221064ff19b1207183f0ca0c594b6a83ca0e3f3" - + "2250"), - new EcdhTestVector( - "secp521r1", - "30819b301006072a8648ce3d020106052b810400230381860004000000000000" - + "0000000000000000000000000000000000000000000000000000000000000000" - + "000000000000000000000000000000000000000000000000000000010010e59b" - + "e93c4f269c0269c79e2afd65d6aeaa9b701eacc194fb3ee03df47849bf550ec6" - + "36ebee0ddd4a16f1cd9406605af38f584567770e3f272d688c832e843564", - new BigInteger("011cf3abed354498f6922af2ddc9d74b2bb829bee79cc272c7b154f16a720c29" - + "429bb354bb034549e33be5b84ffb6da99a0c28bb37fa44f78cce5feb871370e1" - + "2c93", 16), - "00e51b94872c9cb3831bac48e9e4cbc6b4eafdc09ce51f43d0ff118b5d429f20" - + "b88261dbfc9636ecf081cdcf1b1336425a39841cf1ff742bc3d5553a709cd0a7" - + "3a13"), - new EcdhTestVector( - "secp521r1", - "30819b301006072a8648ce3d020106052b81040023038186000401ffffffffff" - + "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - + "fffffffffffffffffffffffffffffffffffffffffffffffffffffffd0010e59b" - + "e93c4f269c0269c79e2afd65d6aeaa9b701eacc194fb3ee03df47849bf550ec6" - + "36ebee0ddd4a16f1cd9406605af38f584567770e3f272d688c832e843564", - new BigInteger("011c2b1a82cd320924e757b4259e5f7c0455efe3f05d316c9705b5071fdbd59e" - + "db59ee938b95a67727ca01ffe5155baf5eff83ae5ec4a56770a50475b017a762" - + "30cf", 16), - "000adf30396bda59d36fc307a4f43f594806f3a46373f3e4af6516e67f99d981" - + "1c0496f49527895fa7738423f6429318f54afa6841cb4692e15016fe49fc7c82" - + "509d"), - new EcdhTestVector( - "secp521r1", - "30819b301006072a8648ce3d020106052b81040023038186000401ffffffffff" - + "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - + "fffffffffffffffffffffffffffffffffffffffffffffffffffffffe00d9254f" - + "df800496acb33790b103c5ee9fac12832fe546c632225b0f7fce3da4574b1a87" - + "9b623d722fa8fc34d5fc2a8731aad691a9a8bb8b554c95a051d6aa505acf", - new BigInteger("01e1603fe7e275673aeb8b3f105f4058e073b4c37d2f0ae2bd66b189454e1b41" - + "c442c3f35f085eae3aa37eefffe76736440f9b3fd2e3931d468b6d90e560bc0f" - + "35f5", 16), - "0158694585e55f1289e410fdeeed82940b3029dd8207dcb4de407278a6328d5e" - + "b904262419f1ef2ecacb415872f0c9d64df82b1241cd780bd0abc9e26ceebadf" - + "44e7"), - new EcdhTestVector( - "brainpoolp256r1", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100a9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d" - + "1f6e5377304404207d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6c" - + "e94a4b44f330b5d9042026dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7" - + "e1ce6bccdc18ff8c07b60441048bd2aeb9cb7e57cb2c4b482ffc81b7afb9de27" - + "e1e3bd23c23a4453bd9ace3262547ef835c3dac4fd97f8461a14611dc9c27745" - + "132ded8e545c1d54c72f046997022100a9fb57dba1eea9bc3e660a909d838d71" - + "8c397aa3b561a6f7901e0e82974856a702010103420004000000000000000000" - + "000000000000000000000000000000000000000000000109e0e9e8d98fb89da2" - + "a32b2c7618b26bb99b920f02a5e831a142e6c8673110cd", - new BigInteger("61c2be000b5888035bfde07d532b36d91cc347f556d87c7a01397f4cde29c6e4", 16), - "3db56c93e51a0b5b17a8009be010be6eecca6b7e0b587753cb8bc850869a710d"), - new EcdhTestVector( - "brainpoolp256r1", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100a9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d" - + "1f6e5377304404207d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6c" - + "e94a4b44f330b5d9042026dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7" - + "e1ce6bccdc18ff8c07b60441048bd2aeb9cb7e57cb2c4b482ffc81b7afb9de27" - + "e1e3bd23c23a4453bd9ace3262547ef835c3dac4fd97f8461a14611dc9c27745" - + "132ded8e545c1d54c72f046997022100a9fb57dba1eea9bc3e660a909d838d71" - + "8c397aa3b561a6f7901e0e82974856a702010103420004a9fb57dba1eea9bc3e" - + "660a909d838d726e3bf623d52620282013481d1f6e537613a0346db14d55d1bc" - + "c27079b68864ac32885b5bdfc3c9db6f85a35d3df4c39b", - new BigInteger("8527b0540fc10b025a6e0892439c59a889a52e57a0f81b4df41442869c524873", 16), - "a01ed9d4f5a0884db2a232dd5369d6014bfe1f2f6a6d05a757e7a078b71a1f54"), - }; - - /** Test vectors */ - public static class EcPublicKeyTestVector { - final String comment; - final String encoded; // hexadecimal representation of the X509 encoding - final BigInteger p; // characteristic of the field - final BigInteger n; // order of the subgroup - final BigInteger a; // parameter a of the Weierstrass representation - final BigInteger b; // parameter b of the Weierstrass represnetation - final BigInteger gx; // x-coordinate of the generator - final BigInteger gy; // y-coordainat of the generator - final Integer h; // cofactor: may be null - final BigInteger pubx; // x-coordinate of the public point - final BigInteger puby; // y-coordinate of the public point - - public EcPublicKeyTestVector( - String comment, - String encoded, - BigInteger p, - BigInteger n, - BigInteger a, - BigInteger b, - BigInteger gx, - BigInteger gy, - Integer h, - BigInteger pubx, - BigInteger puby) { - this.comment = comment; - this.encoded = encoded; - this.p = p; - this.n = n; - this.a = a; - this.b = b; - this.gx = gx; - this.gy = gy; - this.h = h; - this.pubx = pubx; - this.puby = puby; - } - - /** - * Returns this key as ECPublicKeySpec or null if the key cannot be represented as - * ECPublicKeySpec. The later happens for example if the order of cofactor are not positive. - */ - public ECPublicKeySpec getSpec() { - try { - ECFieldFp fp = new ECFieldFp(p); - EllipticCurve curve = new EllipticCurve(fp, a, b); - ECPoint g = new ECPoint(gx, gy); - // ECParameterSpec requires that the cofactor h is specified. - if (h == null) { - return null; - } - ECParameterSpec params = new ECParameterSpec(curve, g, n, h); - ECPoint pubPoint = new ECPoint(pubx, puby); - ECPublicKeySpec pub = new ECPublicKeySpec(pubPoint, params); - return pub; - } catch (Exception ex) { - System.out.println(comment + " throws " + ex.toString()); - return null; - } - } - - public X509EncodedKeySpec getX509EncodedKeySpec() { - return new X509EncodedKeySpec(TestUtil.hexToBytes(encoded)); - } - } - - public static final EcPublicKeyTestVector EC_VALID_PUBLIC_KEY = - new EcPublicKeyTestVector( - "unmodified", - "3059301306072a8648ce3d020106082a8648ce3d03010703420004cdeb39edd0" - + "3e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b84" - + "29598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16), - 1, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)); - - public static final EcPublicKeyTestVector[] EC_MODIFIED_PUBLIC_KEYS = { - // Modified keys - new EcPublicKeyTestVector( - "public point not on curve", - "3059301306072a8648ce3d020106082a8648ce3d03010703420004cdeb39edd0" - + "3e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b84" - + "29598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebaca", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16), - 1, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebaca", 16)), - new EcPublicKeyTestVector( - "public point = (0,0)", - "3059301306072a8648ce3d020106082a8648ce3d030107034200040000000000" - + "0000000000000000000000000000000000000000000000000000000000000000" - + "000000000000000000000000000000000000000000000000000000", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16), - 1, - new BigInteger("0"), - new BigInteger("0")), - new EcPublicKeyTestVector( - "order = 1", - "308201133081cc06072a8648ce3d02013081c0020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f502010102010103420004cdeb39edd03e2b1a11" - + "a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b" - + "49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("01", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16), - 1, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)), - new EcPublicKeyTestVector( - "order = 26959946660873538060741835960514744168612397095220107664918121663170", - "3082012f3081e806072a8648ce3d02013081dc020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f5021d00ffffffff00000000ffffffffffffffff" - + "bce6faada7179e84f3b9cac202010103420004cdeb39edd03e2b1a11a5e134ec" - + "99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b49bbb85c" - + "3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16), - 1, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)), - new EcPublicKeyTestVector( - "generator = (0,0)", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b04410400000000000000000000000000000000000000" - + "0000000000000000000000000000000000000000000000000000000000000000" - + "00000000000000000000000000022100ffffffff00000000ffffffffffffffff" - + "bce6faada7179e84f3b9cac2fc63255102010103420004cdeb39edd03e2b1a11" - + "a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b" - + "49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("0"), - new BigInteger("0"), - 1, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)), - new EcPublicKeyTestVector( - "generator not on curve", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f7022100ffffffff00000000ffffffffffffffff" - + "bce6faada7179e84f3b9cac2fc63255102010103420004cdeb39edd03e2b1a11" - + "a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b" - + "49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f7", 16), - 1, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)), - new EcPublicKeyTestVector( - "cofactor = 2", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f5022100ffffffff00000000ffffffffffffffff" - + "bce6faada7179e84f3b9cac2fc63255102010203420004cdeb39edd03e2b1a11" - + "a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b" - + "49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16), - 2, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)), - new EcPublicKeyTestVector( - "cofactor = None", - "308201303081e906072a8648ce3d02013081dd020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f5022100ffffffff00000000ffffffffffffffff" - + "bce6faada7179e84f3b9cac2fc63255103420004cdeb39edd03e2b1a11a5e134" - + "ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b49bbb8" - + "5c3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16), - null, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)), - new EcPublicKeyTestVector( - "modified prime", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100fd091059a6893635f900e9449d63f572b2aebc4cff7b4e5e33f1b200" - + "e8bbc1453044042002f6efa55976c9cb06ff16bb629c0a8d4d5143b40084b1a1" - + "cc0e4dff17443eb704205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441040000000000000000000006597fa94b1fd90000" - + "000000000000000000000000021b8c7dd77f9a95627922eceefea73f028f1ec9" - + "5ba9b8fa95a3ad24bdf9fff414022100ffffffff00000000ffffffffffffffff" - + "bce6faada7179e84f3b9cac2fc63255102010103420004000000000000000000" - + "0006597fa94b1fd90000000000000000000000000000021b8c7dd77f9a956279" - + "22eceefea73f028f1ec95ba9b8fa95a3ad24bdf9fff414", - new BigInteger("fd091059a6893635f900e9449d63f572b2aebc4cff7b4e5e33f1b200e8bbc145", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("06597fa94b1fd9000000000000000000000000000002", 16), - new BigInteger("1b8c7dd77f9a95627922eceefea73f028f1ec95ba9b8fa95a3ad24bdf9fff414", 16), - 1, - new BigInteger("06597fa94b1fd9000000000000000000000000000002", 16), - new BigInteger("1b8c7dd77f9a95627922eceefea73f028f1ec95ba9b8fa95a3ad24bdf9fff414", 16)), - new EcPublicKeyTestVector( - "using secp224r1", - "304e301006072a8648ce3d020106052b81040021033a0004074f56dc2ea648ef" - + "89c3b72e23bbd2da36f60243e4d2067b70604af1c2165cec2f86603d60c8a611" - + "d5b84ba3d91dfe1a480825bcc4af3bcf", - new BigInteger("ffffffffffffffffffffffffffffffff000000000000000000000001", 16), - new BigInteger("ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d", 16), - new BigInteger("fffffffffffffffffffffffffffffffefffffffffffffffffffffffe", 16), - new BigInteger("b4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4", 16), - new BigInteger("b70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21", 16), - new BigInteger("bd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34", 16), - 1, - new BigInteger("074f56dc2ea648ef89c3b72e23bbd2da36f60243e4d2067b70604af1", 16), - new BigInteger("c2165cec2f86603d60c8a611d5b84ba3d91dfe1a480825bcc4af3bcf", 16)), - new EcPublicKeyTestVector( - "a = 0", - "308201143081cd06072a8648ce3d02013081c1020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30250401000420f104880c3980129c7efa19b6b0cb04e547b8d0fc0b" - + "95f4946496dd4ac4a7c440044104cdeb39edd03e2b1a11a5e134ec99d5f25f21" - + "673d403f3ecb47bd1fa676638958ea58493b8429598c0b49bbb85c3303ddb155" - + "3c3b761c2caacca71606ba9ebac8022100ffffffff00000000ffffffffffffff" - + "ffbce6faada7179e84f3b9cac2fc63255102010103420004cdeb39edd03e2b1a" - + "11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c" - + "0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("0"), - new BigInteger("f104880c3980129c7efa19b6b0cb04e547b8d0fc0b95f4946496dd4ac4a7c440", 16), - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16), - 1, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)), - new EcPublicKeyTestVector( - "new curve with generator of order 3 that is also on secp256r1", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff3044042046dc879a5c2995d0e6f682468ea95791b7bbd0225cfdb251" - + "3fb10a737afece170420bea6c109251bfe4acf2eeda7c24c4ab70a1473335dec" - + "28b244d4d823d15935e2044104701c05255026aa4630b78fc6b769e388059ab1" - + "443cbdd1f8348bedc3be589dc34cfdab998ad27738ae382aa013986ade0f4859" - + "2a9a1ae37ca61d25ec5356f1bd022100ffffffff00000000ffffffffffffffff" - + "bce6faada7179e84f3b9cac2fc63255102010103420004701c05255026aa4630" - + "b78fc6b769e388059ab1443cbdd1f8348bedc3be589dc3b3025465752d88c851" - + "c7d55fec679521f0b7a6d665e51c8359e2da13aca90e42", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("46dc879a5c2995d0e6f682468ea95791b7bbd0225cfdb2513fb10a737afece17", 16), - new BigInteger("bea6c109251bfe4acf2eeda7c24c4ab70a1473335dec28b244d4d823d15935e2", 16), - new BigInteger("701c05255026aa4630b78fc6b769e388059ab1443cbdd1f8348bedc3be589dc3", 16), - new BigInteger("4cfdab998ad27738ae382aa013986ade0f48592a9a1ae37ca61d25ec5356f1bd", 16), - 1, - new BigInteger("701c05255026aa4630b78fc6b769e388059ab1443cbdd1f8348bedc3be589dc3", 16), - new BigInteger("b3025465752d88c851c7d55fec679521f0b7a6d665e51c8359e2da13aca90e42", 16)), - // Invalid keys - new EcPublicKeyTestVector( - "order = -1157920892103562487626974469494075735299969552241357603" - + "42422259061068512044369", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f50221ff00000000ffffffff0000000000000000" - + "4319055258e8617b0c46353d039cdaaf02010103420004cdeb39edd03e2b1a11" - + "a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b" - + "49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger( - "-115792089210356248762697446949407573529996955224135760342422259061068512044369"), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16), - 1, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)), - new EcPublicKeyTestVector( - "order = 0", - "308201133081cc06072a8648ce3d02013081c0020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f502010002010103420004cdeb39edd03e2b1a11" - + "a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b" - + "49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("0"), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16), - 1, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)), - new EcPublicKeyTestVector( - "cofactor = -1", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f5022100ffffffff00000000ffffffffffffffff" - + "bce6faada7179e84f3b9cac2fc6325510201ff03420004cdeb39edd03e2b1a11" - + "a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b" - + "49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16), - -1, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)), - new EcPublicKeyTestVector( - "cofactor = 0", - "308201333081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d01" - + "01022100ffffffff00000001000000000000000000000000ffffffffffffffff" - + "ffffffff30440420ffffffff00000001000000000000000000000000ffffffff" - + "fffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53" - + "b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d" - + "812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33" - + "576b315ececbb6406837bf51f5022100ffffffff00000000ffffffffffffffff" - + "bce6faada7179e84f3b9cac2fc63255102010003420004cdeb39edd03e2b1a11" - + "a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958ea58493b8429598c0b" - + "49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", - new BigInteger("ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", 16), - new BigInteger("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", 16), - new BigInteger("ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", 16), - new BigInteger("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16), - new BigInteger("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16), - new BigInteger("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16), - 0, - new BigInteger("cdeb39edd03e2b1a11a5e134ec99d5f25f21673d403f3ecb47bd1fa676638958", 16), - new BigInteger("ea58493b8429598c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8", 16)), - }; - - /** Checks that key agreement using ECDH works. */ - @Test - public void testBasic() throws Exception { - KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); - ECGenParameterSpec ecSpec = new ECGenParameterSpec("secp256r1"); - keyGen.initialize(ecSpec); - KeyPair keyPairA = keyGen.generateKeyPair(); - KeyPair keyPairB = keyGen.generateKeyPair(); - - KeyAgreement kaA = KeyAgreement.getInstance("ECDH"); - KeyAgreement kaB = KeyAgreement.getInstance("ECDH"); - kaA.init(keyPairA.getPrivate()); - kaB.init(keyPairB.getPrivate()); - kaA.doPhase(keyPairB.getPublic(), true); - kaB.doPhase(keyPairA.getPublic(), true); - byte[] kAB = kaA.generateSecret(); - byte[] kBA = kaB.generateSecret(); - assertEquals(TestUtil.bytesToHex(kAB), TestUtil.bytesToHex(kBA)); - } - - @Test - public void testVectors() throws Exception { - KeyAgreement ka = KeyAgreement.getInstance("ECDH"); - for (EcdhTestVector t : ECDH_TEST_VECTORS) { - try { - ka.init(t.getPrivateKey()); - ka.doPhase(t.getPublicKey(), true); - byte[] shared = ka.generateSecret(); - assertEquals("Curve:" + t.curvename, TestUtil.bytesToHex(shared), t.shared); - } catch (NoSuchAlgorithmException | InvalidKeySpecException ex) { - // Skipped, because the provider does not support the curve. - } - } - } - - @Test - public void testDecode() throws Exception { - KeyFactory kf = KeyFactory.getInstance("EC"); - ECPublicKey key1 = (ECPublicKey) kf.generatePublic(EC_VALID_PUBLIC_KEY.getSpec()); - ECPublicKey key2 = (ECPublicKey) kf.generatePublic(EC_VALID_PUBLIC_KEY.getX509EncodedKeySpec()); - ECParameterSpec params1 = key1.getParams(); - ECParameterSpec params2 = key2.getParams(); - assertEquals(params1.getCofactor(), params2.getCofactor()); - assertEquals(params1.getCurve(), params2.getCurve()); - assertEquals(params1.getGenerator(), params2.getGenerator()); - assertEquals(params1.getOrder(), params2.getOrder()); - assertEquals(key1.getW(), key2.getW()); - } - - /** - * This test modifies the order of group in the public key. A severe bug would be an - * implementation that leaks information whether the private key is larger than the order given in - * the public key. Also a severe bug would be to reduce the private key modulo the order given in - * the public key parameters. - */ - @SuppressWarnings("InsecureCryptoUsage") - public void testModifiedPublic(String algorithm) throws Exception { - KeyAgreement ka; - try { - ka = KeyAgreement.getInstance(algorithm); - } catch (NoSuchAlgorithmException ex) { - System.out.println("testWrongOrder: " + algorithm + " not supported"); - return; - } - KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); - keyGen.initialize(EcUtil.getNistP256Params()); - ECPrivateKey priv = (ECPrivateKey) keyGen.generateKeyPair().getPrivate(); - KeyFactory kf = KeyFactory.getInstance("EC"); - ECPublicKey validKey = (ECPublicKey) kf.generatePublic(EC_VALID_PUBLIC_KEY.getSpec()); - ka.init(priv); - ka.doPhase(validKey, true); - String expected = TestUtil.bytesToHex(ka.generateSecret()); - for (EcPublicKeyTestVector test : EC_MODIFIED_PUBLIC_KEYS) { - try { - X509EncodedKeySpec spec = test.getX509EncodedKeySpec(); - ECPublicKey modifiedKey = (ECPublicKey) kf.generatePublic(spec); - ka.init(priv); - ka.doPhase(modifiedKey, true); - String shared = TestUtil.bytesToHex(ka.generateSecret()); - // The implementation did not notice that the public key was modified. - // This is not nice, but at the moment we only fail the test if the - // modification was essential for computing the shared secret. - // - // BouncyCastle v.1.53 fails this test, for ECDHC with modified order. - // This implementation reduces the product s*h modulo the order given - // in the public key. An attacker who can modify the order of the public key - // and who can learn whether such a modification changes the shared secret is - // able to learn the private key with a simple binary search. - assertEquals("algorithm:" + algorithm + " test:" + test.comment, expected, shared); - } catch (GeneralSecurityException ex) { - // OK, since the public keys have been modified. - System.out.println("testModifiedPublic:" + test.comment + " throws " + ex.toString()); - } - } - } - - /** - * This is a similar test as testModifiedPublic. However, this test uses test vectors - * ECPublicKeySpec - */ - @SuppressWarnings("InsecureCryptoUsage") - public void testModifiedPublicSpec(String algorithm) throws Exception { - KeyAgreement ka; - try { - ka = KeyAgreement.getInstance(algorithm); - } catch (NoSuchAlgorithmException ex) { - System.out.println("testWrongOrder: " + algorithm + " not supported"); - return; - } - KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); - keyGen.initialize(EcUtil.getNistP256Params()); - ECPrivateKey priv = (ECPrivateKey) keyGen.generateKeyPair().getPrivate(); - KeyFactory kf = KeyFactory.getInstance("EC"); - ECPublicKey validKey = (ECPublicKey) kf.generatePublic(EC_VALID_PUBLIC_KEY.getSpec()); - ka.init(priv); - ka.doPhase(validKey, true); - String expected = TestUtil.bytesToHex(ka.generateSecret()); - for (EcPublicKeyTestVector test : EC_MODIFIED_PUBLIC_KEYS) { - ECPublicKeySpec spec = test.getSpec(); - if (spec == null) { - // The constructor of EcPublicKeySpec performs some very minor validity checks. - // spec == null if one of these validity checks fails. Of course such a failure is OK. - continue; - } - try { - ECPublicKey modifiedKey = (ECPublicKey) kf.generatePublic(spec); - ka.init(priv); - ka.doPhase(modifiedKey, true); - String shared = TestUtil.bytesToHex(ka.generateSecret()); - // The implementation did not notice that the public key was modified. - // This is not nice, but at the moment we only fail the test if the - // modification was essential for computing the shared secret. - // - // BouncyCastle v.1.53 fails this test, for ECDHC with modified order. - // This implementation reduces the product s*h modulo the order given - // in the public key. An attacker who can modify the order of the public key - // and who can learn whether such a modification changes the shared secret is - // able to learn the private key with a simple binary search. - assertEquals("algorithm:" + algorithm + " test:" + test.comment, expected, shared); - } catch (GeneralSecurityException ex) { - // OK, since the public keys have been modified. - System.out.println("testModifiedPublic:" + test.comment + " throws " + ex.toString()); - } - } - } - - @Test - public void testModifiedPublic() throws Exception { - testModifiedPublic("ECDH"); - testModifiedPublic("ECDHC"); - } - - @Test - public void testModifiedPublicSpec() throws Exception { - testModifiedPublicSpec("ECDH"); - testModifiedPublicSpec("ECDHC"); - } - - @SuppressWarnings("InsecureCryptoUsage") - public void testDistinctCurves(String algorithm, ECPrivateKey priv, ECPublicKey pub) - throws Exception { - KeyAgreement kaA; - try { - kaA = KeyAgreement.getInstance(algorithm); - } catch (NoSuchAlgorithmException ex) { - System.out.println("Algorithm not supported: " + algorithm); - return; - } - byte[] shared; - try { - kaA.init(priv); - kaA.doPhase(pub, true); - shared = kaA.generateSecret(); - } catch (InvalidKeyException ex) { - // This is expected. - return; - } - // Printing some information to determine what might have gone wrong: - // E.g., if the generated secret is the same as the x-coordinate of the public key - // then it is likely that the ECDH computation was using a fake group with small order. - // Such a situation is probably exploitable. - // This probably is exploitable. If the curve of the private key was used for the ECDH - // then the generated secret and the x-coordinate of the public key are likely - // distinct. - EllipticCurve pubCurve = pub.getParams().getCurve(); - EllipticCurve privCurve = priv.getParams().getCurve(); - ECPoint pubW = pub.getW(); - System.out.println("testDistinctCurves: algorithm=" + algorithm); - System.out.println( - "Private key: a=" - + privCurve.getA() - + " b=" - + privCurve.getB() - + " p" - + EcUtil.getModulus(privCurve)); - System.out.println(" s =" + priv.getS()); - System.out.println( - "Public key: a=" - + pubCurve.getA() - + " b=" - + pubCurve.getB() - + " p" - + EcUtil.getModulus(pubCurve)); - System.out.println(" w = (" + pubW.getAffineX() + ", " + pubW.getAffineY() + ")"); - System.out.println( - " = (" - + pubW.getAffineX().toString(16) - + ", " - + pubW.getAffineY().toString(16) - + ")"); - System.out.println("generated shared secret:" + TestUtil.bytesToHex(shared)); - fail("Generated secret with distinct Curves using " + algorithm); - } - - /** - * This test modifies the order of group in the public key. A severe bug would be an - * implementation that leaks information whether the private key is larger than the order given in - * the public key. Also a severe bug would be to reduce the private key modulo the order given in - * the public key parameters. - */ - // TODO(bleichen): This can be merged with testModifiedPublic once this is fixed. - @SuppressWarnings("InsecureCryptoUsage") - public void testWrongOrder(String algorithm, ECParameterSpec spec) throws Exception { - KeyAgreement ka; - try { - ka = KeyAgreement.getInstance(algorithm); - } catch (NoSuchAlgorithmException ex) { - System.out.println("testWrongOrder: " + algorithm + " not supported"); - return; - } - KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); - ECPrivateKey priv; - ECPublicKey pub; - try { - keyGen.initialize(spec); - priv = (ECPrivateKey) keyGen.generateKeyPair().getPrivate(); - pub = (ECPublicKey) keyGen.generateKeyPair().getPublic(); - } catch (GeneralSecurityException ex) { - // This is OK, since not all provider support Brainpool curves - System.out.println("testWrongOrder: could not generate keys for curve"); - return; - } - // Get the shared secret for the unmodified keys. - ka.init(priv); - ka.doPhase(pub, true); - byte[] shared = ka.generateSecret(); - // Generate a modified public key. - ECParameterSpec modifiedParams = - new ECParameterSpec( - spec.getCurve(), spec.getGenerator(), spec.getOrder().shiftRight(16), 1); - ECPublicKeySpec modifiedPubSpec = new ECPublicKeySpec(pub.getW(), modifiedParams); - KeyFactory kf = KeyFactory.getInstance("EC"); - ECPublicKey modifiedPub; - try { - modifiedPub = (ECPublicKey) kf.generatePublic(modifiedPubSpec); - } catch (GeneralSecurityException ex) { - // The provider does not support non-standard curves or did a validity check. - // Both would be correct. - System.out.println("testWrongOrder: can't modify order."); - return; - } - byte[] shared2; - try { - ka.init(priv); - ka.doPhase(modifiedPub, true); - shared2 = ka.generateSecret(); - } catch (GeneralSecurityException ex) { - // This is the expected behavior - System.out.println("testWrongOrder:" + ex.toString()); - return; - } - // TODO(bleichen): Getting here is already a bug and we might flag this later. - // At the moment we are only interested in really bad behavior of a library, that potentially - // leaks the secret key. This is the case when the shared secrets are different, since this - // suggests that the implementation reduces the multiplier modulo the given order of the curve - // or some other behaviour that is dependent on the private key. - // An attacker who can check whether a DH computation was done correctly or incorrectly because - // of modular reduction, can determine the private key, either by a binary search or by trying - // to guess the private key modulo some small "order". - // BouncyCastle v.1.53 fails this test, and leaks the private key. - System.out.println( - "Generated shared secret with a modified order:" - + algorithm - + "\n" - + "expected:" - + TestUtil.bytesToHex(shared) - + " computed:" - + TestUtil.bytesToHex(shared2)); - assertEquals( - "Algorithm:" + algorithm, TestUtil.bytesToHex(shared), TestUtil.bytesToHex(shared2)); - } - - @Test - public void testWrongOrderEcdh() throws Exception { - testWrongOrder("ECDH", EcUtil.getNistP256Params()); - testWrongOrder("ECDH", EcUtil.getBrainpoolP256r1Params()); - } - - @Test - public void testWrongOrderEcdhc() throws Exception { - testWrongOrder("ECDHC", EcUtil.getNistP256Params()); - testWrongOrder("ECDHC", EcUtil.getBrainpoolP256r1Params()); - } -} diff --git a/java/com/google/security/wycheproof/testcases/EcdsaTest.java b/java/com/google/security/wycheproof/testcases/EcdsaTest.java deleted file mode 100644 index 0a8e760..0000000 --- a/java/com/google/security/wycheproof/testcases/EcdsaTest.java +++ /dev/null @@ -1,910 +0,0 @@ -/** - * @license - * Copyright 2016 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import static org.junit.Assert.*; - -import com.google.security.wycheproof.WycheproofRunner.ProviderType; -import com.google.security.wycheproof.WycheproofRunner.SlowTest; -import java.lang.management.ManagementFactory; -import java.lang.management.ThreadMXBean; -import java.math.BigInteger; -import java.security.InvalidAlgorithmParameterException; -import java.security.KeyFactory; -import java.security.KeyPair; -import java.security.KeyPairGenerator; -import java.security.MessageDigest; -import java.security.Signature; -import java.security.SignatureException; -import java.security.interfaces.ECPrivateKey; -import java.security.interfaces.ECPublicKey; -import java.security.spec.ECGenParameterSpec; -import java.security.spec.ECParameterSpec; -import java.security.spec.ECPoint; -import java.security.spec.ECPublicKeySpec; -import java.util.Arrays; -import org.junit.Test; - -/** - * Tests ECDSA against invalid signatures. - * - * @author bleichen@google.com (Daniel Bleichenbacher) - */ -// Tested providers: -// SunEC: accepts a few alternative encodings and throws run time exceptions. -// The implementation does not protect against timing attacks. -// BC: accepts alternative encoding, and additional arguments -// AndroidOpenSSL: OK -// TODO(bleichen): -// - CVE-2015-2730: Firefox failed to handle some signatures correctly because of incorrect -// point multiplication. (I don't have enough information here.) -public class EcdsaTest { - // ECDSA-Key1 - static final String MESSAGE = "Hello"; - static final String CURVE = "secp256r1"; - static final BigInteger PubX = - new BigInteger( - "33903964965861532023650245008903090201819051686264021958530366090984128098564"); - static final BigInteger PubY = - new BigInteger( - "113542129898393725739068316260085522189065290079050903091108740065052129055287"); - - // Valid signatures for MESSAGE - static final String[] VALID_SIGNATURES = { - "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d49" - + "1b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285" - + "cd59f43260ecce", - }; - - /** - * The following test vectors contain a valid signature that use alternative BER encoding. - * Whether such signatures are accepted as valid or rejected depends on the implementation. - * Allowing alternative BER encodings is in many cases benign. However, there are cases where this - * kind of signature malleability was a problem. See for example - * https://en.bitcoin.it/wiki/Transaction_Malleability - */ - // NOTE(bleichen): The following test vectors were generated with some python code. - // New test vectors should best be done by extending this code. Some of the signatures - // can be moved to INVALID_SIGNATURES, when b/31572415 is fixed. - static final String[] MODIFIED_SIGNATURES = { - // BER:long form encoding of length - "308145022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d" - + "491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e762" - + "85cd59f43260ecce", - "304602812100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d" - + "491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e762" - + "85cd59f43260ecce", - "3046022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d49" - + "1b39fd2c3f028120747291dd2f3f44af7ace68ea33431d6f94e418c106a6e762" - + "85cd59f43260ecce", - // BER:length contains leading 0 - "30820045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a" - + "3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e7" - + "6285cd59f43260ecce", - "30470282002100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a" - + "3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e7" - + "6285cd59f43260ecce", - "3047022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d49" - + "1b39fd2c3f02820020747291dd2f3f44af7ace68ea33431d6f94e418c106a6e7" - + "6285cd59f43260ecce", - // BER:prepending 0's to integer - "30470223000000b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a" - + "3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e7" - + "6285cd59f43260ecce", - "3047022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d49" - + "1b39fd2c3f02220000747291dd2f3f44af7ace68ea33431d6f94e418c106a6e7" - + "6285cd59f43260ecce", - // NOTE (bleichen): belongs into INVALID_SIGNATURES. We only keep these - // sigantures here because of b/31572415. - // length = 2**31 - 1 - "30847fffffff022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7" - + "db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106" - + "a6e76285cd59f43260ecce", - "304902847fffffff00b7babae9332b54b8a3a05b7004579821a887a1b21465f7" - + "db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106" - + "a6e76285cd59f43260ecce", - "3049022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d49" - + "1b39fd2c3f02847fffffff747291dd2f3f44af7ace68ea33431d6f94e418c106" - + "a6e76285cd59f43260ecce", - }; - - /** - * Test vectors with invalid signatures. - * The motivation for these test vectors are previously broken implementations. E.g. - *
if (result) { ... } will be incorrect in
- * such situations. The test vectors below contain incorrectly encoded signatures.
- * {@link java.security.Signature#verify(byte[])} should either return false or throw a - * SignatureException. Other behaviour such as throwing a RuntimeException might allow a denial - * of service attack: - *
TODO(bleichen): -// - compressed points, -// - maybe again CipherInputStream, CipherOutputStream, -// - BouncyCastle has a KeyPairGenerator for ECIES. Is this one different from EC? -public class EciesTest { - - int expectedCiphertextLength(String algorithm, int coordinateSize, int messageLength) - throws Exception { - switch (algorithm.toUpperCase()) { - case "ECIESWITHAES-CBC": - // Uses the encoding - // 0x04 || coordinate x || coordinate y || PKCS5 padded ciphertext || 20-byte HMAC-digest. - return 1 + (2 * coordinateSize) + (messageLength - messageLength % 16 + 16) + 20; - default: - fail("Not implemented"); - } - return -1; - } - - /** - * Check that key agreement using ECIES works. This example does not specify an IESParametersSpec. - * BouncyCastle v.1.52 uses the following algorithms: KDF2 with SHA1 for the key derivation - * AES-CBC with PKCS #5 padding. HMAC-SHA1 with a 20 byte digest. The AES and the HMAC key are - * both 128 bits. - */ - @SuppressWarnings("InsecureCryptoUsage") - @Test - public void testEciesBasic() throws Exception { - ECGenParameterSpec ecSpec = new ECGenParameterSpec("secp256r1"); - KeyPairGenerator kf = KeyPairGenerator.getInstance("EC"); - kf.initialize(ecSpec); - KeyPair keyPair = kf.generateKeyPair(); - PrivateKey priv = keyPair.getPrivate(); - PublicKey pub = keyPair.getPublic(); - byte[] message = "Hello".getBytes("UTF-8"); - Cipher ecies = Cipher.getInstance("ECIESwithAES-CBC"); - ecies.init(Cipher.ENCRYPT_MODE, pub); - byte[] ciphertext = ecies.doFinal(message); - System.out.println("testEciesBasic:" + TestUtil.bytesToHex(ciphertext)); - ecies.init(Cipher.DECRYPT_MODE, priv, ecies.getParameters()); - byte[] decrypted = ecies.doFinal(ciphertext); - assertEquals(TestUtil.bytesToHex(message), TestUtil.bytesToHex(decrypted)); - } - - /** - * ECIES does not allow encryption modes and paddings. If this test fails then we should add - * additional tests covering the new algorithms. - */ - // TODO(bleichen): This test describes BouncyCastles behaviour, but not necessarily what we - // expect. - @SuppressWarnings("InsecureCryptoUsage") - @Test - public void testInvalidNames() throws Exception { - String[] invalidNames = - new String[] { - "ECIESWITHAES/CBC/PKCS5PADDING", - "ECIESWITHAES/CBC/PKCS7PADDING", - "ECIESWITHAES/DHAES/NOPADDING", - "ECIESWITHDESEDE/DHAES/NOPADDING", - "ECIESWITHAES/ECB/NOPADDING", - "ECIESWITHAES/CTR/NOPADDING", - }; - for (String algorithm : invalidNames) { - try { - Cipher.getInstance(algorithm); - fail("unexpected algorithm:" + algorithm); - } catch (NoSuchAlgorithmException ex) { - // this is expected - } - } - } - - /** Here are a few names that BouncyCastle accepts. */ - // TODO(bleichen): This test describes BouncyCastles behaviour, but not necessarily what we - // expect. - @SuppressWarnings("InsecureCryptoUsage") - @Test - public void testValidNames() throws Exception { - String[] validNames = - new String[] { - "ECIES/DHAES/PKCS7PADDING", - "ECIESWITHAES-CBC/NONE/NOPADDING", - }; - for (String algorithm : validNames) { - Cipher.getInstance(algorithm); - } - } - - /** - * BouncyCastle has a key generation algorithm "ECIES". This test checks that the result are - * ECKeys in both cases. - */ - @Test - public void testKeyGeneration() throws Exception { - ECGenParameterSpec ecSpec = new ECGenParameterSpec("secp256r1"); - KeyPairGenerator kf = KeyPairGenerator.getInstance("ECIES"); - kf.initialize(ecSpec); - KeyPair keyPair = kf.generateKeyPair(); - ECPrivateKey priv = (ECPrivateKey) keyPair.getPrivate(); - ECPublicKey pub = (ECPublicKey) keyPair.getPublic(); - } - - /** - * Tries to decrypt ciphertexts where the symmetric part has been randomized. - * If this randomization leads to distinguishable exceptions then this may indicate that the - * implementation is vulnerable to a padding attack. - * - * Problems detected: - *
This test tries to verify this. - */ - /* TODO(bleichen): There's no point to run this test as long as the previous basic test fails. - public void testByteBufferAlias() throws Exception { - byte[] message = "Hello".getBytes("UTF-8"); - String algorithm = "ECIESWithAES-CBC"; - ECGenParameterSpec ecSpec = new ECGenParameterSpec("secp256r1"); - KeyPairGenerator kf = KeyPairGenerator.getInstance("EC"); - kf.initialize(ecSpec); - KeyPair keyPair = kf.generateKeyPair(); - Cipher ecies = Cipher.getInstance(algorithm); - - int ciphertextLength = expectedCiphertextLength(algorithm, 32, message.length); - byte[] backingArray = new byte[ciphertextLength]; - ByteBuffer ptBuffer = ByteBuffer.wrap(backingArray); - ptBuffer.put(message); - ptBuffer.flip(); - - ecies.init(Cipher.ENCRYPT_MODE, keyPair.getPublic()); - ByteBuffer ctBuffer = ByteBuffer.wrap(backingArray); - ecies.doFinal(ptBuffer, ctBuffer); - ctBuffer.flip(); - - ecies.init(Cipher.DECRYPT_MODE, keyPair.getPrivate()); - byte[] decrypted = ecies.doFinal(backingArray, 0, ctBuffer.remaining()); - assertEquals(TestUtil.bytesToHex(message), TestUtil.bytesToHex(decrypted)); - } - */ -} diff --git a/java/com/google/security/wycheproof/testcases/JsonSignatureTest.java b/java/com/google/security/wycheproof/testcases/JsonSignatureTest.java deleted file mode 100644 index 4630696..0000000 --- a/java/com/google/security/wycheproof/testcases/JsonSignatureTest.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * @license - * Copyright 2017 Google Inc. All rights reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.security.wycheproof; - -import static org.junit.Assert.*; - -import static java.nio.charset.StandardCharsets.UTF_8; - -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; -import com.google.gson.stream.JsonReader; -import java.io.FileInputStream; -import java.io.InputStreamReader; -import java.math.BigInteger; -import java.security.KeyFactory; -import java.security.PublicKey; -import java.security.Signature; -import java.security.SignatureException; -import java.security.spec.X509EncodedKeySpec; -import org.junit.Test; - -/** - * This test uses test vectors in JSON format to check digital signature schemes. - * There are still a lot of open questions, e.g. the format for the test vectors is not - * yet finalized. Therefore, we are not integrating the tests here into other tests - */ -public class JsonSignatureTest { - - static protected String getString(JsonObject object, String name) throws Exception { - return object.get(name).getAsString(); - } - - /** - * Wycheproof represents BigIntegers as hexadecimal strings, using bigendian order and - * twos complement representation. - */ - static protected BigInteger getBigInteger(JsonObject object, String name) throws Exception { - String hex = getString(object, name); - byte[] bytes = TestUtil.hexToBytes(hex); - return new BigInteger(bytes); - } - - /** - * Wycheproof represents byte arrays as hexadeciamal strings. - */ - static protected byte[] getBytes(JsonObject object, String name) throws Exception { - String hex = getString(object, name); - return TestUtil.hexToBytes(hex); - } - - /** - * Returns the algorithm name for a digital signature algorithm with a given message digest. The - * algorithm names used in JCA are a bit inconsequential. E.g. a dash is necessary for message - * digests (e.g. "SHA-256") but are not used in the corresponding names for digital signatures - * (e.g. "SHA256WITHECDSA"). - * - *
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html
- *
- * @param md the name of the message digest (e.g. "SHA-256")
- * @param signatureAlgorithm the name of the signature algorithm (e.g. "ECDSA")
- * @return the algorithm name for the signature scheme with the given hash.
- */
- protected static String getAlgorithmName(String md, String signatureAlgorithm) {
- if (md.equals("SHA-1")) {
- md = "SHA1";
- } else if (md.equals("SHA-224")) {
- md = "SHA224";
- } else if (md.equals("SHA-256")) {
- md = "SHA256";
- } else if (md.equals("SHA-384")) {
- md = "SHA384";
- } else if (md.equals("SHA-512")) {
- md = "SHA512";
- }
- return md + "WITH" + signatureAlgorithm;
- }
-
- /**
- * object should contain the key in multiple formats:
- * "key" : elements of the public key
- * "keyDer": the key in ASN encoding encoded hexadecimal
- * "keyPem": the key in Pem format encoded hexadecimal
- * The test can use the format that is most convenient.
- */
- // This is a false positive, since errorprone cannot track values passed into a method.
- @SuppressWarnings("InsecureCryptoUsage")
- static protected PublicKey getPublicKey(JsonObject object, String algorithm) throws Exception {
- KeyFactory kf;
- if (algorithm.equals("ECDSA")) {
- kf = KeyFactory.getInstance("EC");
- } else {
- kf = KeyFactory.getInstance(algorithm);
- }
- byte[] encoded = TestUtil.hexToBytes(getString(object, "keyDer"));
- X509EncodedKeySpec x509keySpec = new X509EncodedKeySpec(encoded);
- return kf.generatePublic(x509keySpec);
- }
-
- /** Example format for test vectors
- * {
- * "algorithm": "ECDSA",
- * "generatorVersion": "0.0a10",
- * "numberOfTests": 217,
- * "testGroups": [
- * {
- * "key": {
- * "curve": "secp256r1",
- * "type": "ECPublicKey",
- * "wx": "0c9c4bc2617c81eb2dcbfda2db2a370a955be86a0d2e95fcb86a99f90cf046573",
- * "wy": "0c400363b1b6bcc3595a7d6d3575ccebcbb03f90ba8e58da2bc4824272f4fecff"
- * },
- * "keyDer": References:
- *
- * Some recent bugs: CVE-2012-5081: Java JSSE provider leaked information through
- * exceptions and timing. Both the PKCS #1 padding and the OAEP padding were broken:
- * http://www-brs.ub.ruhr-uni-bochum.de/netahtml/HSS/Diss/MeyerChristopher/diss.pdf
- *
- * What this test does not (yet) cover:
- *
- * Currently we check for just one type of legacy signatures: i.e., a missing NULL parameter in
- * the ASN encoding of the hash. BouncyCastle and the SunJCE accept this signature, Conscrypt does
- * not.
- *
- * Some references that support accepting this signature:
- * https://codereview.chromium.org/1690123002/
- * https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/Jo5S7HtEABI claims that
- * 7% of the responses in the Online Certificate Status Protocol (OCSP) miss the NULL parameter
- */
- @Test
- public void testLegacySignatures() throws Exception {
- RSAPublicKeySpec key = RSA_KEY1;
- String algorithm = ALGORITHM_KEY1;
- byte[] message = "Test".getBytes("UTF-8");
- Signature verifier = Signature.getInstance(algorithm);
- KeyFactory kf = KeyFactory.getInstance("RSA");
- PublicKey pub = kf.generatePublic(key);
- for (String signature : LEGACY_SIGNATURES_KEY1) {
- byte[] signatureBytes = TestUtil.hexToBytes(signature);
- verifier.initVerify(pub);
- verifier.update(message);
- boolean verified = false;
- try {
- verified = verifier.verify(signatureBytes);
- } catch (SignatureException ex) {
- verified = false;
- }
- if (verified) {
- System.out.println("Verfied legacy signature:" + signature);
- } else {
- System.out.println("Rejected legacy signature:" + signature);
- }
- }
- }
-}
diff --git a/javascript/BigInteger.js b/javascript/BigInteger.js
deleted file mode 100644
index 514ce6a..0000000
--- a/javascript/BigInteger.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * @license
- * Copyright 2017 Google Inc. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @fileoverview Defines interfaces for big numbers.
- * All arithmetic operations are inherits from e2e.BigNum.
- */
-goog.provide('wycheproof.BigInteger');
-goog.provide('wycheproof.BigPrimeInteger');
-goog.require('e2e.BigNum');
-goog.require('e2e.BigPrimeNum');
-goog.require('goog.crypt');
-goog.require('goog.crypt.base64');
-goog.require('goog.testing.asserts');
-goog.require('wycheproof.TestUtil');
-
-var TestUtil = wycheproof.TestUtil;
-
-
-/**
- * Non-negative arbitrary-precision integers.
- * @param {(!Array References:
- *
- * Some recent bugs: CVE-2012-5081: Java JSSE provider leaked information through
- * exceptions and timing. Both the PKCS #1 padding and the OAEP padding were broken:
- * http://www-brs.ub.ruhr-uni-bochum.de/netahtml/HSS/Diss/MeyerChristopher/diss.pdf
- *
- * What this test does not (yet) cover:
- *
- *
- *
- *
- *
- *
- */
- @SuppressWarnings("InsecureCryptoUsage")
- public void testExceptions(String algorithm) throws Exception {
- KeyPairGenerator keygen = KeyPairGenerator.getInstance("RSA");
- keygen.initialize(1024);
- KeyPair keypair = keygen.genKeyPair();
- SecureRandom rand = new SecureRandom();
- Cipher c = Cipher.getInstance(algorithm);
- byte[] ciphertext = new byte[1024 / 8];
- HashSet
- *
- */
- static final String[] SIGNATURES_KEY1 = {
- // Message:Test
- // Digest:sha256
- // Key size:1024
-
- // Correct signature
- // padding:3031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "68ea71ee1911687eb54b3d19cedcfd44719d0b24accccc59bdafd84e4eba48ef"
- + "0be7f115e7073f9f273286a7dcee3b94cdbe208e30ae496987479d3aa12ab0e1"
- + "2685ab592d7693a494e6ad27d526ed3ab5912c7f81e09983931794c2165c22fd"
- + "859e0f9af1a93a4dfe144098c562731e6059d236b52cb865996c87a9baf7f103",
-
- // long form encoding of length
- // padding:308131300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d
- // 682299550d7a6e0f345e25
- "52f46d508e31f030b17c537888585f919037562e15f1924543601a41f9b701ee"
- + "416ad73d6576b4eaaa64e685289dc478751dfe2d7e588252bfe2d43f4b3a31c6"
- + "c6c39a9df884a2fc2e45f09c2150a830974b1c9d26090830b37bf06f1d57be1d"
- + "a34ebb016e9db7ce2c34e94872c89567ff6f2ab35a1a9fb6632e100c7d7af834",
- // padding:303230810d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d
- // 682299550d7a6e0f345e25
- "3f34017b3172aaeec72d208308e9b83150699f86634b948847eab56f0169fef5"
- + "1b5636a96866f4f0f4c649400489e047803a91f2b2f32ab715065e20770c4e27"
- + "88946b85aca5c90efdd6a9458dd9b6f797f96a3de88d2e4896afe147d8c03899"
- + "43828100061903a30eaff1dadd98d3e49dba56cdcfa5f215d9c615f974f4a0bc",
- // padding:3032300e06810960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d
- // 682299550d7a6e0f345e25
- "1478337676aa47ca72ea7557facff06f6c777f56063f4487d345e43dc56a6bc5"
- + "f8a891085d53a32c9d1c3cf7f469e7f56847b0b1b9b5b784526078271f21d055"
- + "0afc40f81e2b8e8dec851d87511cace965edceb83cb96c8d6616e1ee75bb22c5"
- + "4412fc942a6f71c9fc609a31a69d34b774a97c1ba4f85cca28d9993db8543f75",
- // padding:3032300e06096086480165030402010581000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d
- // 682299550d7a6e0f345e25
- "77ba423e600bdd761ed10e7c00698a87fe1322f5f42b2902a0be7a24b1cf44f6"
- + "13fa55edeb2ded0475f8e1a13e5368f9a2bfc4f2f926ef289a2207bf3689fc1c"
- + "8ec3e5463064a7f51bbc993966cc4016319b7c95f282372f1ff848d7fca753a8"
- + "1d905b3341b0fbf60ba186e750f3171cfc84288eff8742bda432bd6c8dc04f9f",
- // padding:3032300d06096086480165030402010500048120532eaabd9574880dbf76b9b8cc00832c20a6ec113d
- // 682299550d7a6e0f345e25
- "9460ee79bb990bc3fe28cfca92363e6ff6900e3b61b3a402f06024a72b7a65d6"
- + "2094b4419e93900995eb121327f72b26b139bab3e5e2bd0c82e0cf6357f3b16f"
- + "1c1dd4407a9a820f20e3baaa2259614d9ee3e015e1c1778befa13aff1e545ea1"
- + "758cba4713631d63180a91b52df394294441642964a024f45b2251c90e002ec0",
-
- // length contains leading 0
- // padding:30820031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "96ac043d3cada45aed0dbdc4662dcf7855553a5effa1077048b51c7e9bfff7c2"
- + "bb3486ea42894d4b4afb26a3b3bd32cb68d5c4d8ca2622f50d8c56fdc25baf83"
- + "b9909ecb096419ddc13578dcc8121007f7204ee82c517ae03de70fa23ef23906"
- + "02029a0cbc8a96c5b781d857dbf12802aa561f5f41ea35aa0babb91b9f891762",
- // padding:30333082000d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "2a70643572a7cda975d9e2c0827837e60eaa78c297b1ff75b84f654a91fe3329"
- + "4ccbeda52676ece50fcc03018151e66c24940bd0574ab85a6599231d587f4a6e"
- + "0ae841cb6696e7dcfd182cb75001304e36887bc4fe3b373828f8b0e62ac2300a"
- + "626c9e6a2cd05bb7910e74da2978dae1948f855b3b455cd30367160e21581cab",
- // padding:3033300f0682000960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "27778e39b45dee1e7003f1d315d3466fc111791187ddc056784c158df92097e1"
- + "23021e11918b6df8d905304db732e83d904bc914271b03def4ee129c3fc8adcc"
- + "4f81b690e09e70e46c8b920093f304e64ecb7358740e976d28538a9eecf09ec1"
- + "e1cd47df9107968207b21538cabe076bcc07c3862c46a793fcf638c70a972885",
- // padding:3033300f0609608648016503040201058200000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "3a879e9f883b158908014f3617cae3315d47afdadd30840494f68d91c04dfe81"
- + "bd16a40c7d21238cd1816928d989a232a3492325ab0f95d4426e3fb7d58c9908"
- + "191dc557d8779dabb282287b7860c30e0796283428e0276447235809882ee990"
- + "deb0f4312c01e7ddf0690406eeacb660acc6957bb670904cfd8d04df5e3ebda2",
- // padding:3033300d0609608648016503040201050004820020532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "2b82155f363a3b283ae455f59e41c29dec2fbd8c7438b0e347aec5b38c7c895c"
- + "b7d326870e4fbdb935fcbb561f223bd926dbe8b95ef5eaab27920dbe30c641e9"
- + "9f526a9bc356af54198b459b59383135a82cd5b6edab7da0b1a51d939b2f9951"
- + "e1432d637c4f04a3546ed9c890143ae364602b94eabdaa2a45e4bdf0b5bdfa71",
-
- // wrong length
- // padding:3032300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "1dda56dc953aeee7fd76ae7166d92ab9e3d1d9759e76f8f1d7634a73cbf69e39"
- + "d8249153d7c2d83c9664db13552f0c78df34b8a67e7b6c10bcc61b5ead7ba62c"
- + "e0ec7ba8ac78d146f7e4cadee6f6250e0bc3100660e7afbe3afa17fa288d9754"
- + "9b4c8cacc00ac5c942673485739f89c9e5e63ad2be97a8f2313f5c5b095e7542",
- // padding:3030300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "692c143b82196a391a3546607336e6f3bc047412645cf0def0d62d1b42234c14"
- + "da138bb7f451b45073bbda2aba23412e83bc40d4e7de3e0684f2cad7d059f2d6"
- + "831aa3d2ece4964ca75cd41dce23c5ba495c15345b36947b4b5a051fe1b84e14"
- + "8b5ae21f112d2245b1acbaeef9dc4a0c408829b9d2b1b5ab1d3a40af0a27b99e",
- // padding:3031300e060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "66c31a45b2287425a20f65c3eba9cc58c370882f5fc62921935491fbd516df9b"
- + "af9b28304a21d9008b61a92779ecfb3b0c03f6d74354f5159956e3fc1d35bd73"
- + "76289378f05d7a71e05ab32794f2566a54635e8dc64740acbe10a293ceddbebe"
- + "8499b520f406023a134eb9927ebb788b92488f036d109ec0a40ac52372e847b3",
- // padding:3031300c060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "7b85536bdcda4ad3fc40129f2ff9dc85d9ec049913784064e735868664044627"
- + "8a2006d93fb33429407597e5d8c783e3f7aee8a7791d69139f3c802a6547f01b"
- + "f987415eec2447b0e8c4f3aee7ae2085d141fa34ca6634bc109dede93285d5c4"
- + "0cfcd98bd47ceb9cc1890dfff53b7ebb8038533580c7a67fe14c0c422e20cd64",
- // padding:3031300d060a60864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "5d77fba3cbb1905d83aa532fcc3227a95d7931bf0c2ab51f8118824de9dc029b"
- + "d2470adf48b41c694ec7359d00a1336990c30ee368dd40bd681ba74794415d39"
- + "97e7a756659397bf6abd44ca91c12a8580a3f5d1cdbc7f3be0c23c72334ce9b1"
- + "419e6540dab73f5ff8ab57d0bbbe92b688bd3495f9344822b622042c2491bc41",
- // padding:3031300d060860864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "7b5476fb78f389d1131764e7a13322f86008924c8c098f6d74f2df4dcc5a504c"
- + "d786b3eaae33295cd1e87a2bbd1a06cb385674d465110a9a990d52de9a67f1c1"
- + "3ecaaa86383d489423c084fae9ecd2e9b109f4f04b8c013e3409128f3a079c06"
- + "8c1ad27bc2a20e76ad149325b7b0f0bd804a4e33949a98aac49076260702b0b0",
- // padding:3031300d060960864801650304020105010420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "6034e1253e4860a29096e392076794cfcea166a30b340cc09f77baa5952c06d1"
- + "48bd89b750c3112930ef210a50a7d3f6569da89912b5e50e824116e73a155369"
- + "58f75779506d07e67ec9c0cd8de4b51dfbb0fe56926feed18ffbd83b0cdd50d5"
- + "6326c54adf97e629378ae5f0f02fcda3da1aa98cb1d1990946edec711a85a0d8",
- // padding:3031300d060960864801650304020105000421532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "a44cd265e1ecea83fc74e9eef746ef173277cc96f69a1798590ddee7ce5b5c34"
- + "a82ad58a5c042db19005e04eec4159900ea764c0d008c52b94577d1c438661fb"
- + "767902d9d1bbd6a90bdc4df685ec5951eac81d8b4dd36bceef7b6f919e85b6c9"
- + "94c7cf22a804f15cebe63b77f47b3bc2c2aaa68c6362c27a574b849efafe72e9",
- // padding:3031300d06096086480165030402010500041f532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "a160aa43f4873cada34bea5ccd2be9dce07940ee1c08eaad524a5019993bc753"
- + "ce92cccada706b483f106ff20b327b35e7c83955ad3bbff3f26ced3489877d1b"
- + "5bf285d61afcb30219c02a440da61030e301aadb901a525345d1a651a21c31a6"
- + "2ac9fb71738c3e215a8941ca9a3c4910679c5e774530c28788f6eddd7a31c024",
-
- // uint32 overflow in length
- // padding:30850100000031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20
- // a6ec113d682299550d7a6e0f345e25
- "1369c78f816a9baf027e255de0c258125be90f35b8daafee87f2ffef2d465e06"
- + "94af4401cc5cdc7ca78b08d5688ceefbddc02abc5495d47c6829d696f8370ea4"
- + "27e7e0225eaf22cda720bbb5881edd16b19bbf2ca86654c65b4ad481c13fb38a"
- + "f00d77922f46b311f936c51f4610f6bdb514b366aa05f029c1e63e3cfcf9763d",
- // padding:30363085010000000d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20
- // a6ec113d682299550d7a6e0f345e25
- "41d4c1ea43cb207af8bfc1552e31da7ca5744b68c4e00c3bf55f4edd4c81e91c"
- + "01f44fa05290dbaa1fdcdcc775f6032a049b4965345c16aac6994b06cda9e038"
- + "7dbff96cdb115e014f69bb057faca2f618c70a31edd0beaef7acdcc0fb7c83b2"
- + "f07a8b9de48aa04b7c973920af5b8dc20aac343251ddf4c2277985c3db1dac2f",
- // padding:303630120685010000000960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20
- // a6ec113d682299550d7a6e0f345e25
- "76bae6c330b9ab33aa9f2abe8559c51fb95f953a75e48053ab99078069214b50"
- + "9dd1b5080ac6819e32912619372d71a9ff1a67449dd699e5bc6ec0e18d1893df"
- + "b5bd571d933926d05b0d9fd7036ba4556e209369d1c57ec49cd9075e583c257c"
- + "6fd4899c2a8bbb157547812cc692f264bf54712c71ee090b974d99b4d1629696",
- // padding:303630120609608648016503040201058501000000000420532eaabd9574880dbf76b9b8cc00832c20
- // a6ec113d682299550d7a6e0f345e25
- "3480a5c22f092f259b5bc4fdb9a33c044c24a645b57d61920effde1dc0bbfe53"
- + "738023f16025841f9323b40f72c11091941bbdfaf7c2fbf77ad6626dbd6a3b7a"
- + "bb3ee916d96a922b11c86ce80ee67dec619bb98e9246d35a33b11b3a4e2a3a13"
- + "0e8b57ed4bcdd4b4e73aec3f9e3d50d3db5e29cffeb186846c72d09468d018ed",
- // padding:3036300d0609608648016503040201050004850100000020532eaabd9574880dbf76b9b8cc00832c20
- // a6ec113d682299550d7a6e0f345e25
- "5b3d3a198d4b36c6d9641db181fff59407a25bf1571f85e47bad1eaf13807987"
- + "2b93b9eb51aae09b48d6f4ef56badd96a6584277d8f3c6e4a4e11275f72021b5"
- + "0a1665ddaaa56a2a7caa7da6b4d502c5214e17042811154d411dd2197c250264"
- + "bb69ba43adf668d4f7b81d932afa55e378214bb19ddeb431f702a91dd11e23bb",
-
- // uint64 overflow in length
- // padding:3089010000000000000031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc
- // 00832c20a6ec113d682299550d7a6e0f345e25
- "1cc5577d04e34550e7f3d136064547efa30b9413e2c423b5a320eaaaf11cbebb"
- + "91e13bbe3874e4650e057a8e38c8a366c473f35e0de82b22f846721a09e3f279"
- + "ebdf54c8df395a9041333f09cb7bed5291bc1842857c4ce6ad5a1c2c476c1efd"
- + "dd5fe42824c25e0581aa7bb8f621d3b53566637c6266bb1bd0a5b7fb79c72616",
- // padding:303a308901000000000000000d060960864801650304020105000420532eaabd9574880dbf76b9b8cc
- // 00832c20a6ec113d682299550d7a6e0f345e25
- "6e56d1746105344b34fb8299d173f4a5032cbce3556ca9d1eee35f8b31818efc"
- + "121a1a9599c24fef8531243016dd6288d67b4bf9fdbf2c90fba5b1661be03531"
- + "b5e15385ea465d1376010f0af761e8fb1afff7823dcef8dc100d97c192e9a7d0"
- + "3c82321d83fd8ecf67207c65cf182e1104ec5669536070cf1e3fe73c5e27edeb",
- // padding:303a3016068901000000000000000960864801650304020105000420532eaabd9574880dbf76b9b8cc
- // 00832c20a6ec113d682299550d7a6e0f345e25
- "37a413f9202591b8860cd9d68515ab522ae800e9a71793b479f1fb74ab8c9b07"
- + "e72fe82dabe1189d028b813610e5e57c055af2d32837551fdb0cd93d7669a3c0"
- + "2a14c460f4c92136a4d11cfb7dcc76401bb5b699fbc64d302736d68c3591ecd5"
- + "9220107cd63f55c83edd38c4568e6f7749c0d9baebfb7c8ae1bf2179101745a9",
- // padding:303a3016060960864801650304020105890100000000000000000420532eaabd9574880dbf76b9b8cc
- // 00832c20a6ec113d682299550d7a6e0f345e25
- "9fa8aac224bb50697103d457e7fc870853b23670ee5b8c7395d68ed82b30db18"
- + "ae34a569abdcdf19238ffca8f5e435327dbe605bdc1a6dd3eaa3c2beb33f0064"
- + "2984a2034bf3b3e8de3ec7009e35069d5b27253c4aadcb4f163148e157252e3b"
- + "9334abb6cf0299161c12908529f52de9416ec6218af7a6963fcc987c5024ea71",
- // padding:303a300d060960864801650304020105000489010000000000000020532eaabd9574880dbf76b9b8cc
- // 00832c20a6ec113d682299550d7a6e0f345e25
- "0f50bc6b1b94aeb6805dee51c92860693de47c4925ab90b57a46e0485a9afeed"
- + "45083eade73bee684cd07048e632d1dd24aa2efc42c1f85e4fd7b7058dbeafb5"
- + "3a3d5b1cb1e7dded3352c3c92ded891839263a501afaa78fedfd04546c43d16f"
- + "7a52b800abc9ab1ef827ae0eb19d9b52def2435f1477a48dff61800b4db830e4",
-
- // length = 2**31 - 1
- // padding:30847fffffff300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "9dcc651cc0a1b4d406112c0d1ebd7a9fb5a2c9d9f9cffbeab2d2821e5ed01efa"
- + "9d191665794649bd1f588b729e8fba1eaa37a5a736a5863973c338a92b2665d6"
- + "ead13b72a19d2da778febb94b150e8d750340a3b856fca8b3b6e3cbfecb9c397"
- + "c23f46912ba546ab0f64ed88404ce317f8fb2278b68950e9712d6b11f5cdfcaa",
- // padding:303530847fffffff060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "0397d14205c2f52423ef69c874294dc2b37d5be5d5647f7e83f1dd6783cb41cc"
- + "e52e6de1dc8c9e93ca1ef887d4c0ea79cd8b26391d638bbd8080bce830bf1bd7"
- + "fb1de31346f28d609874fafd4a34fb7bee900441f55589ec3c5e190106d8816c"
- + "adfcfb445834739cafaaa3903ed93cedc41a76aa0ce18fb49a3a73b7b5928735",
- // padding:3035301106847fffffff60864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "2c3ffd881c1c0ce2e4c98282d6011179a89b1e84b17072bcbbb64164e5e05410"
- + "d0414a1fdbbc04564f3d80f3891f28c3f02e92bf97b4339b5bd4699614e236d4"
- + "223cef0688c44b297eb9c0e22246b4cb28983b102a446dc76671206c3b77af68"
- + "97f2f445512abda37bc9c37257dd4f1c6f0e6ec40929eb6b0058682b9d2f6c66",
- // padding:30353011060960864801650304020105847fffffff0420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "668bd06eafe953fca6a17b0da0f9006ceadb09ad904786b7530148df7eedc146"
- + "d20a5472c39677d65e59934c00227fb662b3474596e6072f56d2c00c3d31e66f"
- + "0da85f4670e75c3f2c910c0fec8c98bc31fb2eceff80350b78aec0d316e9bbb3"
- + "31544d8a3d0b1649291396c717e350bebba3d3c3a0b1d55f010879b8c7b7d4f9",
- // padding:3035300d0609608648016503040201050004847fffffff532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "87482257ae1d18d0357428b756ae35a48549536a3439ca3c148eee64f4c096d8"
- + "96219097d55c14a25eb1490779f6b1471aed238cc0d6aaf265c12ac086d04de9"
- + "b79a37518056dfacc12cb4916c17505fc7e2e6c1e0db720a286ea65bde4d3da1"
- + "d2dcb8d0276e8ce73f3f923209149955285c602572cfd24c82e8d96d45f569e6",
-
- // length = 2**32 - 1
- // padding:3084ffffffff300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "03aadd447f36952dfe73ae89e5c656b7d37ec92535e547cca62a7747f3831f2f"
- + "613c7dc094f3d5c4c6b9e02b21ed4626930ef3948b42ed41f4cf468d2474acad"
- + "f1c75599c5619e4872e6d3dfd93abe92234165135ed265e0c0f64fddf23e50c1"
- + "f9fdcede8778a8ca008ab00f8afa887da3f4699df9f1140953232f36d035b03f",
- // padding:30353084ffffffff060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "31afd9a0d827755352b16de04de42e98a8c72f08919ed475530a00c762b8a03b"
- + "de22634dd856a7eede4b4947d780cb3efe55775e16d7f46f209dbcb5569b2d94"
- + "69cc271aa850f74960f7c741928055925349821e32e1e0fe5a040010a39a4b6a"
- + "343f7f35c204106b3617e528a99dcaea8a93766adcfe7be31cdb98f7f7f14669",
- // padding:303530110684ffffffff60864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "16ac0aa2d727ef5fbf0305259ee6fa40827c92419f819673fd64cc2dc2dbfe7c"
- + "e1cfcf06e26d45f59cb3d9afd30d7a6265863fe856e0a0b1b9508b1e7a2dfb0f"
- + "87f5ebfc444bbdae504abde7daa33bffb991551940df682c8e2c45edef0563b3"
- + "4d4f11e1955e83c2145ee321165517d1532abd64dc613a280fc30670bba1f898",
- // padding:3035301106096086480165030402010584ffffffff0420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "0fe0c75dae62462e66e7277b03c9113727419f7d4db7b2a567c0c189fb6328e1"
- + "f73d5d44e2196b436f4c2f0f12950d419774c8a51c55f9b2217f904c4f03d5f5"
- + "754174719dfb85f62795ef75e6d54e703bf231fd8472250f529f85294f29f6c5"
- + "653ef585079c3b3d8f931da80a46c8afeef37696fb0e7986d413bb1996b8ad57",
- // padding:3035300d060960864801650304020105000484ffffffff532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "9ef993e6ccf015b0b0de75b51213a1c3efcaf66bf83655287484ef28d9848062"
- + "26a7af1704fa6a7fc02984b44449f83ae24761021e49ba6117505c1e609406b0"
- + "02215de27d696643c3354fb48e6c64e7300944edaeb96e4872275f75532f5aab"
- + "94358d4954522fc7903439e99223d8124e79a3f519050b6b576b77d5abe7c3e3",
-
- // length = 2**64 - 1
- // padding:3088ffffffffffffffff300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "97c602416f2131d34f2a57acecf26365a30c12f77e5beac095533848ce227302"
- + "092c6f44b47f011d6eb0a91f8024d1935d8bb274c42b57875115a94281fd3cb1"
- + "98f9334758d3200c1c721f6babef332c02a89968a7089f7783993bdd54f809f8"
- + "372437798d2364040c1faabfb00faabf28cd6ae4ffea29ae2c08a6a7e6074700",
- // padding:30393088ffffffffffffffff060960864801650304020105000420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "2a970dc291a1dc935cca6985dda703bcc1ece2e40817ce8fa79b6e8fe84e1136"
- + "86e6e65570d46bf22147bcbc389cb5f86f92dc185f556d15e7614cef119fcd73"
- + "05a31fd2f8710812f35f9f0bd8a1a6e5be3163de644370c67181b7575635dfb9"
- + "f717f78631d62db714b2a19cea7079ff13c8926ae0c601e4befb6541b02a7e20",
- // padding:303930150688ffffffffffffffff60864801650304020105000420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "6e16d110235cd11e32b114ca9dac0cd6a1b041a6d2c61941d49bb458241281f6"
- + "2a4e2b1bf3cebc3e67e8c062ec67a51a599a553b09732e23e1d09fb2b20be7fd"
- + "311a7122414d535651718a1421d4239276c227b96506729a09e3ff2779dd1c79"
- + "de4d402623039b826e2bb4d26d1b56775fce14ed0203a9ebd8f042d981705a77",
- // padding:3039301506096086480165030402010588ffffffffffffffff0420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "0716d252488e08f10a25cec94714e6105bd4e13ff019431190864cb0f4378d31"
- + "5f4bd0fdf186e1f2d45a6e97eb04fb2013273e178ce4f82a0b67bf9d021b1d8a"
- + "b73d753adf2073ee1ad6190b2163139db63778a3670b7cce23f45efb601bd596"
- + "44a431cbe534ecdf4c4c58ed02ed03863ee32d296b5736c010305fec655b1a44",
- // padding:3039300d060960864801650304020105000488ffffffffffffffff532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "03e52a2ed638bfb9184a0ee3698502af3a19bb959a984957de5101e6f7a62ccc"
- + "c2ec2a6293fa9d76fabf3ce7e4bf35c65a5f864bc003686a1e05b57c5af6ad58"
- + "8e05a5225479422d7b78c5bedddaec7f4b8c1e9ab7478c1ee253847324e02543"
- + "4b76a01b82a40123ab31ec9862c6016885dc6cbfe97801503369fd3688bdaaf8",
-
- // removing sequence
- // padding:
- "5df1c4a701c6fc1f2daf6f4538f29c3452667424c05edcbdaba4a1678c8b5bc0"
- + "e89656a0e48aef46642e0bb597813688904e9d74cbd377a3d9d2c965bd3ed06f"
- + "136f10367ea3eecf89a97508389448a31ae0e79ed3725d0c4e99a516daa41164"
- + "79bc53da5d7c2f26c7ec6310d4cb4174bb781405630a9b1c147b0e1da3a7faf9",
- // padding:30220420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25
- "3e43837b92ebe4df08586fced3dce46aeb2fdb6ec2bd0c58e823f6e6363b9b67"
- + "6786929d13ede60a8d8d0daaf71f0de8880ed0fdac8706eb2f324394145818b6"
- + "41d1049cc7552bc6273d86e901099c78297381faec5c518fb6de429700f3bbfe"
- + "f76cdecbb60088b9f2a77d75b8ff86f06cf23850e3183a267c0ea34f4f839015",
-
- // appending 0's to sequence
- // padding:3033300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e250000
- "26d20fecdcf0b7d6a0472754aecbe115c39d580ce9d78b67d1a6395aa6ce6689"
- + "bf6d0d96545341fbf04956a48c47f7d30bda017acb1d8e24ce596aacd3e05b1a"
- + "fa571d19f5316142557f765e4c5d080bc5336b79e2c02d8833d076ac9d7794ff"
- + "be85c66d0db97e1f5bd2ecb46afb15c19a8fe083fa593420e996a483c2a3a766",
- // padding:3033300f0609608648016503040201050000000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "1163082ba8d48352df7eab96a0067539faff24374a630aa4393461a0aac71660"
- + "6625d706699dfc22cf3aff89fcc278f83a0adac87aa0bf192dd86a97031515de"
- + "1933a23849478ebed20e4203abfb47345bc18f38da5d45e829997b10107c5369"
- + "99b2ce10b2781e1db03e10cc2bdbc2e0ff4c3db5d271ce83c1e7e267e7c1e107",
-
- // prepending 0's to sequence
- // padding:30330000300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "0ded592bef1fa809841e0d7365e66af12f4239be0928656e7c49a043b9f2b18b"
- + "9bd2dfe93a810c6e6c8ae6cb8a5c9d6e9d39a96a10b3bbdb92a7b8f575c2db48"
- + "41c1b628160f956f54e0c58d3b6fd4d640b0a06d39476daba7be04b63a75f38b"
- + "bf7517d9751d2b12d2dc00e44de7263275dce6b0c0af65d3c04878d6fc1be2ac",
- // padding:3033300f0000060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "95a42e5d9bd9ad5a8579444e8167bdecec16116a7900117b298c82d5560f1d16"
- + "e9fbe963764727fef9111f2465e66177b576bdb8c70a58e3df6ff69edd2d6827"
- + "c97d626b09c24cc49f223cd5d2db2916c54fd8f2ac7301723449b1823f2ff48c"
- + "56849f7d608312d4bb7a97f90ba218f99cb773fba0a34909618f5d25854d7687",
-
- // appending unused 0's
- // padding:3031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e250000
- "2344c598a8905b350f20de5cf0cee60253729a54be45b0b19acc109ac15862ef"
- + "ab2e7c96e92bc990ed6959a40d725c24c25c8d223a46f490905c1448d8dbf7c9"
- + "c427bc2e896bdce6d2c1daabdc93ce177f9525ac69d899bded12443338834a16"
- + "d885456057461740c5140cb9a89a017851f9e99e38c1727fe5ccad9a7a8709d6",
- // padding:3033300d0609608648016503040201050000000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "a08cbe4009080f73cef03116ea949d1dbacce7025f7f61040fb4e052754d5b2d"
- + "74c2dd06c0dfe1d09b97aa5739c809bec6d8cb27e852e9fef353bfa32964b994"
- + "95a6dc63d6ce77460ac280c74c0cabdef794f74930f7f8827af1c6690d22ec2d"
- + "f3af497837bbe900a890e3feeaca2c0d16b0017155390ff0396a35ecb62b5992",
- // padding:3033300f0609608648016503040201000005000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "500df36bd7d0b56642e2d5dab6e4ec0b148e7b8673cfab40e45c5dad5efc469b"
- + "3321ce027a3a7ff5689366a18a32267d161a1266491b055f11557c35bd0d4f43"
- + "df11b8a26f7b13c54be423b87b30b1dca956151c3ec3df03b30918a413179b0e"
- + "064bf434736b323408e3f1330743c8bdbbb9d466dc1e21710c12e2e3b638b172",
-
- // appending null value
- // padding:3033300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e250500
- "11a382fe570e0cfeb515955b70ec89a9353cda0c5a5d3cfa3e16e41340eccaa1"
- + "8ba21ad87c4a54a7131c4a7cf9afed68b1c1645568bab9b0fe7dfe0437abbe1f"
- + "b6cf06bb690f46aa2eca034093ded661c38954341f3f35abe484015150307eca"
- + "fd06d4309836771dfe29bfe56350d68725e0cd02b1479c6f99eeba2d59f40626",
- // padding:3033300f0609608648016503040201050005000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "110f3f188df46da58cdd46b5d460ba3d2f8d00d907289634d52a3ce693eb232c"
- + "d6db738c48c8aa22d923d4f81d55925b3d4ff29ad9869f97a244d37b860cbd46"
- + "46c6318c041729a7aaf473b61a93cccd62fe223d1be00364f03d722f43c7beff"
- + "98c3fde573e7e6a0ce7d4a2a4bcf279765e29769bd4f884ce41fb808ac3d541a",
- // padding:3033300f060b608648016503040201050005000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "470416ee76f0bbdbd2812b533813e4463b799f4036e6955f3e174f6287e3c73d"
- + "57c32875607e2eaf06d612cc85170ba5df31286edb645ae9ceb9e62064050f3e"
- + "7f6b36fe8fdae7a3bd89b6acc523c923b9d3f3e5f57d80c9100b39dde75caf46"
- + "adcae56668149ce0b80762bc459ac598241dd79c6b4fe0220ad53e3c591243fe",
- // padding:3033300f0609608648016503040201050205000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "100714ee0d38c541c2632e96885a7ce0afcb22f0cbd84c556f19d1b44bce75a8"
- + "fdf141e975dda1812b4465050d4615a51c3b9816606c7ac88d6b684df938e7a8"
- + "852835dcf5bf0ee45f2e413290691832095af77eef0e7a86f72167dbb03758e6"
- + "8561f7f06afc6e902ba19fad57e00cb43c0fb2a5ead689a146c79c9e6188bd85",
- // padding:3033300d060960864801650304020105000422532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e250500
- "44eaf5ded57ac5c25c17eb31c2e071400b46b9022641347b2edb0b14efbd4eac"
- + "5f71e4bfbe791e164c003667387e57ae22c6b00e69971d7245e381f6459e5f88"
- + "d9dc0fdb385b777fe99e5e4d79aec057e41a1e457fe2b91a5f4a8878d2eaa1c3"
- + "ad8393d281eca07ebd287364a19045029fa7ed0e62a21e5e42a88a52ea4abc8b",
-
- // including garbage
- // padding:303549803031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "236a815c2441d111d254172149ab2429cc4e6caf3335579bf438f22723de0a4a"
- + "5e532ed71f24c0fc6032c60aebb2b7e76cd0d14f262d1d9bba80a53dbdb12c9b"
- + "89902fc5f5511125d21b7df32e9b303c4b393fd6add6ac7536901ea8ae5785dc"
- + "fe90e85ad0c16146b1f15036c31d7758a364fb54cc1d183b8566bda592ba446c",
- // padding:303525003031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "762d30b302cd76b021e237f28017e48488ff3bb30ff9e92db5b1e76eec2ee91c"
- + "9af03e1c5038afc22591b1cd8cfae648a33ab77901f9f3736e50eea83f7c7a45"
- + "46dc55c0265fb17dfdd30250fa3881e34e51b4f2e54554ad098eee952ec888e9"
- + "11a0ea5df42c0560bcb4bdd718c88d834b534917e555c38fd1ec3593b2f25b39",
- // padding:30333031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e250004deadbeef
- "8cbf9d425abef67ff0a7fb648e70b82b1556ac80e46dcff37145b9041bee2bbb"
- + "fa56817e04994c9cf1123c6df2aeeb1637595eb1e20adef51d657943fd67826a"
- + "c5d5dfba106ae9cd243f12746917a446ce955034b46ceb0f4d542b7bcd06ad3e"
- + "6e10899d5338e6d8caf3d4de3cbf45d45a58d946a64d0bc13e97a4ab4e6b6016",
- // padding:303530114980300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "6477bd3337d601fe92e19e7f6b216f73eaca68aa408c5a570876ad8db6113505"
- + "43d1dd458b511e3095e57996ca589c00f2beb6b6fe4564f4373571d904958acd"
- + "1bcd33f57959a231bb126bb2b37bf1403d52836752198b6954567f07b31ed110"
- + "5dcc50004e4cd7e897516c536c205b339ff0d35463ca6871ea5dce7a8daed8d7",
- // padding:303530112500300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "975d07b7295268a8662aedbd2b65b5eb10bb496077f41b90d12d34ebc7e492f0"
- + "c7f3a41d4164a279f06ea616f91968628be4ceecd4a554477bc76cc6b2e6bda4"
- + "042dc253327c4b8fc40e9242cbc8b835114a7379a3081bae4b2803a99deb4a54"
- + "0f8c149ca5db3a61c7bc9f61cd7e55521660a06603849896c791a18d1c7360e1",
- // padding:3039300f300d060960864801650304020105000004deadbeef0420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "37352cd11eb5ff7380bfb7c0d3e8d9979ae7cb489a71c31a077d59496547b0c9"
- + "5a760387ed50eefde0b762222f05a6033740f6e010693edf3ef8ab5f9c57f4eb"
- + "1f6ccd83287dcc2e90857defe5ba4109bf79ad84ab069c85a25758d22536c688"
- + "2919245fa2d7e7921b3635d984deeb6555cabdfc46a42c75875d55924c8bac62",
- // padding:30353011260d4980060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "0c783603c7af53df27538b983fb7368e9f62d4552f008f2920a21cff3186d2ac"
- + "7de451fe8c28b71d38c657c41c79174c84004deffc69e69cebf2aba2a43ccbf0"
- + "52f6fbdc3c9d3683275913c4583dced686291bd1c0217a015d9ce732eb410c8b"
- + "27f2fa7c9ff516a81577490f5bffc8121c7ac674caa464956942786c5dca6b4d",
- // padding:30353011260d2500060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "1fb1960934683292a4c92cf3d582cd5fe68888a5b0f6c2e64538289da7f96a9e"
- + "fcc36bdbf1fdc0cc0b3b36c6af608309de58c6151112f3a78599ade4a718b359"
- + "547a4cac9a020e5e7e7117d1bfeb3ec21bfe9732825e624b27ddf8a946eb858b"
- + "30461706f769a54b0478e0753388951d98129383590186b80836608f7e06c72f",
- // padding:30393015260b06096086480165030402010004deadbeef05000420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "7e4f953b288c20fd5bec56a00745db9be03590efcb637e2ce2119a0a1846e9f3"
- + "8c0ebc5f2498ebde6217d81c9939b6d6a6f35ba54ee50d6313d3f2579751e7ae"
- + "8d31ef4b0e99ca2e96c80459a7e5ff51f6f31e9c965be19097de13017c90037a"
- + "a482d197c986f50bf2d5e1acb3f3024605e46d963410a4a623c898d0d773a78e",
- // padding:3035301106096086480165030402012504498005000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "03e121f5766771a65a400b354f78ca27c9a04a25d4ab80fcd6ee91bbca3baf27"
- + "752abe5cfb7959779644c064bdbaede14847fc035a3a19523d83cae3c31a64ef"
- + "7538805e398e196ed8ee9ef6b3f58f10e7e16c95495f82ba430e5d997d165564"
- + "44bb1447ebb17829ab879e61ac297ebfd4b94aa99b68b0b498d8e434d4fb3c6b",
- // padding:3035301106096086480165030402012504250005000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "90a5d10e2e19f7e016d5126a3d3eb91432611ebfd411b07a4be15aa48c39df33"
- + "f3a2855f1e150ad34c7f83973bd73eca6575dcbac4086aa0a38db3d6e6ee2e9f"
- + "419768493fb4829f1f6d67f80359f82d95483d6057de17fd388ae46687c429de"
- + "a4d9f7a286c95fb1b9df0f1ba40a4263307789952b1bd07cdcb3b5cef10d9d2e",
- // padding:303930150609608648016503040201250205000004deadbeef0420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "a88d38e8c765b7e439f42294e71c1689a318ed5414efdf474196989829d4989f"
- + "ce8910798f4d7873fb43d3a501fa15c8019813104e4699597246db66f96c838e"
- + "45aa3596a1d26cbe9f6ee91c077422953b402f7e11f8768a2f132295bff79a0d"
- + "10ab843cbcf2c921113992336638f4052446f52815328ba4946510a6b701d448",
- // padding:3035300d06096086480165030402010500242449800420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "34508ce63c502b3f8185f7cc61c724185aab2c1bac68cf2a7e7f4234edcc0e38"
- + "cd15f73e73d02431c62c28a2241f629382ac5e9329ab71dd7e9152b10bf86b55"
- + "0c855aade6a5941ffacafb4bfd57066bd6e39bd0d8ecf57ad9a6f3ba48831800"
- + "bd8e6e9773a0ba3770cfb9ae329bb4451f450ee35796b5578104b7ff5ae2dc31",
- // padding:3035300d06096086480165030402010500242425000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "7f642b5702c331dd76b7ff66578a2c0547d91c556b7b9751443d911729fb5ce8"
- + "426515ba068e2839cfdc956eb813c25d65a2d5213b59302c0ed5e6fb95c49002"
- + "edb1605f8f622912fdc309d92e6e3f188ba19e991fab0a7018ae4f6e70927d91"
- + "cffec51b2dcc8113908faa1173ec9ed72350aa93a8cadef8bfa7305bae22bdf9",
- // padding:3039300d0609608648016503040201050024220420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e250004deadbeef
- "0abb75f2fac084da0b99bc823c021c4872e23302a6a25e400b6f25d60f7c9038"
- + "99a69dc548676106b44f37c1e6d2604eb995a16880a2a8e2cc9e0ccb2b984ae4"
- + "82036f69a6ad31a2b5836e73e0d30c3e10f8b93c7587d7c0f2371183edc3b8cd"
- + "0fd7bc325b1cf75e1079f8d6df53fe495722cc1ce707cca49bc6f4ed2ca6c4f9",
-
- // including undefined tags
- // padding:3039aa00bb00cd003031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "9f2234b108a45abaed850e19d2f9576f59bb83dbc6165da61c4798638f9c9858"
- + "7c7eb92a8c901dc4430e4a47dc05681ae811ffcad6f7a604c43551cd0f5d1235"
- + "49435d622f7efec578301efd49dc6b139abbc3c7d6a26858f6d18f09b863a145"
- + "d6483c9efc6c322fec1341b6362dc1d752c714efcdfb09097a0ce6df7dbe88a9",
- // padding:3037aa02aabb3031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c
- // 20a6ec113d682299550d7a6e0f345e25
- "24ba137a293599ab7e50a0a4f8c7a5cd02dda6a4568c93f84d00ff4729656456"
- + "3c9051b334db2fd2c081b23d322d4870a61b2435d651d7efb4e1b0920e759f7f"
- + "d81a937bbc85ff43dbe2b702dec3acf4db68d5fd7b8a2f6d32cc49a7300dd659"
- + "623b391927a2442d69c6c3c29e59eb80b1d0a95bec6d18a6223cf4357eb7cc96",
- // padding:30393015aa00bb00cd00300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "04023dd35fa479f8156794d02935f8669c023c774b95c5a0e02837e32ccaf7a4"
- + "ba5195835a15de6a21796eb96bdaed868f9e8b7f0a5a21c1a3058f53aadb62d6"
- + "ee74cd70b2c38f17e42a1f7ffd88955731b4e15368211ad53f617aacbb54a7e7"
- + "078740ba6daaca81c1b321b748ea1d13f7aece490226636ecac41bdc275175d6",
- // padding:30373013aa02aabb300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c
- // 20a6ec113d682299550d7a6e0f345e25
- "253bed76e4b8465ebfffd1b7214ce586294d3bea290517ca2bfc417ba9d8e72d"
- + "286570c348dc6084fd379c2bf4dae424189964639533e17c409ae18e445210ed"
- + "4dc98de4ad7336554740d1532d5010a1bd7ebbc33ba48a3365d50669e4f4522d"
- + "0e5ff7a3bdb1c42c42dee647a8a3ce16633eb33bbc0a869e12cf99f9481dcf85",
- // padding:303930152611aa00bb00cd00060960864801650304020105000420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "0775598491297eb9004eed66234ded82e047ea2f06837425e6bd27f33b137366"
- + "7f3ff4961d60f85edede88ec2bba2680151da3763f0df9785b31771da7e64386"
- + "2ff9ba944ab54bb1356ee113e420002a873f1eb381660f3eb84b1d6b25ccb8b8"
- + "2ad12ad0a449c4de205144873329e80ae8a84d1d3c1660b3303cbef28b48a553",
- // padding:30373013260faa02aabb060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c
- // 20a6ec113d682299550d7a6e0f345e25
- "a73df043d06ae53a37773016a4e21d3f1093c50e079b189c4bd7db3e2e9875b1"
- + "4e5374cb8e7394a9f1b45c7e4e9dd516198bf5055b30ea4d205f39fddaab3da0"
- + "cec63524bdae2ae166a3874c59057d93855d6e6314fc5da8111ff58666a73c00"
- + "a105311859f27d2fb92f507531b9d681e219861e4f0b2b979c185af2690eb4f7",
- // padding:3039301506096086480165030402012508aa00bb00cd0005000420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "17e5a889b8139593e192f7af684c918f2751f157214863f88984ff3d8c9e381d"
- + "1bee5ee788fc82869f4c3d8483e3c17c873a850a7a5c85e4518cbd8531b331a3"
- + "08a0368a868bb7995ce0f8a7ac5ba53b88c31c958dfabb36ed461472505b5984"
- + "18185b864f381342c29dc80e55ca7c2095e7788e7e8d385d61de605f74e431b9",
- // padding:3037301306096086480165030402012506aa02aabb05000420532eaabd9574880dbf76b9b8cc00832c
- // 20a6ec113d682299550d7a6e0f345e25
- "a659f7c44e4589e9f6658b0b57e82e65d5ee9fbe2376894f558a7ca4b6e3c503"
- + "2f953d1dccfb9b76bbc53dd5d1a52cfc092c6ca279b37c0a43c99ec0553d7ef4"
- + "d9bf9361a1c4a3fb7496aa58c0af518312e18819fffdafd1a230a38440a6fbb0"
- + "e69babaa977b8b5fe08ed7c6d59c0391ccd80b42a0c0102264b0ed6af8524e9e",
- // padding:3039300d060960864801650304020105002428aa00bb00cd000420532eaabd9574880dbf76b9b8cc00
- // 832c20a6ec113d682299550d7a6e0f345e25
- "83fd4599a47bc0852ee1a12b2d97fceae6d8442fd089df1d21ecc252a4109824"
- + "10bbd2cc6bbca219502c2934ac593a09beefdeb54b0692b3e5724b79b0f5c535"
- + "41b62b0c4bf80a658af71d5964fc6a1fd7823370d00e24dcead4bdc86bcd883f"
- + "e3f48dc7f8468ce99b7580306007021b68b48ace274e3c09a1b5e21fc7542ef0",
- // padding:3037300d060960864801650304020105002426aa02aabb0420532eaabd9574880dbf76b9b8cc00832c
- // 20a6ec113d682299550d7a6e0f345e25
- "4bab6fc6948143f8ec7c8ad86a0c5cda5bd8151c24ca7916857778729c882581"
- + "603363fde0ae2a28b6f8f2c8ce8d5f6b6e731bf8ef735bd31318069544295b54"
- + "b04ff2abd1e11900373931164586d7c830bae704f7314eebf1d32b3a171274ed"
- + "456e335d2a0b998ac441053ef096a037bfa6e5cdf3835c45ede383f0ee8feeec",
-
- // changing tag value
- // padding:2e31300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "5770bbbb883f93f7c29bdab32e496f2e9063110fe648705fd0b1dc927052fc9a"
- + "ce9b36d898d19cd4f862b777b7c790d767b8313f735ff567c34cfb31f2964454"
- + "0645beea182cabdf789ff9ac3f68cc20444af0b9d4ec0bc8992945063fdb733c"
- + "ccef7590a10bdf491bc21c38f25ff65a581b40343e30529c3dbb71f62189ba3f",
- // padding:3231300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "359dfbf40d3c2383f58bef1d518abe9852ca80d797393e4e1a9380ef08aa851d"
- + "585213e8897c6f701ab680b0f63ccf5ea4216331918ca9a984fb6ba549f4bd06"
- + "6ec1fc4f1ed053fa5658b01df674a21322ba7e21fba6cbb3a8eb5565fb7bc269"
- + "f99c65981efa650dde613ccd6d3927cdae45922d94dcf7ca5188bf5acf84035f",
- // padding:ff31300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "24a61067121e9b4363b816b7c5750584c23f3c3200ca929fdedbe95d7504c56e"
- + "a7dffd762074e44e96e22147943f2b704003967270b2be1bd1baadc3861c4cae"
- + "91bd41530c67220349db4481d324d9927d52fe85618ddab2598996c5813f3299"
- + "e1afb020b24003fa94f94a0c6c02b3183295e0de79eda021dccc5539cd7874ce",
- // padding:30312e0d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "11b8d1dc2fa2afbc32f048d7454ba032b432a2ecd438506aa72c697a5c118e9e"
- + "231a0c6b6340b5564402b7e837c59dd36f726fd626621b8f543964198484087e"
- + "ded70e7bb1dd63df2cea33198b9d02dd28e3b8bd006ba991a8b3bf06ac928bef"
- + "45cba2362f2e11a5fbfb0310e84e8b7ba1e17c315adc1f34519134c36689619d",
- // padding:3031320d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "8748f029d5294dc917cf4fb347e0046f903c088fd976ca97b1322738549df7c5"
- + "6cd67349d66596338fe418b29de9e8af8872fcdbb55e1a6f74e9965fe7a365b8"
- + "46b667d0ae50df23083be73cceb59db545a3e1a560f6ce0e9eaee57b5f95b848"
- + "7a3987c00f364d0f148ead6d7e6a37b05456b913b7a79c0547b80da2a2893881",
- // padding:3031ff0d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "2bfc087003f3b98f0c8c5273de34f5e4d5047e909cd80e222072f6a7926ced5a"
- + "e169131342640f2be11bde2f7565c3c63d0335614dd278915514de8421f4521f"
- + "0138109a5c9778f86647b8a42815b6b861f173f5a6df893873f99c5e62bc3c08"
- + "6150e3b7d7abb943ecbe5806068abc433e9052d9bdfa19a58d19da463dbf3b23",
- // padding:3031300d040960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "0fe03eea6c50ab664bebc7d64346762aa29b08b61f2877973cd543c9533c9d04"
- + "51db8d836eb46e8d64283306efd7ef6387cdc3c794f7474f2e7d51b9df078095"
- + "adc85fb810cae52434c9cee5048fbff72610778397fd83204f44bb87f7637373"
- + "d111dd16e18287bd9ffe816683bc3663f586082fe0811ff6a06c0264b67f7716",
- // padding:3031300d080960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "748b9e64195314003ca31f726bb3d3294abd8eb376365acc5b1cd36934bbe1a9"
- + "bae99ceb7c1a40c910bca6007ced7961ecc9ac74c7a6424cc87b6b9610320ab9"
- + "c5b527d986c6e8ed21e677bbe2ee7752e2dbcfceecc2dd6da3f6c6b9c81435e9"
- + "e060dcd67ba834729761dfc9570b79bb1b8ead7bc1325c2233e445eeed12dcad",
- // padding:3031300dff0960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "7379bc96dd40d37a7f8e58f87c10fb94f250a964a55b2abead479b368e60e442"
- + "e6eb864952308eb45eef1d318b6a5ffce634fcb886dbfa062060b9809cf89a09"
- + "a26fd334ca22a1917fd219900ec0c68164c308cb9cbca3fb2b89ed8637c5540f"
- + "7a5886ab1e52c503e20edd6316e41c746e53917e107ef5308590800ad378ac97",
- // padding:3031300d060960864801650304020103000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "4a2478918565be6b46fe61e5f66cd1befb7a3026b5a1502e9a42636b0b924a02"
- + "e85d7ffdfd8671b1d6d3e604e3ac6a5302db4e0ae0975d0661efa018d6ba0c63"
- + "2a6381368dcb75926542c74823a8c6d8732619764d5a61062fb3b17ae243bd69"
- + "1c97c8f9821af9526abcb522ec8e9dca32de1989e576e336af9dddc3e766541b",
- // padding:3031300d060960864801650304020107000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "5ec392c91cc165ae59013337e7f7d5f2f9b3a6d45b6f6beee6dbf93e7b960790"
- + "0f4672555a57de6e9e1aee1fc9b7adfc0dc00e122e84b0233c0d615dd0d79764"
- + "fdc9d1b0e541f2de0083ab479f313a07f55f51390d1c2274858b219b1ec0601b"
- + "82a2f7648ae95ec17099067a173e3e83959b6c06f149af0e4610761aab5be1a5",
- // padding:3031300d0609608648016503040201ff000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "6173aef07a7057c3e97f6b7d4d7266918876f9fad86000b4c8ec7f83ee491563"
- + "115b0cb5d580df8c97feb0d95866eabb79147926f5395c5189554749f4a2c75c"
- + "0d96325971635be029062e1f27536c5041bb42f42e1fa10e21bb8e9a2e2502f2"
- + "a7299dfe3bd8720ecb8a57238056ab0eb546de8dc0e56b317c73ab1e19772596",
- // padding:3031300d060960864801650304020105000220532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "3b80c72f3b7ada8b38b30527bca41180b4a89b066f44a17b9df5963dca46517d"
- + "9160326afee7a34b650b9e7746e764958ce6a0a6268481a8df40e0a95a81ab0f"
- + "0bd20c050becfc0c4b03ebda19749a4a1dd3ce925fafd9a4006a835eedf221a6"
- + "ceab6aac6bc74f743fe171ef8c01935f8901e1ec9ff6e33ae8311851fa14a65e",
- // padding:3031300d060960864801650304020105000620532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "4b0eaf3ae1c7a3322dcfabee0569aaafba51e0f34fa6afc325bacc853ccd2daa"
- + "3dca56c918325bf553af02ddd19fb597c368dd18892d52d9e935dc51d38347eb"
- + "ae2a7f90c78504355f6899ab4452d5f51d2025381d81042a08582dc50bc10782"
- + "46ee69652043bb747969a7450659e333193990f34a8ce3f036221193e700489c",
- // padding:3031300d06096086480165030402010500ff20532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "1fe7b390bcbd5bc1904e676111653e14e581e7817b45294bb790e4e62f3010aa"
- + "aa77e246b29729f2b7da65a2f437b8d9c4fe3b26baad367a19fd7b1758d04c2f"
- + "788c45e5309a833522b46d7255dd5ef70ed006ef966aa7c648bd0b893b8e1566"
- + "961c16e9554fb729ec81819f1b3da890d413a153f487c030c7581da9531bf134",
-
- // dropping value of sequence
- // padding:3000
- "317379f37cb7f21fd03259a27db3575d491a248df82e67b39d4956a1c619094f"
- + "cde001544f0fa70c64dc0d0440fb21d2860a20a911cbb397792bf3eafa5cc050"
- + "e78b1e7bb29d041cfa0287bdf54a90a7a8bff5c870e898fe34bb522477daf8e0"
- + "03bc22891b789ff215869cceb92610c4b03210d19506058d941e6fce7a3cd786",
- // padding:302430000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25
- "2de802ddacb7e47e27875943d5098419bca3b170bf74f1c4b4a8ac420d4469d9"
- + "aea97592fbeaaa1dcb5fd20bb97afc5f7abae17a9bb85c5490db97010c5217c8"
- + "8f9f52b5e209cf5fba5f0594f4e4450114dd0348ece336870a1333f7660caf95"
- + "9056ba13b77d35239eea164ddbc8808f8e7e1beb070f551b6e95f90d5bdbd925",
-
- // using composition
- // padding:303530013030300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "09342a8fb8402b5e50fbf8c5d1cae415ce02c0a803adfed88188982129e84809"
- + "18dc21616bb5f8381e8dfe13f63234090c32e542a005df70df5e8e00dd2a478d"
- + "10fff1b61efbdcf0e410236f7c031c9a5f7cd0db9098f8a32a6a49f408e72c4a"
- + "29b7d27e8041ba605bf089bbdb9777e19b31ecca0d49b90d54701721af79cf3a",
- // padding:30353011300106300c0960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "3ef90c414a64601c538c286f2c35f32445039799b8c266eed605027578edda79"
- + "6a409d905a751bf5c1cdea97840437fa82733d8f27efbbc05da732887078a8f5"
- + "47bbfb54607a54f893df7dde0c35c45f9c2402bed0405c72e98175e5b9d6f902"
- + "24e07d12e8c1bbad2fc8b1a14c42dd5fb7e554db5edae89d335705c672cd7b55",
- // padding:30353011260d0601600608864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "3ad3e4ec3636b5eb8aac2161c04d228491ca0d9da2abd69d8904054373940b39"
- + "b5c025c011c9b9508a25ec25b24a0837cdd6a27cb5c8ba3683d90ba5912ede9a"
- + "21f2f7e851dc49dfebea8807576be703a6a87ca44c370db76812b9929a54fb8e"
- + "2259453ccaf47da1b8ddc5b7322c20197604b9e028ec00bd7eb48012274d5b81",
- // padding:3035300d060960864801650304020105002424040153041f2eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "778d93be708d56defbb6dedcfec2a917a3772b2810e26143db1f9d0f26c4fbb8"
- + "de8db5818aa32ebb2cdcd7960e593ace2c3c3eb682c930cbffcfa6b34438ee2a"
- + "786a9707d5d10902f7f4d8fc677106275fcb6cb08f56f341e0f52af590e0bdfa"
- + "2f2bf95693265e87f5046bcf3e6de34810e8eaa479f3afa2b0a98b175007c209",
-
- // truncate sequence
- // padding:3030300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e
- "a3e0e0cb9f7cdf8a2b95139f7c475f274bb63252385f62e66f82158f429e74d8"
- + "3df9ab1040717d34b6a5e009b6ac95960826ee83bb298ecf900425ff03a8f156"
- + "053b57eac6086d61dd3a8085b84c83bebbe3270164e3147ddee8966a02679640"
- + "1fa48da70f5d949386eccad26b0016543f3f90c8ac2874100dce13f03845509c",
- // padding:30300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d6822
- // 99550d7a6e0f345e25
- "84345c9d3de7b5da2156d3669a731c4baf6726c4c231bc8bcaef950d7ac37ca8"
- + "d86e9c9558404f313de3fdf09024d25491b0a933cc3958033210b1c4f90070dd"
- + "d083005873762566ff2cd7f6915b4cb430f5e7e1bca8c2ec32b4ddee48aba667"
- + "f9d614a27c3bb40c6cb7f0cd77d3d17257f197974d1871cc09c9583cc6af8e15",
- // padding:3030300c0609608648016503040201050420532eaabd9574880dbf76b9b8cc00832c20a6ec113d6822
- // 99550d7a6e0f345e25
- "227aaebca262d2189c479ab46d8715a34100bc1975c2d3991a4ade27376f0687"
- + "56cc9d89e903713bc28394d202d81b32126d7eb09154261841227cba6ea0a60d"
- + "0ed9302f816fb4dd241dcd2d746d5c1b068c42c0b2bd567ef799cbfd0a83e8a3"
- + "0c4fa2f7296dceca38c36ab597ba992f658ef7955d32d38847870afbca35d836",
- // padding:3030300c0960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d6822
- // 99550d7a6e0f345e25
- "a4316d438c7091b3bd5ec09aeea9095cb5046d8f08642b087c34985c34377bda"
- + "fe74285d00862fba20572ce7a06dfe62b4fc08704d1cfb161cd88478e7e1c545"
- + "1e0bdcce0fdd83c0e37fba5168ae03fcf4ccf60fa12c9b0acb39fe99b06933b9"
- + "e0774f41151e0564ef805144c0cb76101672c287912197155d91bf036e84d1ce",
-
- // prepend empty sequence
- // padding:30333000300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "361f80a57ddb48796e50b3e6467cb00a9e1e193330ecd2cd6a31f649b49eac27"
- + "e295450efe03e09e59f1829cc661d36b0fe904602c644aad7ec8cb2ca3099078"
- + "b6d4f7b9233dc159fd1a6189451fedbd176e436f6605f2b889fc7197ebb520ac"
- + "cd7f90e543da44453c7ba1948e83e31f5907d1989d982acbb348ca2216fe050d",
- // padding:3033300f3000060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "674c01596bf71fccd36aa81b000be007f6cff713e5f6ffe58b25e790f9a1f654"
- + "2ba3f68e1eeaf1bb1ac6c3d55aeaf08140f6cc3d0474f6bd87ee442568346553"
- + "ceb34efb5301a4d3a5b3f28a5fb038ccfe8444524d18adfa042aa1685fc3a5f9"
- + "005da5688853b8660ba74f0e32c5be38c743b0048ca9b9fc19a35a5ff4e2c48f",
-
- // append empty sequence
- // padding:3033300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e253000
- "07ba2b5d519b1f60dc455d6ad90b4135cb45c5da5a2a2c9b8cb954165394a0f4"
- + "0145ebf2b1a3ff1d47f5031d542d25041fe9b6d78aab623c40eedcd846761816"
- + "8ad02af8a696573c5c63cae0b2c26583b0240848d663fdd0195322bc2c8dbf9b"
- + "5db2ff9cc3e75e70480e51da0d6dd402fa87772ddef5256467205cf41a42d18a",
- // padding:3033300f0609608648016503040201050030000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "9fd302307455d4e946c1ccee65b0941c3550c823279cc52c4f29ecff72a12ac4"
- + "0ef6b7e37b7dd774b7735bbae89b0792908bafc47f0b0a11637042fc8541b346"
- + "151bdadc3990e64b6d1807dd0e7f9266ceb3f686a9813341f835562d3c8c8486"
- + "8a1f98db97d3e695ce4a25fce80b828d010d6323120362ac48700abff8a7116e",
-
- // sequence of sequence
- // padding:30333031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "247aa1cb69ccb72795c93809d7c3a5e52de98ec5285196058a6ab18ec2f5d9fe"
- + "f5545ab5df923f63bd58f5f247b3d824bf161bcb56d325d4e2fc7eb3765dd81b"
- + "5580422abf2a3bca8d8af94cf6a9a3133b1494f66d5cbe938d30b9308b5ce2cc"
- + "6d3df37d3299b6a7616d40afcc7935d80225e1a89a7a63ebff13a66e21280a6a",
- // padding:3033300f300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "6d6248f823020a9604bbafe5acc103d9bd020624585c95805533de22afa3b6b1"
- + "b511f8805296ee4d3e96d707c91e55df8959464ddb6d6a3d62b1cb248754302b"
- + "2833406300f4975d913f1b90f95e3673e2c57d6181d73a360e8c818b8a9dd1e7"
- + "a4fdcd68683f11dd47c2d395f20b0ce9c59eede6ae6aa58a707c4ea8d1a73a9a",
-
- // truncated sequence
- // padding:300f300d06096086480165030402010500
- "941d41c39aa8bf3879d16cb78c5486589e7b97e56a0249c4f613060d26b78659"
- + "8fd2d34bc4e99cc8888137975937307d6a328059a09f3b994bf955c7de4a2841"
- + "a0d10bbbebb2db3b332656f258c66c8d50cf9155ba94e1cb21a78e6147af7695"
- + "8ddd997665b6d8f67ea8f5e1fdbebd7df635f20494489c895d33ae4c7f248bad",
-
- // repeat element in sequence
- // padding:3053300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e250420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25
- "a32afeafa2c3b58bef55776ef6daaac6647485dde100d968e0449d1a2d5a1218"
- + "07ca2fdd70e2e9cf524cae4f263e11837000df85f0886b718ff45cd316c8d031"
- + "b746dabfb956dd6118a37e0dabcda1ce9c728afd9a5f2448f5b15d2798221888"
- + "8d457752485119f53219315bf63141c9c0802327226a096403ece022cb27c0df",
-
- // removing oid
- // padding:3026300205000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25
- "6098a732419cd71887548ccf4fbf3edeaf9fe7b220bd747ae1b995b746de1f4d"
- + "7b48c73ddb71903f50ccf7c93be9c8219de5a75ecc302ab50356069dfaf642f3"
- + "2ec580a283519fbcf04784860b0660174dfb7e1e527bb320960bde8f6c605bc3"
- + "c1055b878d2adbb44e1b6c41add15cb603345c4fe2d1c0158fa03f21b4c015e0",
-
- // appending 0's to oid
- // padding:3033300f060b608648016503040201000005000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "2f08cdca4d621007acd15b1f4e3c39882a8aef706878e8f101e7fb250798a352"
- + "8dcbf4d3327ceb0754a2ca0850794094dde8a875cb947d624d386ddb9593259c"
- + "53ef2311260ac3c9cd1277050ec98d105188f590f198ba908ddcf3f9ed18f5a9"
- + "6cc6b353fadde007658f87ff4c201db7621d69c8278305f3e9f2041a2dddfad0",
-
- // prepending 0's to oid
- // padding:3033300f060b000060864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "10078ea73abb9bbb879c9d8139b1758170fb73b34f39cdc83e6a725439e315a5"
- + "cba4421fe15e8c80d8fda0a9aba9a12c23aab41f7328d4191e6c7c3a53a505ab"
- + "518dce078439347945671ab06a2cd5375457b3bf181c40a1a4be1ea8305c9a40"
- + "1488532c7cdc1150fb9c46a2e846ce4a2fd9ee863d0b0b8af7f10360acc47f10",
-
- // dropping value of oid
- // padding:30283004060005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e
- // 25
- "69a74665f61787b54b522937c534e95e91917f5dd4fa9e3472add6e21dc033a2"
- + "75408f35c71ff6cc029e25986fe6dced8ed053a9040aac32fc444e9252d2bd40"
- + "81fe3e51ace15a0f694c0b8953dd6afa7f8cac67f4d8e17513b415c14b439a63"
- + "4274893885907e2ea428a6e242154a58a031fedae31c73df7cd4e2f5591496cb",
-
- // modify first byte of oid
- // padding:3031300d060961864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "8f3b544724810d462cc9b19f356e61efe7c192dd63511a9f1f63286ca81f8947"
- + "7c2b464f8e51a97ee138dcf8c6709d79a78591081384af7cb5e182c9867b8260"
- + "13e6191efddddcc39909d3ffbb18944503b69d774c959831a8092f4790a49335"
- + "21100c3e9741c3b58e1d24b75425ee28fde4e40c249b4dccd726cb06cb9ad2e3",
-
- // modify last byte of oid
- // padding:3031300d060960864801650304020005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "3933d6937e977caac37a07a5c4ae503565af57e6c4e830004147f8bbf6784f79"
- + "666d89cb4cac60e3f0aff2d5ed6a182921e490c958bfa49c86fcf0270914c102"
- + "275b0878f01795c7a2f44a8a6f5306aa67a81f9294089876801503989e749d15"
- + "2c3e34906291f1f54bb6232fdd3d51e807f70927bf38ef70bd2ba45f0323acf2",
-
- // truncate oid
- // padding:3030300c0608608648016503040205000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d6822
- // 99550d7a6e0f345e25
- "7b2f6581fb0b4f913ed38c0ea20dff2bd60723f2bc3f1022ceb946e48adb75b1"
- + "e0be031dd8b706d82967f93c6b6ba496d8c4b49aea9970e139b18fefdce30a4e"
- + "c04f77625eaca4c7d1265cebbbcf53b63a113cf06bc50e4a416a771cd28785a0"
- + "075631a3ef60c9212e224aaa063e7d8109c27e248e6422b26acd02ec012b7bf3",
- // padding:3030300c0608864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d6822
- // 99550d7a6e0f345e25
- "4dc9e86e076a395b530868d9fec9f858bd6e8c10cc1e32cae7653abb3f23991c"
- + "677e970ee468c7f35022f3241f5d35673a8cf4ce9134b1e63a994dc7abc8cf4b"
- + "9dbbb126b314312539931a0163c911f0234f5c3f683c9376f2ecaa3294d71a12"
- + "74f6c63b84ea8faf826eacb05e4fa5459b787ff384b2cfe0f1f4c755f32b5c50",
-
- // wrong oid
- // padding:302d300906052b0e03021a05000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d
- // 7a6e0f345e25
- "8bbc9167821885a728260bf9831120ecc42c14b2b07854169c86421146367d1b"
- + "ec66d8c3daadd115f16a29754e7fa8fb70a63966f7838484615d4364311b6c3f"
- + "6e73ecd8ced0adb52db2c374297119f5fe571bd5396529d13b7225e87db5b5b0"
- + "df38e4c56f2349071b09ff5c1ded919b398d4aff38c6ae29af6f6ff99d3e8836",
-
- // longer oid
- // padding:3032300e060a6086480165030402010105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d
- // 682299550d7a6e0f345e25
- "2054d402bf6a148b52972b830c8c8a16a6aeddbcd5c2ae3fd83de67c666e712f"
- + "a98650308658837a67ab87b2c444bedc7cf995c19af433da9343f260049b1bcb"
- + "436ebe27d8a502728dfb0daac5d2710e2c39fa000b909aede07ad7a0d27629e0"
- + "ac27ed9fcd41a39e09f7acdec4c2df77f38c535f46e3b96f2772a81e65e74bb8",
-
- // oid with modified node
- // padding:3031300d060960864801650304021105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "3a94d241563a2ad97574ec82baefccd9dd114e21fa9169d0f54c4d0f57826224"
- + "804ddc9b29c1905c59f39bd6aa3366705a85f5e6e18c0eb0f67986b5265e7371"
- + "865b618e90e5c5313f0b6fce2343aa12d4ed44d6770fa08d4f1342608a4fb627"
- + "a273f3a1f1340d1f5c55957ce51048e3690a845851009cbfe38d3c96e96d4172",
- // padding:30353011060d6086480165030402888080800105000420532eaabd9574880dbf76b9b8cc00832c20a6
- // ec113d682299550d7a6e0f345e25
- "079cb62831dbeb40a638402865cc92cb49913dae214babc3f4f8d69d64cf1436"
- + "2c23c8dd6ebcee9c44633dd54a62bb2f0042c20033728fc2f8ff482cf0be3ee1"
- + "03bacf757b50319495d9a838844ea1064f4bd1f1ebdc1b71a318c3c8f7d76ebd"
- + "79ef2f3991d4d87e110d60e5fc655adfa4a8e792e46c1c7aa96156b884e2f7a9",
-
- // large integer in oid
- // padding:303a3016061260864801650304028280808080808080800105000420532eaabd9574880dbf76b9b8cc
- // 00832c20a6ec113d682299550d7a6e0f345e25
- "2c9083459ba6504dc10e0e63edf8ede8bdb4a9728673306908ad4e8f25656d48"
- + "65f0748b9fd2cf7b51db0a2c659e0ce021fef3d2d3d0cf7c45343729c2001a19"
- + "d37e29398a9a7e92d7f62693252261f1f7406b54af5447db6e846f981722059b"
- + "7bb09ba95268c321c156ff659e0ce8e709d2819d5ce15f5dcfa54c55114a611a",
-
- // oid with invalid node
- // padding:3032300e060a608648016503040201e005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d
- // 682299550d7a6e0f345e25
- "9a76669c75f0f11399699f76e7bfbefc0d29feb5a8d86de1f751eedbb5c9e7b8"
- + "1ecbc224534db67cfe1b611951a6ff499d86e11cac4a1725e2ff707085a81a76"
- + "c73d5b53d1b0b2c4fab2d2eebe57eca83242a261cfca768abcd8e1f42e3841d6"
- + "98bef3d4f16ac2dfab0fd42ef0abb0463474367dff7ec99d665a9838f2cfc24c",
- // padding:3032300e060a6080864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d
- // 682299550d7a6e0f345e25
- "6674ec2352f0d3e90f4b72086f39815db11b056babc57644c8a703014f439baa"
- + "46e8ed961714d5c7b5f0ec97ba3fe5ab867c16b7e1de089868dcb195fc20cc42"
- + "fa1b3d3060f50cca77281bb6be18d65a1ee8e5a381e21e7f02e819752b71327a"
- + "28719c7284f6425bc9241abb08d000faf58d48848d7f4b8d68b28266e663f36b",
-
- // appending 0's to null
- // padding:3033300f0609608648016503040201050200000420532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "8d18a5e0a81522b56eb9e4f43bee15475cdfc7881006150cc230e76028283375"
- + "a13425fe5a106f2626346a65817010a5510b157b234a16fcb9426909a524a288"
- + "161537be91ab13033ed296f5f8c1e5c3bdb963f12d7b5eded46106f7c2dc1ae9"
- + "c451415303cb7e6a3f59809b922183b9638197909d5730e5b1e89705fbbe8464",
-
- // appending 0's to digest
- // padding:3033300d060960864801650304020105000422532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e250000
- "51640e26e8764936a7d9d709b3e0f52a5f1843453f2c6107a8e7fd6dad8b1c02"
- + "ecc71659cd4134be952c03ee83c190bea4ea7260e5472c3cdf87b6ad45b5c974"
- + "957ee9b4bf6f30152c2d939f722cff32e5482db96f3e283532b96716d3624daf"
- + "16767e0ecdad16c97e56e4e076d64b92af329d2d6a2f8d14b59d1b84853659ab",
-
- // prepending 0's to digest
- // padding:3033300d0609608648016503040201050004220000532eaabd9574880dbf76b9b8cc00832c20a6ec11
- // 3d682299550d7a6e0f345e25
- "9080bd4ac03b7ecedd45f8165360d4848bdfe1c9212ee1a4debc1aa92886cd79"
- + "47a2df5435789bbb0b3e8f78815aac80e2cff14e1939e9ec32f42e7c29ed4029"
- + "c88cafb64e8523dc85217c40d1bba900468a69c5bd4d12ac67401698fbffaa51"
- + "59907ad459d3843e12487b3b2315c585881bc42e45543f7cf25110ab7e0a19f4",
-
- // dropping value of digest
- // padding:3011300d060960864801650304020105000400
- "5f66f645307346216d3ba9c3d8b29e96270cb3b2e686a676fe975c10b8c26fda"
- + "8d8eb172628bb3dcd726160c13ab8c5afb1d6ae943ea4c18d00465d97c0d2bcc"
- + "27a63c18457ff8d6e3f5ba373b4be7b6f4c610f83578613f4fe41a40d86230af"
- + "ce0bb8d4496425a5bf0a80c6b1b1e2a981cd44c31a9aa603748c3d2fd2b85478",
-
- // modify first byte of digest
- // padding:3031300d060960864801650304020105000420522eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "8ccff4ab4fd8534b6b50593f775bf6684391225adc37745e7ff25a4c4baff78a"
- + "252aa1177ea3f3f09d2791da50ba19cef40ab8915379f128bba3271069cc2c02"
- + "725e09f0b2cdfa0d313eba3f5a7e231588fd617b7d90b285e88a944d7d0a7fe9"
- + "cc558dfe8103391ab2e6fbf762d829a55ed4486b5d888957078ffcf49e8ec352",
-
- // modify last byte of digest
- // padding:3031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e24
- "694b90d259b8dbe290f5851ede2ebf3bb718c1674ab1d3b7b6418e8ef7ea0760"
- + "bf3ce69d98a7a3baae5aee488cddfb877972fa88ad05996879d0ce15aca53591"
- + "423bf1b1b3ff02f823cdbb26bb80e3f7b83c3b7ac01ad7806335f871cd7b7e9e"
- + "64708c200a9cd092589131aeb7db15655174000cf7db782bd54325ea956a1a15",
-
- // truncate digest
- // padding:3030300d06096086480165030402010500041f532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e
- "888cd9bdece5ceeef0fea92727ef1a1d996960f3f551bf108682f81035903236"
- + "69ba1ab48becd14a49b87a900434d0ca7670d094b08b2f851834757bef580d2d"
- + "3278d85b88036ea90d4c2a673dfafeb0c3701332c2b77493110d9b28dade7e98"
- + "5ec27240c90498372fc00ac8e0e5547e4d59cdd19022b8d961f3b63630b5448d",
- // padding:3030300d06096086480165030402010500041f2eaabd9574880dbf76b9b8cc00832c20a6ec113d6822
- // 99550d7a6e0f345e25
- "762c745262627d0df634d6cce41fb8af3cb855fc2d974b8093b035e9d11e510b"
- + "9b7e7d61581b8f262fc1c4b8a6da3f6d609512e32f16416c7449c623c1773417"
- + "032ddf2a559d7eb3af129fd02f83b5e35f5b5c065b1e0bc6481f38b6361f0b01"
- + "8b5e7166e8e67dddcf1550222f125efde241a27b0e7f670d15346dde082a8c4e",
-
- // wrong hash in padding
- // padding:3030300c06082a864886f70d020505000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d6822
- // 99550d7a6e0f345e25
- "27830ed405bc9d34009ec6258b766100273b4dcf2a9b3cf6ae31029837c6e24c"
- + "f6e819734c1fd10c2c23db34d227d98d3498850f083ecd78b648baccfd4647a5"
- + "72607dedbc2b8ab7a595c0594ece904380e7f395ba4840a81367e99275cde106"
- + "4fc6f7fbd564c5f26ddd0103991ae8262eaf16623685b43f77ea7a05d080166a",
- // padding:3031300d060960864801650304020205000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "4cdfa8cd615bcdefa253d75212e4ed0a1fd60841656c6a749690cb0c6c3cd723"
- + "b518560c3b11a734010acf6e38f0526338351d9b58351826b360c851d3c86429"
- + "f38eb689e8555aa2a23157e197faebdd29bc49f84c10dacca655cd5fa50fdec8"
- + "6a72f0ff1c7f8feeec31fee188fbfa72776a7b5cdae1c1506830bd3a00181b13",
- // padding:3031300d060960864801650304020305000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d68
- // 2299550d7a6e0f345e25
- "024746d8dd71ecfe33cf0ad7ab8ddab9dfeb5740ec47b8ddd668f07b8f7610f7"
- + "26692404ac14c3a1947ff4246fe0a9e216131489125e71df68d60930fac06a20"
- + "e948a3e4948aff5e3f9772155f8bd6772b1cefd8180ae719afc061e2f0d68a69"
- + "769930b8d90ca4ecd6c7b20d04f0cc939502e698ad1c500403763c0205f6870d",
-
- // wrong hash in signature
- // padding:3020300c06082a864886f70d0205050004100cbc6611f5540bd0809a388dc95a615b
- "3a152ced8b5e0efa33cd57d4afe67f31ed3b9fb22e7b0ff32795cd9510374fa0"
- + "9fc63a3366465f83ba4d44e36418a5c1d171b6ca05d8c74a242983d5e5912cd0"
- + "5bdbd75fcfd5b4eda7cadab21e6dcefca8e2ab7303871ef360beff45564a01bd"
- + "c887d9e849e407c6aa5b12055647f6c9df49758d1272f7cb476f51088e21f246",
- // padding:3021300906052b0e03021a05000414640ab2bae07bedc4c163f679a746f7ab7fb5d1fa
- "3765b8800e6ccf29544d834034e39f8fe7a2e6dfd7e6b4a8f81df091bbfd7aa1"
- + "7edfa6005024fe04d35c340a2215fd3f1cf4b4dfdd3c8ad09e6df2c2256c7541"
- + "e19c2e80051d1ef5df5c384bfb6be88c4415eb2740db2d9fb3214890a8a0f191"
- + "46dfb7897bacc02700a89139dc8fb21b2a7bbfbd43604d7f384cc00aecefb4ef",
- // padding:3041300d0609608648016503040202050004307b8f4654076b80eb963911f19cfad1aaf4285ed48e82
- // 6f6cde1b01a79aa73fadb5446e667fc4f90417782c91270540f3
- "5c5b097c21ac2eb156de39d1eaebe3b96082f54b0171469a94edf7d2027ebfde"
- + "bc0837f766cfefec577e7b797c7a082df2ecc826e55d39927b01c2da26f8f681"
- + "4ec993e3b93ee87a3418322b65ac652b3bba6d34373a13fd40b66be489938fad"
- + "f67bbda762f6ee09a1ddc41382051d4a9a946e0df832bc65b7d5dd58cc5a402b",
- // padding:3051300d060960864801650304020305000440c6ee9e33cf5c6715a1d148fd73f7318884b41adcb916
- // 021e2bc0e800a5c5dd97f5142178f6ae88c8fdd98e1afb0ce4c8d2c54b5f37b30b7da1997bb33b0b8a31
- "0ede4ac9ffcb6d3d42c75cf73303a28ba6089941f68dcf392a75b071f6c149a1"
- + "09cab95b80a679ca3b29ae44e51c18a2db4c72211ae6b959c7f22e854c45f20f"
- + "5560446f33be4819f08d981d2fb176d48039ac4acd28127d593f9e219ad40e2a"
- + "5ee911b334b3b8bb290f2327524e3faae2c028745e03d58882bfe503c4ff04b2",
-
- // using PKCS#1 encryption padding
- // padding:0002ff...00
- *
- *
- *
- *
- *
- * @return {!Promise}
- */
-function testRsaEncryptionException() {
- var promise = new Promise(function(resolve, reject){
- var scheme = RsaUtil.RSA_OAEP;
- var keySize = 1024;
- var e = RsaUtil.E_65537;
- var hashAlg = 'SHA-256';
- var usages = ['encrypt', 'decrypt'];
- var ctLen = keySize/8;
- var nTest = 1000;
- var nDone = 0;
- var exceptions = new Set();
- RsaUtil.generateKey(scheme, keySize, e, hashAlg, usages).then(function(key) {
- for (var i = 0; i < nTest; i++) {
- var ct = new Uint8Array(e2e.random.getRandomBytes(ctLen)).buffer;
- RsaUtil.decrypt(scheme, key.privateKey, ct).then(function(pt){
- reject('RSA-OAEP decryption should not succeed on random bytes');
- }).catch(function(err){
- exceptions.add(err.name + ': ' + err.message);
- nDone += 1;
- if (nDone == nTest) {
- if (exceptions.size > 1) {
- var msg = 'Exceptions leak information about the padding for ' + scheme + '\n';
- exceptions.forEach(function(e) {
- msg += e;
- });
- reject(msg);
- }
- resolve();
- }
- });
- }
- }).catch(function(err){
- reject('Failed to generate key: ' + err);
- });
- });
- return promise;
-}
diff --git a/javascript/webcryptoapi/testcases/RsaSsaPkcs1Test.js b/javascript/webcryptoapi/testcases/RsaSsaPkcs1Test.js
deleted file mode 100644
index 6aafef0..0000000
--- a/javascript/webcryptoapi/testcases/RsaSsaPkcs1Test.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * @license
- * Copyright 2017 Google Inc. All rights reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Tests for RSASSA-PKCS1-v1_5 signature implementations of Web Crypto APIs.
- */
-goog.provide('wycheproof.webcryptoapi.RSASSA-PKCS1-V1_5');
-goog.require('goog.testing.TestCase');
-goog.require('goog.testing.asserts');
-goog.require('goog.testing.jsunit');
-goog.require('wycheproof.BigInteger');
-goog.require('wycheproof.TestUtil');
-goog.require('wycheproof.webcryptoapi.HashUtil');
-goog.require('wycheproof.webcryptoapi.RsaUtil');
-
-var TestUtil = wycheproof.TestUtil;
-var RsaUtil = wycheproof.webcryptoapi.RsaUtil;
-var HashUtil = wycheproof.webcryptoapi.HashUtil;
-var BigInteger = wycheproof.BigInteger;
-// Test vector file
-var RSASSA_PKCS1_SIGNATURE_VECTOR_FILE
- = '../../testvectors/rsa_signature_test.json';
-
-/**
- * Tests RSASSA-PKCS1-v1_5 signature implementation with a number of vectors.
- *
- * @return {!Promise}
- */
-function testRsaSsaPkcs1Vectors() {
- var tv = TestUtil.readJsonTestVectorsFromFile(
- RSASSA_PKCS1_SIGNATURE_VECTOR_FILE);
- var testCase = new goog.testing.TestCase();
-
- for (var i = 0; i < tv['testGroups'].length; i++) {
- var tg = tv['testGroups'][i];
- var e = BigInteger.fromHex(tg['e']).toBase64Url();
- var n = BigInteger.fromHex(tg['n']).toBase64Url();
- var hashAlg = tg['sha'];
- if (SUPPORTED['hash'].indexOf(hashAlg) == -1) {
- continue;
- }
- for (var j = 0; j < tg['tests'].length; j++) {
- var tc = tg['tests'][j];
- var msg = BigInteger.fromHex(tc['message']).toArrayBuffer();
- var sig = TestUtil.hexToArrayBuffer(tc['sig']);
- var result = tc['result'];
- var tcId = tc['tcId'];
-
- // Creates new Test Case object
- var test = new RsaUtil.RsaSignatureTestCase(tcId, e, n, hashAlg,
- RsaUtil.RSASSA_PKCS1, msg, sig, result);
- testCase.addNewTest('Test case ' + tcId, RsaUtil.testVerification, test);
- }
- }
-
- return testCase.runTestsReturningPromise().then(TestUtil.checkTestCaseResult);
-}
-
diff --git a/local_repository_defs.bzl b/local_repository_defs.bzl
deleted file mode 100644
index 3c9b348..0000000
--- a/local_repository_defs.bzl
+++ /dev/null
@@ -1,25 +0,0 @@
-_bouncycastle_jar_rule = """
-java_import(
- name = "bouncycastle_jar",
- jars = ["bouncycastle.jar"],
- visibility = ["//visibility:public"],
- )
-"""
-
-# TODO(ekasper): implement environment invalidation once supported by bazel,
-# see https://bazel.build/designs/2016/10/18/repository-invalidation.html
-# Meanwhile, users have to call 'bazel clean' explicitly when the
-# environment changes.
-def _local_jars_impl(repository_ctx):
- contents = ""
- if "WYCHEPROOF_BOUNCYCASTLE_JAR" in repository_ctx.os.environ:
- repository_ctx.symlink(repository_ctx.os.environ["WYCHEPROOF_BOUNCYCASTLE_JAR"],
- "bouncycastle.jar")
- contents += _bouncycastle_jar_rule
-
- repository_ctx.file("BUILD", contents)
-
-local_jars = repository_rule(
- implementation = _local_jars_impl,
- local = True
-)
diff --git a/testvectors/BUILD b/testvectors/BUILD
deleted file mode 100644
index 407f519..0000000
--- a/testvectors/BUILD
+++ /dev/null
@@ -1,43 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"]) # Apache 2.0
-
-filegroup(
- name = "all",
- srcs = glob(["**"]),
-)
-
-filegroup(
- name = "aes_gcm_siv",
- srcs = ["aes_gcm_siv_test.json"],
-)
-
-filegroup(
- name = "aes_gcm",
- srcs = ["aes_gcm_test.json"],
-)
-
-filegroup(
- name = "dsa",
- srcs = ["dsa_test.json"],
-)
-
-filegroup(
- name = "ecdsa",
- srcs = ["ecdsa_test.json"],
-)
-
-filegroup(
- name = "rsa_signature",
- srcs = ["rsa_signature_test.json"],
-)
-
-filegroup(
- name = "ecdsa_webcrypto",
- srcs = ["ecdsa_webcrypto_test.json"],
-)
-
-filegroup(
- name = "ecdh_webcrypto",
- srcs = ["ecdh_webcrypto_test.json"],
-)
diff --git a/testvectors/aes_gcm_siv_test.json b/testvectors/aes_gcm_siv_test.json
deleted file mode 100644
index e1dad30..0000000
--- a/testvectors/aes_gcm_siv_test.json
+++ /dev/null
@@ -1,1431 +0,0 @@
-{
- "algorithm" : "AES-GCM-SIV",
- "generatorVersion" : "0.0a10",
- "numberOfTests" : 128,
- "testGroups" : [
- {
- "ivSize" : 96,
- "keySize" : 128,
- "tagSize" : 128,
- "type" : "AES-GCM-SIV",
- "tests" : [
- {
- "aad" : "6578616d706c65",
- "comment" : "",
- "ct" : "5d349ead175ef6b1def6fd",
- "iv" : "752abad3e0afb5f434dc4310",
- "key" : "ee8e1ed9ff2540ae8f2ba9f50bc2f27c",
- "msg" : "48656c6c6f20776f726c64",
- "result" : "valid",
- "tag" : "4fbcdeb7e4793f4a1d7e4faa70100af1",
- "tcId" : 1
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "",
- "iv" : "c5ec7f6a7c1cbb9f096c23e1",
- "key" : "69655ffc8574268d7d764b4c8e2d1cfc",
- "msg" : "",
- "result" : "valid",
- "tag" : "e855e2cf110185ea42e0beb810921e97",
- "tcId" : 2
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "ea",
- "iv" : "9e55f9806586e2ad5f2100c7",
- "key" : "3977dbb36e67db044c342c7de5cdb78e",
- "msg" : "59",
- "result" : "valid",
- "tag" : "295797ed70f68ed0ca6c90295b978979",
- "tcId" : 3
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "f4fedc2284ed6cf3",
- "iv" : "5e978ed61a747a8e0c653431",
- "key" : "c4c8657b1201062551606b589fc0885d",
- "msg" : "653577646d6c7148",
- "result" : "valid",
- "tag" : "269970ff0864c326cc4519fd583de2c8",
- "tcId" : 4
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "c1ecb6458ac376b23a32cf1baaf91b",
- "iv" : "e31b8280fb20c635d216e60c",
- "key" : "3cfbf6110add49378c55c0e6d4903102",
- "msg" : "5346403f3d4365494b5d6b4e4c794a",
- "result" : "valid",
- "tag" : "337875589ca645b7a8f0ae2e1aaa8507",
- "tcId" : 5
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "e73e5a36553a1c2cd7ff14567931017f",
- "iv" : "8b771b6b3a6716145c4d5add",
- "key" : "a30610fe260dbaca5fd028560cca3ee0",
- "msg" : "3c76715f5f5b3138634d5f405a473679",
- "result" : "valid",
- "tag" : "4a88ede73ced48273cf403fd7637075d",
- "tcId" : 6
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "8e1f2a43a7bd58f0eab84bf4dbef44dbb5",
- "iv" : "2ed716c8602f11b08acfc3bd",
- "key" : "dfbcf5d0f7e4d071ff7d1e5a7355b251",
- "msg" : "556d40364b60466343336d52345255606c",
- "result" : "valid",
- "tag" : "89ef881c8c3ba57dcb6fc668e1b9d5c7",
- "tcId" : 7
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "3f74af6ca9dbe1a78cae83dfd0674fc4fb958bf568ff6feb",
- "iv" : "7716ac321323329c1bb010bc",
- "key" : "6076c8fb6b7e2aeea0f3071a568a242e",
- "msg" : "427439504762616b495c36787048465176597854586a5941",
- "result" : "valid",
- "tag" : "f15059f4f4bda71a208f9509ce9ed193",
- "tcId" : 8
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "a8cf3650ce082504335c8ce4f57fbb13c51f1f77710d237e252b3249126e913f",
- "iv" : "a4f0c301976eead863aac740",
- "key" : "ae97979b0047f5c68673760d78d2f53e",
- "msg" : "5c3344455a75415b6b4668683a5837414a444f52343f653e5e3c733068463e35",
- "result" : "valid",
- "tag" : "88634665e6b193de3aef8cc9c3ed814b",
- "tcId" : 9
- },
- {
- "aad" : "2b",
- "comment" : "",
- "ct" : "932f343841411f009773888d2cd24583",
- "iv" : "446563580eb9c5a0a1b66c6b",
- "key" : "d54558ef9024c7ed12080261f4fed8fb",
- "msg" : "4e4e79543451606d493a473e3c674f56",
- "result" : "valid",
- "tag" : "0be20b2bd425a221f618ed571069f56f",
- "tcId" : 10
- },
- {
- "aad" : "1082",
- "comment" : "",
- "ct" : "5e63cd21e21b7da7a4a2e169b84aa132",
- "iv" : "fdd2af08930557eba77076ca",
- "key" : "f78537a556996614b520a596fdb4e0af",
- "msg" : "4467475e644c4e3d35743b33484a7358",
- "result" : "valid",
- "tag" : "b8bf4694d2aaa98379d6b2775ec2ec16",
- "tcId" : 11
- },
- {
- "aad" : "030ff0e9189b895ee2c4f2215d266d",
- "comment" : "",
- "ct" : "f9c413d5fa8459ef04beecd90ecdc0e6",
- "iv" : "5e8fe87d4d2b9b4fe294ea64",
- "key" : "af185901b8558d40f365716a0d23626d",
- "msg" : "535d4e463d4f58754b4c397738476372",
- "result" : "valid",
- "tag" : "d23da7d3594d4d417126ef761491eeab",
- "tcId" : 12
- },
- {
- "aad" : "32b173706d160cc03e610b791fef3303",
- "comment" : "",
- "ct" : "287ff87726d053fa4058082435396c76",
- "iv" : "10b00d5fded7b0c6c5de371d",
- "key" : "31197ec97f79f44b26473e8d5d52fecd",
- "msg" : "76737136663d4b513841314a3f41586a",
- "result" : "valid",
- "tag" : "2de8405f59cc7db9f785a71fe500036b",
- "tcId" : 13
- },
- {
- "aad" : "1c386537359aa2d50c83f154b95c1f1c8e",
- "comment" : "",
- "ct" : "9cc7feea41e5dfdb4c97ddc318e8f312",
- "iv" : "07c68e0553bd5a51bf9139fe",
- "key" : "aba997f14a6df3f7e4f951c82ab65903",
- "msg" : "4464596d5d4c3e393c495b666d756a6f",
- "result" : "valid",
- "tag" : "ef00dff577c25b4b95b8bf1701a81878",
- "tcId" : 14
- },
- {
- "aad" : "c3dd833a6ac7aae9d2e11d2e3e5a3497f2cae8e98b79fe5c1eb48d10d32584a5",
- "comment" : "",
- "ct" : "2cd917ed53b243b9ede4e4295482b19e",
- "iv" : "2cbdfff62f3f97e521bc3a42",
- "key" : "ebc9e72612e0457716acfd99e7db9575",
- "msg" : "5e5b4b685d515954653737746758306c",
- "result" : "valid",
- "tag" : "dd8cb3cdc2c9c74b6a93a3b3fd2cdf5b",
- "tcId" : 15
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "",
- "result" : "valid",
- "tag" : "dc20e2d83f25705bb49e439eca56de25",
- "tcId" : 16
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "b5d839330ac7b786",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "0100000000000000",
- "result" : "valid",
- "tag" : "578782fff6013b815b287c22493a364c",
- "tcId" : 17
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "7323ea61d05932260047d942",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "010000000000000000000000",
- "result" : "valid",
- "tag" : "a4978db357391a0bc4fdec8b0d106639",
- "tcId" : 18
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "743f7c8077ab25f8624e2e948579cf77",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "01000000000000000000000000000000",
- "result" : "valid",
- "tag" : "303aaf90f6fe21199c6068577437a0c4",
- "tcId" : 19
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "84e07e62ba83a6585417245d7ec413a9fe427d6315c09b57ce45f2e3936a9445",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "0100000000000000000000000000000002000000000000000000000000000000",
- "result" : "valid",
- "tag" : "1a8e45dcd4578c667cd86847bf6155ff",
- "tcId" : 20
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "3fd24ce1f5a67b75bf2351f181a475c7b800a5b4d3dcf70106b1eea82fa1d64df42bf7226122fa92e17a40eeaac1201b",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "010000000000000000000000000000000200000000000000000000000000000003000000000000000000000000000000",
- "result" : "valid",
- "tag" : "5e6e311dbf395d35b0fe39c2714388f8",
- "tcId" : 21
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "2433668f1058190f6d43e360f4f35cd8e475127cfca7028ea8ab5c20f7ab2af02516a2bdcbc08d521be37ff28c152bba36697f25b4cd169c6590d1dd39566d3f",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "01000000000000000000000000000000020000000000000000000000000000000300000000000000000000000000000004000000000000000000000000000000",
- "result" : "valid",
- "tag" : "8a263dd317aa88d56bdf3936dba75bb8",
- "tcId" : 22
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "1e6daba35669f427",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "0200000000000000",
- "result" : "valid",
- "tag" : "3b0a1a2560969cdf790d99759abd1508",
- "tcId" : 23
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "296c7889fd99f41917f44620",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "020000000000000000000000",
- "result" : "valid",
- "tag" : "08299c5102745aaa3a0c469fad9e075a",
- "tcId" : 24
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "e2b0c5da79a901c1745f700525cb335b",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "02000000000000000000000000000000",
- "result" : "valid",
- "tag" : "8f8936ec039e4e4bb97ebd8c4457441f",
- "tcId" : 25
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "620048ef3c1e73e57e02bb8562c416a319e73e4caac8e96a1ecb2933145a1d71",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "0200000000000000000000000000000003000000000000000000000000000000",
- "result" : "valid",
- "tag" : "e6af6a7f87287da059a71684ed3498e1",
- "tcId" : 26
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "50c8303ea93925d64090d07bd109dfd9515a5a33431019c17d93465999a8b0053201d723120a8562b838cdff25bf9d1e",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "020000000000000000000000000000000300000000000000000000000000000004000000000000000000000000000000",
- "result" : "valid",
- "tag" : "6a8cc3865f76897c2e4b245cf31c51f2",
- "tcId" : 27
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "2f5c64059db55ee0fb847ed513003746aca4e61c711b5de2e7a77ffd02da42feec601910d3467bb8b36ebbaebce5fba30d36c95f48a3e7980f0e7ac299332a80",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "02000000000000000000000000000000030000000000000000000000000000000400000000000000000000000000000005000000000000000000000000000000",
- "result" : "valid",
- "tag" : "cdc46ae475563de037001ef84ae21744",
- "tcId" : 28
- },
- {
- "aad" : "010000000000000000000000",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "a8fe3e87",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "02000000",
- "result" : "valid",
- "tag" : "07eb1f84fb28f8cb73de8e99e2f48a14",
- "tcId" : 29
- },
- {
- "aad" : "010000000000000000000000000000000200",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "6bb0fecf5ded9b77f902c7d5da236a4391dd0297",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "0300000000000000000000000000000004000000",
- "result" : "valid",
- "tag" : "24afc9805e976f451e6d87f6fe106514",
- "tcId" : 30
- },
- {
- "aad" : "0100000000000000000000000000000002000000",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "44d0aaf6fb2f1f34add5e8064e83e12a2ada",
- "iv" : "030000000000000000000000",
- "key" : "01000000000000000000000000000000",
- "msg" : "030000000000000000000000000000000400",
- "result" : "valid",
- "tag" : "bff9b2ef00fb47920cc72a0c0f13b9fd",
- "tcId" : 31
- },
- {
- "aad" : "395f4091b410c373073bcdc79e02d3af",
- "comment" : "Testing for ctr overflow",
- "ct" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "iv" : "010101010101010101010101",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "43488548d88e6f774bcd2d52c18fbcc933a4e9a9613ff3edbe959ec59522adc098b3133b8d17b9e9dad631ad33752c95",
- "result" : "valid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 32
- },
- {
- "aad" : "616b2dff4d665e5f7ab890723dd981b1",
- "comment" : "Testing for ctr overflow",
- "ct" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "f012c6a7eb0e8af5bc45e015e7680a693dc709b95383f6a94babec1bc36e4be3cf4f55a31a94f11c6c3f90eed99682bc",
- "result" : "valid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 33
- },
- {
- "aad" : "387a8997605fd04ae8951c4759087864",
- "comment" : "Testing for ctr overflow",
- "ct" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "iv" : "030303030303030303030303",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "71ceee58179d6fb968521e9594dbf98cc0040f6aa38fe873c32a9b122d6cbfd51aa4778b3f4f37be7348690d97e2468b",
- "result" : "valid",
- "tag" : "fefffffffefffffffefffffffeffffff",
- "tcId" : 34
- },
- {
- "aad" : "6783b0d5e9d8a2a7274065797097d1ae",
- "comment" : "Testing for ctr overflow",
- "ct" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "iv" : "060606060606060606060606",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "2e14f9e9a09ea204557367898a80dcad117af3666bea25762b70633a9f3614fbe631ba617c371fd5566d5e613496e69f",
- "result" : "valid",
- "tag" : "ffffff7f00112233445566778899aabb",
- "tcId" : 35
- },
- {
- "aad" : "2933810c146f4f7dd146dd43f35199c6",
- "comment" : "Testing for ctr overflow",
- "ct" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "iv" : "010101010101010101010101",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "27fac75879c9d87cd52a0793137ba792f6f145148158eb538f2081e09cd0315986a7025045ecbb2ca1bb18a17bfcd567",
- "result" : "valid",
- "tag" : "ffffffffffffff7f0011223344556677",
- "tcId" : 36
- },
- {
- "aad" : "27dd62060507dae87c4f93f391ba15f9",
- "comment" : "Flipped bit 0 in tag",
- "ct" : "",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "",
- "result" : "invalid",
- "tag" : "0987e35e40981a2730c1740c7201731f",
- "tcId" : 37
- },
- {
- "aad" : "9ea3371e258288d5a01b15384e2c99ee",
- "comment" : "Flipped bit 0 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "03c0e39b77bd62d32568f4c86c90bfdb",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 38
- },
- {
- "aad" : "ce24e3ec0fe7b8550d621b71fdb5d0eb",
- "comment" : "Flipped bit 0 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "63995888995b338c",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 39
- },
- {
- "aad" : "1471f354b359c235117febba854a823b",
- "comment" : "Flipped bit 7 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "03c0e39b77bd62d32568f4c86c90bfdb",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 40
- },
- {
- "aad" : "11f820294fc9d13f1895d2fb5509913b",
- "comment" : "Flipped bit 7 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "63995888995b338c",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 41
- },
- {
- "aad" : "45e7257b814f09de44177b27b914822f",
- "comment" : "Flipped bit 8 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "03c0e39b77bd62d32568f4c86c90bfdb",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 42
- },
- {
- "aad" : "4c49780b5438c4a7ea9795b9856fdae1",
- "comment" : "Flipped bit 8 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "63995888995b338c",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 43
- },
- {
- "aad" : "ecc2f2f4142837a34f9cd1fa030a5d7f",
- "comment" : "Flipped bit 8 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "0fed395814f1750a",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 44
- },
- {
- "aad" : "69c7f5605da8e0684990b087411f8cf5",
- "comment" : "Flipped bit 31 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "63995888995b338c",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 45
- },
- {
- "aad" : "20b346be60e7e97588bf504ce707ce0b",
- "comment" : "Flipped bit 31 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "0fed395814f1750a",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 46
- },
- {
- "aad" : "19b298f3a061a73cb774da927ce11ca2",
- "comment" : "Flipped bit 63 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "63995888995b338c",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 47
- },
- {
- "aad" : "bff8c631e61c18a050a523ad4a750a20",
- "comment" : "Flipped bit 63 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "0fed395814f1750a",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 48
- },
- {
- "aad" : "7b6171302b689c926852163e310f08d4",
- "comment" : "Flipped bit 64 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "03c0e39b77bd62d32568f4c86c90bfdb",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 49
- },
- {
- "aad" : "555036128fa18ecadd090cb772ac0bf3",
- "comment" : "Flipped bit 97 in tag",
- "ct" : "",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "",
- "result" : "invalid",
- "tag" : "0987e35e40981a2730c1740c7201731f",
- "tcId" : 50
- },
- {
- "aad" : "a5b43b8e1dbb2bfbda1b625fee4064a7",
- "comment" : "Flipped bit 97 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "63995888995b338c",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 51
- },
- {
- "aad" : "ae47cc5d7681dd480c23469c5519b647",
- "comment" : "Flipped bit 120 in tag",
- "ct" : "",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "",
- "result" : "invalid",
- "tag" : "0987e35e40981a2730c1740c7201731f",
- "tcId" : 52
- },
- {
- "aad" : "d53dd677184702eaa660f1349195fc04",
- "comment" : "Flipped bit 120 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "03c0e39b77bd62d32568f4c86c90bfdb",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 53
- },
- {
- "aad" : "dc78584e4599dd4b2fb333db2f9ccb95",
- "comment" : "Flipped bit 120 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "0fed395814f1750a",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 54
- },
- {
- "aad" : "0bfd9271e79153a8afdb7f3d96fe446f",
- "comment" : "Flipped bit 121 in tag",
- "ct" : "",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "",
- "result" : "invalid",
- "tag" : "0987e35e40981a2730c1740c7201731f",
- "tcId" : 55
- },
- {
- "aad" : "1e0537a95b7200134d0b440657d50fd1",
- "comment" : "Flipped bit 121 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "63995888995b338c",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 56
- },
- {
- "aad" : "7633155df35857258d23b0651d60847c",
- "comment" : "Flipped bit 121 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "0fed395814f1750a",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 57
- },
- {
- "aad" : "ab0a064b473de43598adf81ee297d856",
- "comment" : "Flipped bit 126 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "0fed395814f1750a",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 58
- },
- {
- "aad" : "f62bdc3f4fcb699ee12f6e87dcc704cb",
- "comment" : "Flipped bit 127 in tag",
- "ct" : "",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "",
- "result" : "invalid",
- "tag" : "0987e35e40981a2730c1740c7201731f",
- "tcId" : 59
- },
- {
- "aad" : "1320051031807b8f44e9d2cb1ec6aa92",
- "comment" : "Flipped bit 127 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "03c0e39b77bd62d32568f4c86c90bfdb",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 60
- },
- {
- "aad" : "329b813d3ae2225d3e15f97a28037bcc",
- "comment" : "Flipped bit 127 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "63995888995b338c",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 61
- },
- {
- "aad" : "edc723bedd0078696acdea005c74b841",
- "comment" : "Flipped bit 0..127 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff",
- "msg" : "63995888995b338c",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 62
- }
- ]
- },
- {
- "ivSize" : 96,
- "keySize" : 256,
- "tagSize" : 128,
- "type" : "AES-GCM-SIV",
- "tests" : [
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "",
- "result" : "valid",
- "tag" : "07f5f4169bbf55a8400cd47ea6fd400f",
- "tcId" : 63
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "c2ef328e5c71c83b",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "0100000000000000",
- "result" : "valid",
- "tag" : "843122130f7364b761e0b97427e3df28",
- "tcId" : 64
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "9aab2aeb3faa0a34aea8e2b1",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "010000000000000000000000",
- "result" : "valid",
- "tag" : "8ca50da9ae6559e48fd10f6e5c9ca17e",
- "tcId" : 65
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "85a01b63025ba19b7fd3ddfc033b3e76",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "01000000000000000000000000000000",
- "result" : "valid",
- "tag" : "c9eac6fa700942702e90862383c6c366",
- "tcId" : 66
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "4a6a9db4c8c6549201b9edb53006cba821ec9cf850948a7c86c68ac7539d027f",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "0100000000000000000000000000000002000000000000000000000000000000",
- "result" : "valid",
- "tag" : "e819e63abcd020b006a976397632eb5d",
- "tcId" : 67
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "c00d121893a9fa603f48ccc1ca3c57ce7499245ea0046db16c53c7c66fe717e39cf6c748837b61f6ee3adcee17534ed5",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "010000000000000000000000000000000200000000000000000000000000000003000000000000000000000000000000",
- "result" : "valid",
- "tag" : "790bc96880a99ba804bd12c0e6a22cc4",
- "tcId" : 68
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "c2d5160a1f8683834910acdafc41fbb1632d4a353e8b905ec9a5499ac34f96c7e1049eb080883891a4db8caaa1f99dd004d80487540735234e3744512c6f90ce",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "01000000000000000000000000000000020000000000000000000000000000000300000000000000000000000000000004000000000000000000000000000000",
- "result" : "valid",
- "tag" : "112864c269fc0d9d88c61fa47e39aa08",
- "tcId" : 69
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "1de22967237a8132",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "0200000000000000",
- "result" : "valid",
- "tag" : "91213f267e3b452f02d01ae33e4ec854",
- "tcId" : 70
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "163d6f9cc1b346cd453a2e4c",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "020000000000000000000000",
- "result" : "valid",
- "tag" : "c1a4a19ae800941ccdc57cc8413c277f",
- "tcId" : 71
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "c91545823cc24f17dbb0e9e807d5ec17",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "02000000000000000000000000000000",
- "result" : "valid",
- "tag" : "b292d28ff61189e8e49f3875ef91aff7",
- "tcId" : 72
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "07dad364bfc2b9da89116d7bef6daaaf6f255510aa654f920ac81b94e8bad365",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "0200000000000000000000000000000003000000000000000000000000000000",
- "result" : "valid",
- "tag" : "aea1bad12702e1965604374aab96dbbc",
- "tcId" : 73
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "c67a1f0f567a5198aa1fcc8e3f21314336f7f51ca8b1af61feac35a86416fa47fbca3b5f749cdf564527f2314f42fe25",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "020000000000000000000000000000000300000000000000000000000000000004000000000000000000000000000000",
- "result" : "valid",
- "tag" : "03332742b228c647173616cfd44c54eb",
- "tcId" : 74
- },
- {
- "aad" : "01",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "67fd45e126bfb9a79930c43aad2d36967d3f0e4d217c1e551f59727870beefc98cb933a8fce9de887b1e40799988db1fc3f91880ed405b2dd298318858467c89",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "02000000000000000000000000000000030000000000000000000000000000000400000000000000000000000000000005000000000000000000000000000000",
- "result" : "valid",
- "tag" : "5bde0285037c5de81e5b570a049b62a0",
- "tcId" : 75
- },
- {
- "aad" : "010000000000000000000000",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "22b3f4cd",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "02000000",
- "result" : "valid",
- "tag" : "1835e517741dfddccfa07fa4661b74cf",
- "tcId" : 76
- },
- {
- "aad" : "010000000000000000000000000000000200",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "43dd0163cdb48f9fe3212bf61b201976067f342b",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "0300000000000000000000000000000004000000",
- "result" : "valid",
- "tag" : "b879ad976d8242acc188ab59cabfe307",
- "tcId" : 77
- },
- {
- "aad" : "0100000000000000000000000000000002000000",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "462401724b5ce6588d5a54aae5375513a075",
- "iv" : "030000000000000000000000",
- "key" : "0100000000000000000000000000000000000000000000000000000000000000",
- "msg" : "030000000000000000000000000000000400",
- "result" : "valid",
- "tag" : "cfcdf5042112aa29685c912fc2056543",
- "tcId" : 78
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "f3f80f2cf0cb2dd9c5984fcda908456cc537703b5ba70324a6793a7bf218d3ea",
- "iv" : "000000000000000000000000",
- "key" : "0000000000000000000000000000000000000000000000000000000000000000",
- "msg" : "000000000000000000000000000000004db923dc793ee6497c76dcc03a98e108",
- "result" : "valid",
- "tag" : "ffffffff000000000000000000000000",
- "tcId" : 79
- },
- {
- "aad" : "",
- "comment" : "draft-irtf-cfrg-gcmsiv-05",
- "ct" : "18ce4f0b8cb4d0cac65fea8f79257b20888e53e72299e56d",
- "iv" : "000000000000000000000000",
- "key" : "0000000000000000000000000000000000000000000000000000000000000000",
- "msg" : "eb3640277c7ffd1303c7a542d02d3e4c0000000000000000",
- "result" : "valid",
- "tag" : "ffffffff000000000000000000000000",
- "tcId" : 80
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "",
- "iv" : "c8e71aa0a4ecf161bf0fa745",
- "key" : "8829413ee4ea90d43e906703e4cc50ee8ca395412fc5ba9bfeda36eecb84669f",
- "msg" : "",
- "result" : "valid",
- "tag" : "d1794629e275a120dec4c7a9e034c945",
- "tcId" : 81
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "ab",
- "iv" : "c57fb23876bd391540c045e2",
- "key" : "7eedcb71a91cb9955a5b058ee29b7635d70681c81f11a04547edd8b3e7c55a49",
- "msg" : "3f",
- "result" : "valid",
- "tag" : "1eca53c47b58b32c5759fd46fb666252",
- "tcId" : 82
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "516268640df6be7a",
- "iv" : "45521542a43bfaf2de4d9d31",
- "key" : "2c39e0bba05d6ad87d4ff5a71f25929bce448ca4793d447626e301e4158d3340",
- "msg" : "3f3d3551735b6930",
- "result" : "valid",
- "tag" : "4b23b53ebaa30096266d9a4de14637d1",
- "tcId" : 83
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "f8f735354a54462654e925dc95a360",
- "iv" : "ee7a538245155f2dbdf3b9db",
- "key" : "6f72ca50a98bea5cd3b346482cff1e1676024cc6fb5ff0ea4f3382f91f11de8a",
- "msg" : "7276647636703676474a5d63616b75",
- "result" : "valid",
- "tag" : "30da0f88834322e27f83b172926b518e",
- "tcId" : 84
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "5bb5c151aa5a3aba5861930ecad7a582",
- "iv" : "5cec99ffb28fdd7e7205144c",
- "key" : "3883b196eccde592628a5b88a9887dd47e6409ed6ae926d2ec145cc4680537be",
- "msg" : "663148316752493860735741466f706d",
- "result" : "valid",
- "tag" : "b2451c834e97502eb1a7f07f8bc4f552",
- "tcId" : 85
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "a4a84c1a6d53992393fa314546766b568d",
- "iv" : "0e8484b973d7883759661e1a",
- "key" : "81e6383dc355fd7134fe3a1b36c35c8130c0f967eaad835e2241e0c005eef271",
- "msg" : "3d355e3e356341655638403c72484b3d7a",
- "result" : "valid",
- "tag" : "75a993afe35bb8ad402f28ed55912cb8",
- "tcId" : 86
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "75fee9a2ccb97778ee351a24d4a77fdf8c5d435c377a688c",
- "iv" : "3efa35aec3aa329ca2a36162",
- "key" : "6cd615ff65d0dd5cb2770a5f8aaf02312266ec283a20083f6959977d37957ed1",
- "msg" : "365f5b3838703b5b7560614e354a36674e6e3a6243703f3d",
- "result" : "valid",
- "tag" : "1ff90775055f43a8ac4f3ae0dfa7e4b9",
- "tcId" : 87
- },
- {
- "aad" : "",
- "comment" : "",
- "ct" : "ba7a0f7168b8e6981a28755cf9aabb9061dc91df95281f611d9d264aaa103bd2",
- "iv" : "dfc40927ed2c9b6c6359b557",
- "key" : "1abd07bdbefbaf7ea355c8c6112c2e508be863f53510045c819b493f0435fc8f",
- "msg" : "5375474d654d49593a6f34575a47394a4c376261435c333c3d5946684f777135",
- "result" : "valid",
- "tag" : "a62f0b0a1037a4f55b49f10a226285a8",
- "tcId" : 88
- },
- {
- "aad" : "07",
- "comment" : "",
- "ct" : "a45a01a6a053c4b40b25d0ec07fdb211",
- "iv" : "b53696d1f24ee0f1663441d5",
- "key" : "53cbd7d2e6562777aa09ade5c3ec5db07179c32cde64b5b1396661808d5f1cf1",
- "msg" : "3a31463b4a4f5b3f6d5c5761513b7850",
- "result" : "valid",
- "tag" : "8719d82f00b6d9888c3bbffedf029f70",
- "tcId" : 89
- },
- {
- "aad" : "2d9c",
- "comment" : "",
- "ct" : "72e1209dda47c9bb505630d8fcbd4eb0",
- "iv" : "63a75774a5694a979df0176e",
- "key" : "85943861113c614e9ae8c94fd731eb81437c5c0036501048da3681157263e262",
- "msg" : "767a38753d4b673a3b4c62665e493c76",
- "result" : "valid",
- "tag" : "5318d79a7ff41a25e7aab94af0d8824d",
- "tcId" : 90
- },
- {
- "aad" : "6340f851e50147296a7c8bd0c73694",
- "comment" : "",
- "ct" : "47a58be5cfb028114c07c227927fa3b8",
- "iv" : "bc8f3833aad958158f4a8621",
- "key" : "01cd7c5e047388ab2797641b55e8979c13a218edc45ed2f224ebd808db17c0ef",
- "msg" : "3e4734534f4e555575563755423f474a",
- "result" : "valid",
- "tag" : "d206451f2bd40da01fd13e9a720de461",
- "tcId" : 91
- },
- {
- "aad" : "ef15dd2be66b8cecfab74ed6598c19c6",
- "comment" : "",
- "ct" : "18beb6d4ebaf2c8ab6630b715058107a",
- "iv" : "b6bd979fb2e5e354f878d87c",
- "key" : "06992b2e44daaa8d51f8465aa1c83327a94f088d7b0bf07d1d85e43c6ecdc678",
- "msg" : "507552575341636b3d5a407a3858303d",
- "result" : "valid",
- "tag" : "2e5a80259157e2515caf02887c0323ea",
- "tcId" : 92
- },
- {
- "aad" : "6781ccd1d56f16f4fc39ec14fc67d72ccb",
- "comment" : "",
- "ct" : "4f33a50bc17f63e6b320ef6429379a97",
- "iv" : "cd7d99b8e9bdc60b1d3c66f6",
- "key" : "173f2f0bf6b9ca0aa0d94b42ac088c8e068bf0326aecd3c2a198741dc67d02c0",
- "msg" : "466278595c74335e62745961386e673a",
- "result" : "valid",
- "tag" : "148a1423a1b6bacd3e18cb5811410d28",
- "tcId" : 93
- },
- {
- "aad" : "069035329b0ac0e688a2855566767f564ce3c2b8065c94b0cc7b2b6231ffd286",
- "comment" : "",
- "ct" : "1de0911bc86af91f4b1f898711c85748",
- "iv" : "0b66ff8bf864ef59265c8c1f",
- "key" : "6de61258bd5e50ab2c27bb7b237f047dbe1a178845834efdd8cf7c662dd2e972",
- "msg" : "4c4355463f3c4d62344f5b314a74744f",
- "result" : "valid",
- "tag" : "c9e87553370436e6034b7f9ad0e94259",
- "tcId" : 94
- },
- {
- "aad" : "40c32e00c2fdab59c1a1c573b46b5068",
- "comment" : "Testing for ctr overflow",
- "ct" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "iv" : "010101010101010101010101",
- "key" : "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",
- "msg" : "bdd411814564c4218d224d50591c818855a862a0a519ac0b3d71a2edb12aa71eb81959bcc6b84c45aa424c9aca0b7bdd",
- "result" : "valid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 95
- },
- {
- "aad" : "2cc3a1973e0560f7224a394e52fa8488",
- "comment" : "Testing for ctr overflow",
- "ct" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",
- "msg" : "d04846a01f472262e60a1cb4cfcbdcb05c3f819628a3a49395c5dae96c434b2417ce071699afa74a60c32c0bafd9c01a",
- "result" : "valid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 96
- },
- {
- "aad" : "2e34d12622a441b557eeb1d647c6cb73",
- "comment" : "Testing for ctr overflow",
- "ct" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "iv" : "010101010101010101010101",
- "key" : "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",
- "msg" : "79637cee9decf33e3080de3d2c55bd21cd529ba8080b583edb6cfe13cda04bd00debe58b8cd48d6e02a1ecfc4d87923a",
- "result" : "valid",
- "tag" : "fefffffffefffffffefffffffeffffff",
- "tcId" : 97
- },
- {
- "aad" : "0814a95481bf915a4097949e3525c7e7",
- "comment" : "Testing for ctr overflow",
- "ct" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",
- "msg" : "6492a73880dac7f36743715b0fc7063d3e46a25044310bba5849ed88bfcb54b0adbe3978040bda849906e1aa09d1a8e3",
- "result" : "valid",
- "tag" : "ffffff7f00112233445566778899aabb",
- "tcId" : 98
- },
- {
- "aad" : "b691ef42f2ab8d1b4a581bb08394b13a",
- "comment" : "Testing for ctr overflow",
- "ct" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "iv" : "010101010101010101010101",
- "key" : "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",
- "msg" : "7848d9e872f40bca1b82a4e7185fb75193b3496cc1dc2a72b86ed156ab8389e71687ed25eb6485e66561fa8c39853368",
- "result" : "valid",
- "tag" : "ffffffffffffff7f0011223344556677",
- "tcId" : 99
- },
- {
- "aad" : "e144878b0bbbf01b75231277e1e0d114",
- "comment" : "Flipped bit 0 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "f663044a4e7dd822aba0b7de2d869981",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 100
- },
- {
- "aad" : "0289eaa93eb084107d2088435ef2a0cd",
- "comment" : "Flipped bit 0 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "49861b1fb6bcf8e4",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 101
- },
- {
- "aad" : "f3bd6013669b7d9371727fcb1aafea75",
- "comment" : "Flipped bit 1 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "49861b1fb6bcf8e4",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 102
- },
- {
- "aad" : "922e91b2c5016e4303c737d1608ca25f",
- "comment" : "Flipped bit 7 in tag",
- "ct" : "",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "",
- "result" : "invalid",
- "tag" : "0987e35e40981a2730c1740c7201731f",
- "tcId" : 103
- },
- {
- "aad" : "7195dd0addce5dd7014bfddb2f23206f",
- "comment" : "Flipped bit 7 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "759dfbbb8a251ccc",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 104
- },
- {
- "aad" : "32fc2a53e9678f1fc6d63081c36c6f2c",
- "comment" : "Flipped bit 7 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "49861b1fb6bcf8e4",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 105
- },
- {
- "aad" : "c55ba71ee250216f8ecfe822d712dd38",
- "comment" : "Flipped bit 8 in tag",
- "ct" : "",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "",
- "result" : "invalid",
- "tag" : "0987e35e40981a2730c1740c7201731f",
- "tcId" : 106
- },
- {
- "aad" : "5546acf865fc305fbd7ff1092cb9c2c3",
- "comment" : "Flipped bit 8 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "759dfbbb8a251ccc",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 107
- },
- {
- "aad" : "6b060eebe1843b409a4dfd0be8f86a2b",
- "comment" : "Flipped bit 31 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "f663044a4e7dd822aba0b7de2d869981",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 108
- },
- {
- "aad" : "c4adb92f1a60eb2faff88675f62a7276",
- "comment" : "Flipped bit 31 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "759dfbbb8a251ccc",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 109
- },
- {
- "aad" : "70c5a8591f52f869c6415a6d7000e253",
- "comment" : "Flipped bit 32 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "f663044a4e7dd822aba0b7de2d869981",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 110
- },
- {
- "aad" : "b5fe79f182cb9f2945208e29513928d1",
- "comment" : "Flipped bit 63 in tag",
- "ct" : "",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "",
- "result" : "invalid",
- "tag" : "0987e35e40981a2730c1740c7201731f",
- "tcId" : 111
- },
- {
- "aad" : "c1dbf87e4a586b040c53f6dd9063b4cd",
- "comment" : "Flipped bit 63 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "49861b1fb6bcf8e4",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 112
- },
- {
- "aad" : "845466e603ca85a224693d150ae13ba3",
- "comment" : "Flipped bit 64 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "759dfbbb8a251ccc",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 113
- },
- {
- "aad" : "18cb9f5eede6224fa3fcd525cf9f958b",
- "comment" : "Flipped bit 97 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "f663044a4e7dd822aba0b7de2d869981",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 114
- },
- {
- "aad" : "8c4fbca37d2e361856b9f80adf455fa0",
- "comment" : "Flipped bit 97 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "759dfbbb8a251ccc",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 115
- },
- {
- "aad" : "bc517fe140abf2b42eb1cafe8c0715a9",
- "comment" : "Flipped bit 97 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "49861b1fb6bcf8e4",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 116
- },
- {
- "aad" : "617e1c5ef62ed35cf678e670f116ff2f",
- "comment" : "Flipped bit 120 in tag",
- "ct" : "",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "",
- "result" : "invalid",
- "tag" : "0987e35e40981a2730c1740c7201731f",
- "tcId" : 117
- },
- {
- "aad" : "e71802b7a37e8ef1f001ef0c52c636f2",
- "comment" : "Flipped bit 120 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "f663044a4e7dd822aba0b7de2d869981",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 118
- },
- {
- "aad" : "be647e37f154d4a8edca5a29ca221cc5",
- "comment" : "Flipped bit 120 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "759dfbbb8a251ccc",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 119
- },
- {
- "aad" : "b3caa01f49c7cbc56c7c92547257957e",
- "comment" : "Flipped bit 121 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "f663044a4e7dd822aba0b7de2d869981",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 120
- },
- {
- "aad" : "ab0347a2aec4cc4c366583062442ba07",
- "comment" : "Flipped bit 121 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "759dfbbb8a251ccc",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 121
- },
- {
- "aad" : "62573ef39a27f77b37fb7bfc84e46cee",
- "comment" : "Flipped bit 126 in tag",
- "ct" : "",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "",
- "result" : "invalid",
- "tag" : "0987e35e40981a2730c1740c7201731f",
- "tcId" : 122
- },
- {
- "aad" : "28e3cadfb16834e824642e965588c200",
- "comment" : "Flipped bit 126 in tag",
- "ct" : "0000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "759dfbbb8a251ccc",
- "result" : "invalid",
- "tag" : "00000000000000000000000000000000",
- "tcId" : 123
- },
- {
- "aad" : "7edd2fc15bed224a46dc8608e1766080",
- "comment" : "Flipped bit 126 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "49861b1fb6bcf8e4",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 124
- },
- {
- "aad" : "7e0e03104e2c0ff20ba4c35742180c5b",
- "comment" : "Flipped bit 127 in tag",
- "ct" : "",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "",
- "result" : "invalid",
- "tag" : "0987e35e40981a2730c1740c7201731f",
- "tcId" : 125
- },
- {
- "aad" : "9a24dc75c5ddd3bab57ff532eb86d224",
- "comment" : "Flipped bit 127 in tag",
- "ct" : "00000000000000000000000000000000",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "f663044a4e7dd822aba0b7de2d869981",
- "result" : "invalid",
- "tag" : "13a1883272188b4c8d2727178198fe95",
- "tcId" : 126
- },
- {
- "aad" : "3196aec499c15bc043b6866ba0df6e6b",
- "comment" : "Flipped bit 127 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "49861b1fb6bcf8e4",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 127
- },
- {
- "aad" : "55a2987aa94bf46ad1b6d253a44c1622",
- "comment" : "Flipped bit 0..127 in tag",
- "ct" : "ffffffffffffffff",
- "iv" : "000000000000000000000000",
- "key" : "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
- "msg" : "49861b1fb6bcf8e4",
- "result" : "invalid",
- "tag" : "ffffffffffffffffffffffffffffffff",
- "tcId" : 128
- }
- ]
- }
- ]
-}
diff --git a/testvectors/aes_gcm_test.json b/testvectors/aes_gcm_test.json
deleted file mode 100644
index 2173922..0000000
--- a/testvectors/aes_gcm_test.json
+++ /dev/null
@@ -1,669 +0,0 @@
-{
- "algorithm": "AES-GCM",
- "generatorVersion": "0.0a8",
- "numberOfTests": 50,
- "testGroups": [
- {
- "ivSize": 96,
- "keySize": 128,
- "tagSize": 128,
- "tests": [
- {
- "aad": "",
- "comment": "",
- "ct": "26073cc1d851beff176384dc9896d5ff",
- "iv": "028318abc1824029138141a2",
- "key": "5b9604fe14eadba931b0ccf34843dab9",
- "msg": "001d0c231287c1182784554ca3a21908",
- "result": "valid",
- "tag": "0a3ea7a5487cb5f7d70fb6c58d038554",
- "tcId": 1
- },
- {
- "aad": "00112233445566778899aabbccddeeff",
- "comment": "",
- "ct": "49d8b9783e911913d87094d1f63cc765",
- "iv": "921d2507fa8007b7bd067d34",
- "key": "5b9604fe14eadba931b0ccf34843dab9",
- "msg": "001d0c231287c1182784554ca3a21908",
- "result": "valid",
- "tag": "1e348ba07cca2cf04c618cb4d43a5b92",
- "tcId": 2
- },
- {
- "aad": "aac39231129872a2",
- "comment": "",
- "ct": "eea945f3d0f98cc0fbab472a0cf24e87",
- "iv": "0432bc49ac34412081288127",
- "key": "aa023d0478dcb2b2312498293d9a9129",
- "msg": "2035af313d1346ab00154fea78322105",
- "result": "valid",
- "tag": "4bb9b4812519dadf9e1232016d068133",
- "tcId": 3
- },
- {
- "aad": "",
- "comment": "",
- "ct": "ff",
- "iv": "327182bee515d2b15f949477",
- "key": "dc25a94c28b9d18a6468f41428fae84d",
- "msg": "6f",
- "result": "valid",
- "tag": "62870f416e1fb63486127df9555ebcdb",
- "tcId": 4
- },
- {
- "aad": "",
- "comment": "",
- "ct": "4bd185849ab0f4d0",
- "iv": "0cfe85626ce523b3204ca873",
- "key": "bd6ffed2d59c492aec86368e02f6baeb",
- "msg": "3c3b3a363f3a504e",
- "result": "valid",
- "tag": "742f379ab07b2c8c0c0eff4ce9327218",
- "tcId": 5
- },
- {
- "aad": "",
- "comment": "",
- "ct": "11afae2b91b71126e31d868e3482f907",
- "iv": "5fe1b8445d7a2bce3ffd01c5",
- "key": "6b21264d4ffdaa70021f6ea94f3f7729",
- "msg": "6538395b746031796f5b60303261684e",
- "result": "valid",
- "tag": "b5133f5ce864f55641c121fb48c77e8c",
- "tcId": 6
- },
- {
- "aad": "",
- "comment": "",
- "ct": "ca741e2b8f4bfb75f3a897869664982be5e1feb1c3588621",
- "iv": "1e0055ab643fe8d851f27501",
- "key": "3f89802f2f430d027d9d27ab10095a1e",
- "msg": "78446a4e313d634d524834637040456b793c6e4d4166544c",
- "result": "valid",
- "tag": "ab9a540db92381a4768ea81f08230100",
- "tcId": 7
- },
- {
- "aad": "15",
- "comment": "",
- "ct": "fa2ac3a4d15e01d64b642c4dc75f95e0",
- "iv": "2071ec1a1d0ff802349fc01b",
- "key": "f08afe018379b19417388302c3508983",
- "msg": "566464646d4639476d5e4673653e3838",
- "result": "valid",
- "tag": "d95cea01fafb2c8c21cebfcbc412f87a",
- "tcId": 8
- },
- {
- "aad": "0b2bc21ab1fbff11e376e1a65ca2a1",
- "comment": "",
- "ct": "1e3373677b4615745a57ce43c0874702",
- "iv": "460b321e66c90ae86f878da7",
- "key": "7c7337a75c47230f579ff763e544b63b",
- "msg": "4c565d4051404f4f35633a63455d7676",
- "result": "valid",
- "tag": "6c0314734528fe2863f2dc16f313e5ff",
- "tcId": 9
- },
- {
- "aad": "2eb61446950c83695522fdeb92220645",
- "comment": "",
- "ct": "107150b5349540a6b953c033d3ed0eec",
- "iv": "787c817bf07a25ec613f4fbb",
- "key": "9bd978c97f84c67e967a6dc71a9dd29a",
- "msg": "4d36343f6e38716e476476394764635b",
- "result": "valid",
- "tag": "87ec1d4fee69de2efe606138b99a1c56",
- "tcId": 10
- },
- {
- "aad": "62a76634d40bb93ce8bd140e418bf88f002e1b88396511f5ddd9b099abe7b722",
- "comment": "",
- "ct": "8e0b9ca71471c5d509167fb138d65834",
- "iv": "da22d5718083aee0b1ecf18c",
- "key": "a3b604ee4889e9986b1d760779acb0da",
- "msg": "453b3b34344076413d3b5b46373f725c",
- "result": "valid",
- "tag": "7cc68eb3039691eeea5b211c9f39244a",
- "tcId": 11
- },
- {
- "aad": "",
- "comment": "special case",
- "ct": "f62d84d649e56bc8cfedc5d74a51e2f7",
- "iv": "000000000000000000000000",
- "key": "00112233445566778899aabbccddeeff",
- "msg": "ebd4a3e10cf6d41c50aeae007563b072",
- "result": "valid",
- "tag": "ffffffffffffffffffffffffffffffff",
- "tcId": 12
- },
- {
- "aad": "",
- "comment": "special case",
- "ct": "431f31e6840931fd95f94bf88296ff69",
- "iv": "ffffffffffffffffffffffff",
- "key": "00112233445566778899aabbccddeeff",
- "msg": "d593c4d8224f1b100c35e4f6c4006543",
- "result": "valid",
- "tag": "00000000000000000000000000000000",
- "tcId": 13
- },
- {
- "aad": "",
- "comment": "special case",
- "ct": "d8eba6a5a03403851abc27f6e15d84c0",
- "iv": "00112233445566778899aabb",
- "key": "00112233445566778899aabbccddeeff",
- "msg": "7fd49ba712d0d28f02ef54ed18db43f8",
- "result": "valid",
- "tag": "00000000000000000000000000000000",
- "tcId": 14
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 64,
- "keySize": 128,
- "tagSize": 128,
- "tests": [
- {
- "aad": "aac39231129872a2",
- "comment": "",
- "ct": "64c36bb3b732034e3a7d04efc5197785",
- "iv": "0432bc49ac344120",
- "key": "aa023d0478dcb2b2312498293d9a9129",
- "msg": "2035af313d1346ab00154fea78322105",
- "result": "valid",
- "tag": "b7d0dd70b00d65b97cfd080ff4b819d1",
- "tcId": 15
- },
- {
- "aad": "",
- "comment": "unusual IV size",
- "ct": "553763110458769a08e3c5d9",
- "iv": "22117438f0762c77",
- "key": "b215270c3e1055888599f1e5f6188e57",
- "msg": "7675613a6c356e663d483264",
- "result": "valid",
- "tag": "14fed4270ed847fec690988c729672d1",
- "tcId": 16
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 128,
- "keySize": 128,
- "tagSize": 128,
- "tests": [
- {
- "aad": "1a0293d8f90219058902139013908190bc490890d3ff12a3",
- "comment": "",
- "ct": "64069c2d58690561f27ee199e6b479b6369eec688672bde9",
- "iv": "3254202d854734812398127a3d134421",
- "key": "2034a82547276c83dd3212a813572bce",
- "msg": "02efd2e5782312827ed5d230189a2a342b277ce048462193",
- "result": "valid",
- "tag": "9b7abadd6e69c1d9ec925786534f5075",
- "tcId": 17
- },
- {
- "aad": "",
- "comment": "J0:000102030405060708090a0b0c0d0e0f",
- "ct": "00078d109d92143fcd5df56721b884fac64ac7762cc09eea2a3c68e92a17bdb575f87bda18be564e",
- "iv": "f95fde4a751913202aeeee32a0b55753",
- "key": "00112233445566778899aabbccddeeff",
- "msg": "00000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "result": "valid",
- "tag": "152a65045fe674f97627427af5be22da",
- "tcId": 18
- },
- {
- "aad": "",
- "comment": "J0:00000000000000000000000000000000",
- "ct": "84d4c9c08b4f482861e3a9c6c35bc4d91df927374513bfd49f436bd73f325285daef4ff7e13d46a6",
- "iv": "7b95b8c356810a84711d68150a1b7750",
- "key": "00112233445566778899aabbccddeeff",
- "msg": "00000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "result": "valid",
- "tag": "213a3cb93855d18e69337eee66aeec07",
- "tcId": 19
- },
- {
- "aad": "",
- "comment": "J0:ffffffffffffffffffffffffffffffff",
- "ct": "948ca37a8e6649e88aeffb1c598f3607007702417ea0e0bc3c60ad5a949886de968cf53ea6462aed",
- "iv": "1a552e67cdc4dc1a33b824874ebf0bed",
- "key": "00112233445566778899aabbccddeeff",
- "msg": "00000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "result": "valid",
- "tag": "99b381bfa2af9751c39d1b6e86d1be6a",
- "tcId": 20
- },
- {
- "aad": "",
- "comment": "J0:000102030405060708090a0bffffffff",
- "ct": "127af9b39ecdfc57bb11a2847c7c2d3d8f938f40f877e0c4af37d0fe9af033052bd537c4ae978f60",
- "iv": "99821c2dd5daecded07300f577f7aff1",
- "key": "00112233445566778899aabbccddeeff",
- "msg": "00000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "result": "valid",
- "tag": "07eb2fe4a958f8434d40684899507c7c",
- "tcId": 21
- },
- {
- "aad": "",
- "comment": "J0:000102030405060708090a0bfffffffe",
- "ct": "0cf6ae47156b14dce03c8a07a2e172b1127af9b39ecdfc57bb11a2847c7c2d3d8f938f40f877e0c4",
- "iv": "5e4a3900142358d1c774d8d124d8d27d",
- "key": "00112233445566778899aabbccddeeff",
- "msg": "00000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "result": "valid",
- "tag": "f145c2dcaf339eede427be934357eac0",
- "tcId": 22
- },
- {
- "aad": "",
- "comment": "special case",
- "ct": "1cd5a06214235ceb044d4bad7b047312",
- "iv": "ffffffffffffffffffffffffffffffff",
- "key": "00112233445566778899aabbccddeeff",
- "msg": "4d82639c39d3f3490ee903dd0be7afcf",
- "result": "valid",
- "tag": "ffffffffffffffffffffffffffffffff",
- "tcId": 23
- },
- {
- "aad": "",
- "comment": "unusual IV size",
- "ct": "d6db136eb9bd4cdaf0bd1913",
- "iv": "44b926c2a249611e14475b6cfe4d7dae",
- "key": "c79117e417d6d45e37a52441cbfaa47b",
- "msg": "623734365060575b423b303a",
- "result": "valid",
- "tag": "54132cb206112184c889e1f15b83fe1f",
- "tcId": 24
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 96,
- "keySize": 256,
- "tagSize": 128,
- "tests": [
- {
- "aad": "00000000ffffffff",
- "comment": "",
- "ct": "e27abdd2d2a53d2f136b",
- "iv": "00112233445566778899aabb",
- "key": "92ace3e348cd821092cd921aa3546374299ab46209691bc28b8752d17f123c20",
- "msg": "00010203040506070809",
- "result": "valid",
- "tag": "9a4a2579529301bcfb71c78d4060f52c",
- "tcId": 25
- },
- {
- "aad": "aabbccddeeff",
- "comment": "",
- "ct": "",
- "iv": "00112233445566778899aabb",
- "key": "29d3a44f8723dc640239100c365423a312934ac80239212ac3df3421a2098123",
- "msg": "",
- "result": "valid",
- "tag": "2a7d77fa526b8250cb296078926b5020",
- "tcId": 26
- },
- {
- "aad": "",
- "comment": "",
- "ct": "11",
- "iv": "61de8c2f27065bb3f1235d55",
- "key": "a68e06009f0c9630fed700e67d4960378cc1c86ae6cc79a6ac6a9042bf83039a",
- "msg": "7a",
- "result": "valid",
- "tag": "05402b6d9671f281c34848fed708da8b",
- "tcId": 27
- },
- {
- "aad": "",
- "comment": "",
- "ct": "aecefdde647dbfd9",
- "iv": "27f3c472caf75d6102ef5f0d",
- "key": "fe65ab5e97e2adff16bb5cf71f31d09754ce2a246aeaedc5647afb54dce7b68d",
- "msg": "493d425c4b3f6d51",
- "result": "valid",
- "tag": "02af89a1eadcb29077a26203314a7dc3",
- "tcId": 28
- },
- {
- "aad": "",
- "comment": "",
- "ct": "3ddf2af410318b26750139bf4ec13460",
- "iv": "6f5485754cd243aecd2c9e43",
- "key": "9c6edc8b05d7bceb455a6b915f16f117e244ff788a8c20c25fd6e0a49566d781",
- "msg": "5031613a625a7348753b323c4f3f7835",
- "result": "valid",
- "tag": "4e4bc7648e7fb0976c4cb9c2fb3ca540",
- "tcId": 29
- },
- {
- "aad": "",
- "comment": "",
- "ct": "28bbe0d13c0f43422df882a2dc9e011b4d4fd5bc9e73c515",
- "iv": "3d3f629413e65f8b6e55ec8e",
- "key": "c786bc3074dad0f11efecfd24dd9f9df9fec79161d1ffd5acb18fc69fe3f3e0f",
- "msg": "635569643f32513f655a6e5c423547744259725e454b616d",
- "result": "valid",
- "tag": "bbf623568c0bd3b94b5201af8711a8d2",
- "tcId": 30
- },
- {
- "aad": "45",
- "comment": "",
- "ct": "69c3ee7e6d4bae0d747164980d6b9b0c",
- "iv": "c0dfc8a34a8c946504f882c5",
- "key": "44a85d703964debdf04efe8748c7953da193ecd7ce4453673d86b96c5a1b3154",
- "msg": "5a416a725a6d69746269316f6c747566",
- "result": "valid",
- "tag": "5221ece0acc54017981f0cdad17839b2",
- "tcId": 31
- },
- {
- "aad": "e19b62570639e9329109d81795f82f",
- "comment": "",
- "ct": "54d25cd9f65a56ee17a4cb88fbc7489d",
- "iv": "6f6a2fc05f916819550e1ec0",
- "key": "afc8d84a39c7b984670d42712c1e6b86aa8bf9458e20054da9aa4de627aadb69",
- "msg": "45353c45306243584277445f317a355a",
- "result": "valid",
- "tag": "8e535d739362959710ec3ddb486e8bc2",
- "tcId": 32
- },
- {
- "aad": "d0468a40ded0439cdf41cfa5662181d8",
- "comment": "",
- "ct": "ec23144c64749090e581928d86681f3e",
- "iv": "b74599e72c0309e162658615",
- "key": "62f210a5cdfaa9c341c5c25ca1510fbbe611d433091d064eb62dbbcfbc95f15b",
- "msg": "5a6551343a4b45685c49795b5a557449",
- "result": "valid",
- "tag": "ce0594dabb2b4db89460e085bc44e684",
- "tcId": 33
- },
- {
- "aad": "6387afe729e73233e3860de9c1a6617b37bab1eedaba9fcb53618e7eac3d8009",
- "comment": "",
- "ct": "fcfc653448912e1d9f5413dc92c7678b",
- "iv": "74852c78eb5a479ec8620ae4",
- "key": "34135b6afae2248312d68c1e28db5a4cbbfd3ccc5b4aab357353bd2541d45c59",
- "msg": "34356b523f4a6d5c3237325043353e50",
- "result": "valid",
- "tag": "1b3acf71c1fdcfa8d61d585d10004f6d",
- "tcId": 34
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 96,
- "keySize": 192,
- "tagSize": 128,
- "tests": [
- {
- "aad": "",
- "comment": "",
- "ct": "7a",
- "iv": "e6bfc54c87a8e2a9b539eedb",
- "key": "6c7a0c4c8515ed6c7d4eca4916bb0c8362d282afeacbe3f9",
- "msg": "3c",
- "result": "valid",
- "tag": "106daeade85585d997e65bc4564fe125",
- "tcId": 35
- },
- {
- "aad": "",
- "comment": "",
- "ct": "16f812c2be4121b6",
- "iv": "6d7baec9ed558f82aa1128cd",
- "key": "35a0d16c02ec630e360e9d7243a82c76ac36668c0b59413e",
- "msg": "5c513c3a74763674",
- "result": "valid",
- "tag": "f35ba677c07a76aea8e70a81918d35cf",
- "tcId": 36
- },
- {
- "aad": "",
- "comment": "",
- "ct": "21c250e0f28c494c944bd1345d6daa51",
- "iv": "cffd1a7e8d52cf3c0c4bbb8e",
- "key": "ddeb7f10bbd1b82c115165e6c1547d224e3449933ea3bfe9",
- "msg": "526a3b4e7472324a5b3a5b553b4b443f",
- "result": "valid",
- "tag": "bbaea6623cf22328efcd21bf3656987e",
- "tcId": 37
- },
- {
- "aad": "",
- "comment": "",
- "ct": "034c477eee703e11b0f354d5912c16fd512c69cccbc22211",
- "iv": "56f2119df4070d2e767861e8",
- "key": "b567dc2ed4684ccfb582d80ff9b15ef520a325f0b8201cdc",
- "msg": "306c3e337a60677956536e346472534679707a6552624e3f",
- "result": "valid",
- "tag": "d8ecc0925d544d9e2906504e4f006bea",
- "tcId": 38
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 120,
- "keySize": 128,
- "tagSize": 128,
- "tests": [
- {
- "aad": "",
- "comment": "unusual IV size",
- "ct": "fde7899c326af98d67b07890",
- "iv": "ca2a23ea38e82a4304021e0984800c",
- "key": "a9ded7b2cbce3621d310006444ce80a3",
- "msg": "665470423738756779357345",
- "result": "valid",
- "tag": "a545ed6b98a8b49c6588232e3d876de7",
- "tcId": 39
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 160,
- "keySize": 128,
- "tagSize": 128,
- "tests": [
- {
- "aad": "",
- "comment": "unusual IV size",
- "ct": "35a123fa123571aa0d242a66",
- "iv": "9ce715dd2a59b4a6bf7451c7a144b97f3e62c0a0",
- "key": "1e7cc3c9116b0a2d25154e1f4ae97796",
- "msg": "6c74623b3346665333613c3d",
- "result": "valid",
- "tag": "831a00839d8c008c9d1cb0f9a8d17255",
- "tcId": 40
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 64,
- "keySize": 256,
- "tagSize": 128,
- "tests": [
- {
- "aad": "",
- "comment": "unusual IV size",
- "ct": "99add354679e324c3277506c",
- "iv": "bd3b080f33229c69",
- "key": "b22f6e946ab41994781b4bfff1e3f44e3daaf4d9ad788bbfa39a8caa2bc112cf",
- "msg": "3b353b365e37784a5833354c",
- "result": "valid",
- "tag": "174fd057b60654548d833f9d6d9626e8",
- "tcId": 41
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 120,
- "keySize": 256,
- "tagSize": 128,
- "tests": [
- {
- "aad": "",
- "comment": "unusual IV size",
- "ct": "992b01084e37fbe3a6cfd456",
- "iv": "479e398a4805a347a5c4c16ddfe621",
- "key": "0d20b8ef8b05c48f691a5dd9b49b6c0637aee0567257b6c3ce35a5823c337294",
- "msg": "527979696037335d553a4767",
- "result": "valid",
- "tag": "1cd717548e768aa0f9932311d443bf0e",
- "tcId": 42
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 128,
- "keySize": 256,
- "tagSize": 128,
- "tests": [
- {
- "aad": "",
- "comment": "unusual IV size",
- "ct": "fa93631a76a63d8096bb11f3",
- "iv": "ad581e8f55a8d283f0dfebae9d0c6484",
- "key": "cc4a246cb3e166c194e59f465db9adf92a8974cd472744c062728ccbae687aac",
- "msg": "6b4d3e67695a79544b725046",
- "result": "valid",
- "tag": "fb1c7f1c3d5c0155ae18eb9bc13f7758",
- "tcId": 43
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 160,
- "keySize": 256,
- "tagSize": 128,
- "tests": [
- {
- "aad": "",
- "comment": "unusual IV size",
- "ct": "b35920ed04f6a7dcf8d075a9",
- "iv": "3293e555aa1cb29f839d571e811b8e84807a0031",
- "key": "3a95937dd23f0997fae31a26821d99e8e338016c05ad30718f41fa04aced12f8",
- "msg": "5578554a61324e4c3142483a",
- "result": "valid",
- "tag": "fa0c75f97432e5ef97445ccf99a90231",
- "tcId": 44
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 0,
- "keySize": 128,
- "tagSize": 128,
- "tests": [
- {
- "aad": "",
- "comment": "0 size IV is not valid",
- "ct": "",
- "iv": "",
- "key": "b1e11d771f1ea274a3386d3879738d64",
- "msg": "",
- "result": "invalid",
- "tag": "ec5c4805da277942d7ad6ea2d212d909",
- "tcId": 45
- },
- {
- "aad": "",
- "comment": "0 size IV is not valid",
- "ct": "8766b19d2e07b51ddfe8c85ea440ee2e",
- "iv": "",
- "key": "fb6c0503a1cd5219a2d5daa2e32a1520",
- "msg": "446e39493339594b7247494d41344739",
- "result": "invalid",
- "tag": "5154e473735b026452a57060f3be5f66",
- "tcId": 46
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 0,
- "keySize": 192,
- "tagSize": 128,
- "tests": [
- {
- "aad": "",
- "comment": "0 size IV is not valid",
- "ct": "",
- "iv": "",
- "key": "0955fa25af91994f0407ff1e2f3b09af4074c13fbba6aa0b",
- "msg": "",
- "result": "invalid",
- "tag": "bec27fcd432323a3162cbcfc4a4ae53b",
- "tcId": 47
- },
- {
- "aad": "",
- "comment": "0 size IV is not valid",
- "ct": "a284cb5110f73225954d0a74fc24b024",
- "iv": "",
- "key": "0750d0d5d4df4985fcc726177e6b325e90c7e9c5f4922e43",
- "msg": "793b50665c4c79647534646231496748",
- "result": "invalid",
- "tag": "8fe5ddb632fa6d72af5fe114c95bcaa3",
- "tcId": 48
- }
- ],
- "type": "AES-GCM"
- },
- {
- "ivSize": 0,
- "keySize": 256,
- "tagSize": 128,
- "tests": [
- {
- "aad": "",
- "comment": "0 size IV is not valid",
- "ct": "",
- "iv": "",
- "key": "57163950d52c957068dc2ae7184911402887458e65ae212e54369eac864376a8",
- "msg": "",
- "result": "invalid",
- "tag": "6397e0239baa358c90bc5a8bb69d3330",
- "tcId": 49
- },
- {
- "aad": "",
- "comment": "0 size IV is not valid",
- "ct": "77bbd2bc21a7cb2f1b62510a659db421",
- "iv": "",
- "key": "c242c762169e049fa7952d14123f61add08f9cd3cdb0784d7241f073244f0580",
- "msg": "3669513131313f386240783b573b666f",
- "result": "invalid",
- "tag": "b2015bf3387d68cd2e9785d0b8bc46c8",
- "tcId": 50
- }
- ],
- "type": "AES-GCM"
- }
- ]
-}
diff --git a/testvectors/dsa_test.json b/testvectors/dsa_test.json
deleted file mode 100644
index a3c78c6..0000000
--- a/testvectors/dsa_test.json
+++ /dev/null
@@ -1,1494 +0,0 @@
-{
- "algorithm" : "DSA",
- "generatorVersion" : "0.0a10",
- "numberOfTests" : 206,
- "testGroups" : [
- {
- "keyDer" : "3081f03081a806072a8648ce38040130819c024100fca682ce8e12caba26efccf7110e526db078b05edecbcd1eb4a208f3ae1617ae01f35b91a47e6df63413c5e12ed0899bcd132acd50d99151bdc43ee737592e17021500962eddcc369cba8ebb260ee6b6a126d9346e38c50240678471b27a9cf44ee91a49c5147db1a9aaf244f05a434d6486931d2d14271b9e35030b71fd73da179069b32e2935630e1c2062354d0da20a6c416e50be794ca403430002407cc153f191171bdf13b6541c07dc611debc41efa18e1df5c2e42c2612e0e936abdcc28e66ce73bdedf449b5d39ec8e509a4767907345f38710638abe5c316ce5",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIHwMIGoBgcqhkjOOAQBMIGcAkEA/KaCzo4Syrom78z3EQ5SbbB4sF7ey80etKII\n864WF64B81uRpH5t9jQTxeEu0ImbzRMqzVDZkVG9xD7nN1kuFwIVAJYu3cw2nLqO\nuyYO5rahJtk0bjjFAkBnhHGyepz0TukaScUUfbGpqvJE8FpDTWSGkx0tFCcbnjUD\nC3H9c9oXkGmzLik1Yw4cIGI1TQ2iCmxBblC+eUykA0MAAkB8wVPxkRcb3xO2VBwH\n3GEd68Qe+hjh31wuQsJhLg6Tar3MKOZs5zve30SbXTnsjlCaR2eQc0XzhxBjir5c\nMWzl\n-----END PUBLIC KEY-----",
- "sha" : "SHA-1",
- "type" : "DSAVer",
- "key" : {
- "g" : "678471b27a9cf44ee91a49c5147db1a9aaf244f05a434d6486931d2d14271b9e35030b71fd73da179069b32e2935630e1c2062354d0da20a6c416e50be794ca4",
- "keyType" : "DSA public key",
- "p" : "0fca682ce8e12caba26efccf7110e526db078b05edecbcd1eb4a208f3ae1617ae01f35b91a47e6df63413c5e12ed0899bcd132acd50d99151bdc43ee737592e17",
- "q" : "0962eddcc369cba8ebb260ee6b6a126d9346e38c5",
- "y" : "7cc153f191171bdf13b6541c07dc611debc41efa18e1df5c2e42c2612e0e936abdcc28e66ce73bdedf449b5d39ec8e509a4767907345f38710638abe5c316ce5"
- },
- "tests" : [
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "302c021426184de880bd04090541530d4951dffb2200b2cf02143c2cfef8b2c62eb572547f173fb4973ac7225207",
- "tcId" : 1
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "302c02141c71bdda8343c3b8c8503772a3dca7f5ebc3e018021421c7aff53838a6ee5fdf4c4b66f7ae67241021f1",
- "tcId" : 2
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "302c02142b6a1d97f043cf8ac1574af5eae78b3d01e444e80214787affc9a23bf98848ccb99a0339ef9ec7ae767e",
- "tcId" : 3
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "302d02150087e0e4ae54fe9fa55abe4914380dccd7d546eee902147a075d0115c06d17194665739ab713a0734b3d36",
- "tcId" : 4
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "302c02144ce8e8d2abb5f230a5fdcf6f2d8f81bb1b80ed5502140d63dbfd1100d3caf0580d93101f21e699633a56",
- "tcId" : 5
- }
- ]
- },
- {
- "keyDer" : "308203423082023506072a8648ce3804013082022802820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d0282010016a65c58204850704e7502a39757040d34da3a3478c154d4e4a5c02d242ee04f96e61e4bd0904abdac8f37eeb1e09f3182d23c9043cb642f88004160edf9ca09b32076a79c32a627f2473e91879ba2c4e744bd2081544cb55b802c368d1fa83ed489e94e0fa0688e32428a5c78c478c68d0527b71c9a3abb0b0be12c44689639e7d3ce74db101a65aa2b87f64c6826db3ec72f4b5599834bb4edb02f7c90e9a496d3a55d535bebfc45d4f619f63f3dedbb873925c2f224e07731296da887ec1e4748f87efb5fdeb75484316b2232dee553ddaf02112b0d1f02da30973224fe27aeda8b9d4b2922d9ba8be39ed9e103a63c52810bc688b7e2ed4316e1ef17dbde0382010500028201001e77f842b1ae0fcd9929d394161d41e14614ff7507a9a31f4a1f14d22e2a627a1f4e596624883f1a5b168e9425146f22d5f6ee28757414714bb994ba1129f015d6e04a717edf9b530a5d5cab94f14631e8b4cf79aeb358cc741845553841e8ac461630e804a62f43676ba6794af66899c377b869ea612a7b9fe6611aa96be52eb8b62c979117bbbcca8a7ec1e1ffab1c7dfcfc7048700d3ae3858136e897701d7c2921b5dfef1d1f897f50d96ca1b5c2edc58cada18919e35642f0807eebfa00c99a32f4d095c3188f78ed54711be0325c4b532aeccd6540a567c327225440ea15319bde06510479a1861799e25b57decc73c036d75a0702bd373ca231349931",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIIDQjCCAjUGByqGSM44BAEwggIoAoIBAQCPeTXZuarpv6vtiHrPSVG28y7Fnjuv\nNxjo6sSWHz79NgbnQ1GpxBgzObgJ58KuHFObp0dbhdARrbi0eYd1SYRpXKwOjxSz\nNggooi/6JxEKPWKpk0U0CaD+aWxGWPhL3SCBnDcJoBBXsZWtzQAjPbpUhLYpH51k\njviDRIZ3l5zsBLQ0pqwudemYXeI9sCkvwRGMn/qdgYHnM423krcw17njSVkvaAmY\nchU5Feo9a4tGU8YzRY+AOzKkwuDycpAlbk4/ijsIOKHEUOThjBopo33fXqFD3ktm\n/wSQPtXPFiPhWNSHxgjpfyEc2B3KI8tuOAdl+CLjQr5ITAV2OTlgHNZnAh0AuvaW\npoV499/e5/pnyXfHhe8ysjO65YDAvNVpXQKCAQAWplxYIEhQcE51AqOXVwQNNNo6\nNHjBVNTkpcAtJC7gT5bmHkvQkEq9rI837rHgnzGC0jyQQ8tkL4gAQWDt+coJsyB2\np5wypifyRz6Rh5uixOdEvSCBVEy1W4AsNo0fqD7UielOD6BojjJCilx4xHjGjQUn\ntxyaOrsLC+EsRGiWOefTznTbEBplqiuH9kxoJts+xy9LVZmDS7TtsC98kOmkltOl\nXVNb6/xF1PYZ9j897buHOSXC8iTgdzEpbaiH7B5HSPh++1/et1SEMWsiMt7lU92v\nAhErDR8C2jCXMiT+J67ai51LKSLZuovjntnhA6Y8UoELxoi34u1DFuHvF9veA4IB\nBQACggEAHnf4QrGuD82ZKdOUFh1B4UYU/3UHqaMfSh8U0i4qYnofTllmJIg/GlsW\njpQlFG8i1fbuKHV0FHFLuZS6ESnwFdbgSnF+35tTCl1cq5TxRjHotM95rrNYzHQY\nRVU4QeisRhYw6ASmL0Nna6Z5SvZomcN3uGnqYSp7n+ZhGqlr5S64tiyXkRe7vMqK\nfsHh/6scffz8cEhwDTrjhYE26JdwHXwpIbXf7x0fiX9Q2WyhtcLtxYytoYkZ41ZC\n8IB+6/oAyZoy9NCVwxiPeO1UcRvgMlxLUyrszWVApWfDJyJUQOoVMZveBlEEeaGG\nF5niW1fezHPANtdaBwK9NzyiMTSZMQ==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-224",
- "type" : "DSAVer",
- "key" : {
- "g" : "16a65c58204850704e7502a39757040d34da3a3478c154d4e4a5c02d242ee04f96e61e4bd0904abdac8f37eeb1e09f3182d23c9043cb642f88004160edf9ca09b32076a79c32a627f2473e91879ba2c4e744bd2081544cb55b802c368d1fa83ed489e94e0fa0688e32428a5c78c478c68d0527b71c9a3abb0b0be12c44689639e7d3ce74db101a65aa2b87f64c6826db3ec72f4b5599834bb4edb02f7c90e9a496d3a55d535bebfc45d4f619f63f3dedbb873925c2f224e07731296da887ec1e4748f87efb5fdeb75484316b2232dee553ddaf02112b0d1f02da30973224fe27aeda8b9d4b2922d9ba8be39ed9e103a63c52810bc688b7e2ed4316e1ef17dbde",
- "keyType" : "DSA public key",
- "p" : "08f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667",
- "q" : "0baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d",
- "y" : "1e77f842b1ae0fcd9929d394161d41e14614ff7507a9a31f4a1f14d22e2a627a1f4e596624883f1a5b168e9425146f22d5f6ee28757414714bb994ba1129f015d6e04a717edf9b530a5d5cab94f14631e8b4cf79aeb358cc741845553841e8ac461630e804a62f43676ba6794af66899c377b869ea612a7b9fe6611aa96be52eb8b62c979117bbbcca8a7ec1e1ffab1c7dfcfc7048700d3ae3858136e897701d7c2921b5dfef1d1f897f50d96ca1b5c2edc58cada18919e35642f0807eebfa00c99a32f4d095c3188f78ed54711be0325c4b532aeccd6540a567c327225440ea15319bde06510479a1861799e25b57decc73c036d75a0702bd373ca231349931"
- },
- "tests" : [
- {
- "comment" : "valid",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 6
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303c021c5970bf65c8cd0da10edfe80430ab0b456cefbc3913116a31f024f240021c58ca06a899c7fadedb2d31abf917f9de2e4b97d1b3c323de04fd519d",
- "tcId" : 7
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303d021c00ff3f02204b98d07a502c00ff8a59a41497c38f5193e68ccc16d080021d00b51491eae8112ce48ed85896ba2632cd90fd02e83a7a17a420157b0e",
- "tcId" : 8
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303d021c39fcb3f986c4fb681f2f5d4a50dd9b3b898ca8df674fbf2760666294021d00b0205076df3997e815fefa0a20e33700460ec66f53415799eb58802a",
- "tcId" : 9
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303e021d008588cdf67cff154f19b9007b0b9e8149902c24771435c02c807713e5021d008595d7291eabc7bd81dc7566544e8abba81b764d4edb0dc619cf14c0",
- "tcId" : 10
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303c021c521c90b08df83c821e329c7275b88648a9c16031b3acd223806a61bd021c6443cc6666b43702f1a158430ce20529883b03e02ce2d6869c62084e",
- "tcId" : 11
- },
- {
- "comment" : "Legacy:ASN encoding of s misses leading 0",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "303c021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021cade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 12
- },
- {
- "comment" : "BER:long form encoding of length",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "30813d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 13
- },
- {
- "comment" : "BER:long form encoding of length",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "303e02811c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 14
- },
- {
- "comment" : "BER:long form encoding of length",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "303e021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd02811d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 15
- },
- {
- "comment" : "BER:length contains leading 0",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "3082003d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 16
- },
- {
- "comment" : "BER:length contains leading 0",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "303f0282001c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 17
- },
- {
- "comment" : "BER:length contains leading 0",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "303f021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0282001d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 18
- },
- {
- "comment" : "BER:indefinite length",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "3080021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360000",
- "tcId" : 19
- },
- {
- "comment" : "BER:prepending 0's to integer",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "303f021e00001e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 20
- },
- {
- "comment" : "BER:prepending 0's to integer",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "303f021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021f000000ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 21
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 22
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303c021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 23
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021d1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 24
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021b1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 25
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021e00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 26
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021c00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 27
- },
- {
- "comment" : "uint32 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3085010000003d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 28
- },
- {
- "comment" : "uint32 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30420285010000001c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 29
- },
- {
- "comment" : "uint32 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3042021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0285010000001d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 30
- },
- {
- "comment" : "uint64 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "308901000000000000003d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 31
- },
- {
- "comment" : "uint64 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046028901000000000000001c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 32
- },
- {
- "comment" : "uint64 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd028901000000000000001d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 33
- },
- {
- "comment" : "length = 2**31 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30847fffffff021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 34
- },
- {
- "comment" : "length = 2**31 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304102847fffffff1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 35
- },
- {
- "comment" : "length = 2**31 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3041021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd02847fffffff00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 36
- },
- {
- "comment" : "length = 2**32 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3084ffffffff021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 37
- },
- {
- "comment" : "length = 2**32 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30410284ffffffff1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 38
- },
- {
- "comment" : "length = 2**32 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3041021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0284ffffffff00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 39
- },
- {
- "comment" : "length = 2**40 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3085ffffffffff021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 40
- },
- {
- "comment" : "length = 2**40 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30420285ffffffffff1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 41
- },
- {
- "comment" : "length = 2**40 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3042021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0285ffffffffff00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 42
- },
- {
- "comment" : "length = 2**64 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3088ffffffffffffffff021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 43
- },
- {
- "comment" : "length = 2**64 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30450288ffffffffffffffff1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 44
- },
- {
- "comment" : "length = 2**64 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0288ffffffffffffffff00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 45
- },
- {
- "comment" : "incorrect length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30ff021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 46
- },
- {
- "comment" : "incorrect length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d02ff1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 47
- },
- {
- "comment" : "incorrect length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd02ff00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 48
- },
- {
- "comment" : "indefinte length without termination",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3080021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 49
- },
- {
- "comment" : "indefinte length without termination",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d02801e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 50
- },
- {
- "comment" : "indefinte length without termination",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd028000ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 51
- },
- {
- "comment" : "removing sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "",
- "tcId" : 52
- },
- {
- "comment" : "appending 0's to sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360000",
- "tcId" : 53
- },
- {
- "comment" : "prepending 0's to sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f0000021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 54
- },
- {
- "comment" : "appending unused 0's",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360000",
- "tcId" : 55
- },
- {
- "comment" : "appending unused 0's",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0000021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 56
- },
- {
- "comment" : "appending null value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360500",
- "tcId" : 57
- },
- {
- "comment" : "appending null value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f021e1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0500021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 58
- },
- {
- "comment" : "appending null value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021f00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360500",
- "tcId" : 59
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3042498177303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 60
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30412500303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 61
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360004deadbeef",
- "tcId" : 62
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30422221498177021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 63
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304122202500021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 64
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045221e021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0004deadbeef021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 65
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3042021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd2222498177021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 66
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3041021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd22212500021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 67
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd221f021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360004deadbeef",
- "tcId" : 68
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045aa00bb00cd00303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 69
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3043aa02aabb303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 70
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30452224aa00bb00cd00021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 71
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30432222aa02aabb021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 72
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd2225aa00bb00cd00021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 73
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3043021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd2223aa02aabb021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 74
- },
- {
- "comment" : "using composition with indefinite length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3080303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360000",
- "tcId" : 75
- },
- {
- "comment" : "using composition with indefinite length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30412280021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0000021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 76
- },
- {
- "comment" : "using composition with indefinite length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3041021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd2280021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360000",
- "tcId" : 77
- },
- {
- "comment" : "using composition with wrong tag",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3080313d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360000",
- "tcId" : 78
- },
- {
- "comment" : "using composition with wrong tag",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30412280031c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0000021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 79
- },
- {
- "comment" : "using composition with wrong tag",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3041021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd2280031d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360000",
- "tcId" : 80
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "2e3d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 81
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "323d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 82
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ff3d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 83
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d001c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 84
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d041c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 85
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303dff1c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 86
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd001d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 87
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd041d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 88
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cdff1d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 89
- },
- {
- "comment" : "dropping value of sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3000",
- "tcId" : 90
- },
- {
- "comment" : "using composition",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3041300102303c1c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 91
- },
- {
- "comment" : "using composition",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3041222002011e021b41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 92
- },
- {
- "comment" : "using composition",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3041021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd2221020100021cade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 93
- },
- {
- "comment" : "truncate sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303c021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862",
- "tcId" : 94
- },
- {
- "comment" : "truncate sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303c1c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 95
- },
- {
- "comment" : "prepend empty sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f3000021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 96
- },
- {
- "comment" : "append empty sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862363000",
- "tcId" : 97
- },
- {
- "comment" : "sequence of sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 98
- },
- {
- "comment" : "truncated sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "301e021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd",
- "tcId" : 99
- },
- {
- "comment" : "repeat element in sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "305c021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 100
- },
- {
- "comment" : "removing integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "301f021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 101
- },
- {
- "comment" : "appending 0's to integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f021e1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0000021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 102
- },
- {
- "comment" : "appending 0's to integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303f021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021f00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862360000",
- "tcId" : 103
- },
- {
- "comment" : "dropping value of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30210200021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 104
- },
- {
- "comment" : "dropping value of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3020021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd0200",
- "tcId" : 105
- },
- {
- "comment" : "modify first byte of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1f41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 106
- },
- {
- "comment" : "modify first byte of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d01ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 107
- },
- {
- "comment" : "modify last byte of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cc021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 108
- },
- {
- "comment" : "modify last byte of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786237",
- "tcId" : 109
- },
- {
- "comment" : "truncate integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303c021b1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 110
- },
- {
- "comment" : "truncate integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303c021b41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 111
- },
- {
- "comment" : "truncate integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303c021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021c00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe87862",
- "tcId" : 112
- },
- {
- "comment" : "leading ff in integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021dff1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 113
- },
- {
- "comment" : "leading ff in integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021eff00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 114
- },
- {
- "comment" : "infinity",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022090180021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 115
- },
- {
- "comment" : "infinity",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3021021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd090180",
- "tcId" : 116
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d00d9384b2032d060e59848f87cb4535936bc25fa77959e96d7f88e332a021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 117
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021dff634b1dd327de7125da7903ad2163ca2addc096101fd395567ee36070021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 118
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021ce1be4b8652a896fa469f01eb15246e4f330cb7bc2546e9e8c4473633021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 119
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d009cb4e22cd8218eda2586fc52de9c35d5223f69efe02c6aa9811c9f90021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 120
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021dff26c7b4dfcd2f9f1a67b707834baca6c943da05886a6169280771ccd6021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 121
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d011e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 122
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d00e1be4b8652a896fa469f01eb15246e4f330cb7bc2546e9e8c4473633021d00ade65988d237d30f9ef41dd424a4e1c8f16967cf3365813fe8786236",
- "tcId" : 123
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021d0168dcf02f57b0caef7ddc183bee1ca94ee09c1a02ee4b0200a54dcb93",
- "tcId" : 124
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303c021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021cf2efc2e24cbedb2fc00c236c5b2d1a430236b59b7880007f2ba2f8d9",
- "tcId" : 125
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021dff5219a6772dc82cf0610be22bdb5b1e370e969830cc9a7ec017879dca",
- "tcId" : 126
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303c021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021c0d103d1db34124d03ff3dc93a4d2e5bcfdc94a64877fff80d45d0727",
- "tcId" : 127
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303d021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021dfe97230fd0a84f35108223e7c411e356b11f63e5fd11b4fdff5ab2346d",
- "tcId" : 128
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303c021c1e41b479ad576905b960fe14eadb91b0ccf34843dab916173bb8c9cd021c5219a6772dc82cf0610be22bdb5b1e370e969830cc9a7ec017879dca",
- "tcId" : 129
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022020100021dff450969597a870820211805983688387a10cd4dcc451a7f3f432a96a3",
- "tcId" : 130
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3006020100020100",
- "tcId" : 131
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3006020100020101",
- "tcId" : 132
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30060201000201f0",
- "tcId" : 133
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022020100021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d",
- "tcId" : 134
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022020100021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e",
- "tcId" : 135
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022020100021d0100000000000000000000000000000000000000000000000000000000",
- "tcId" : 136
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082010802010002820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667",
- "tcId" : 137
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3008020100090380fe01",
- "tcId" : 138
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022020101021dff450969597a870820211805983688387a10cd4dcc451a7f3f432a96a3",
- "tcId" : 139
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3006020101020100",
- "tcId" : 140
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3006020101020101",
- "tcId" : 141
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30060201010201f0",
- "tcId" : 142
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022020101021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d",
- "tcId" : 143
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022020101021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e",
- "tcId" : 144
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022020101021d0100000000000000000000000000000000000000000000000000000000",
- "tcId" : 145
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082010802010102820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667",
- "tcId" : 146
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3008020101090380fe01",
- "tcId" : 147
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30220201f0021dff450969597a870820211805983688387a10cd4dcc451a7f3f432a96a3",
- "tcId" : 148
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30060201f0020100",
- "tcId" : 149
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30060201f0020101",
- "tcId" : 150
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30060201f00201f0",
- "tcId" : 151
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30220201f0021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d",
- "tcId" : 152
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30220201f0021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e",
- "tcId" : 153
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30220201f0021d0100000000000000000000000000000000000000000000000000000000",
- "tcId" : 154
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "308201080201f002820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667",
- "tcId" : 155
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30080201f0090380fe01",
- "tcId" : 156
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d021dff450969597a870820211805983688387a10cd4dcc451a7f3f432a96a3",
- "tcId" : 157
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d020100",
- "tcId" : 158
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d020101",
- "tcId" : 159
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d0201f0",
- "tcId" : 160
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d",
- "tcId" : 161
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e",
- "tcId" : 162
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d021d0100000000000000000000000000000000000000000000000000000000",
- "tcId" : 163
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30820124021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d02820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667",
- "tcId" : 164
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3024021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d090380fe01",
- "tcId" : 165
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e021dff450969597a870820211805983688387a10cd4dcc451a7f3f432a96a3",
- "tcId" : 166
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e020100",
- "tcId" : 167
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e020101",
- "tcId" : 168
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e0201f0",
- "tcId" : 169
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d",
- "tcId" : 170
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e",
- "tcId" : 171
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e021d0100000000000000000000000000000000000000000000000000000000",
- "tcId" : 172
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30820124021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e02820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667",
- "tcId" : 173
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3024021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e090380fe01",
- "tcId" : 174
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d0100000000000000000000000000000000000000000000000000000000021dff450969597a870820211805983688387a10cd4dcc451a7f3f432a96a3",
- "tcId" : 175
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022021d0100000000000000000000000000000000000000000000000000000000020100",
- "tcId" : 176
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022021d0100000000000000000000000000000000000000000000000000000000020101",
- "tcId" : 177
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3022021d01000000000000000000000000000000000000000000000000000000000201f0",
- "tcId" : 178
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d0100000000000000000000000000000000000000000000000000000000021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d",
- "tcId" : 179
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d0100000000000000000000000000000000000000000000000000000000021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e",
- "tcId" : 180
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "303e021d0100000000000000000000000000000000000000000000000000000000021d0100000000000000000000000000000000000000000000000000000000",
- "tcId" : 181
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30820124021d010000000000000000000000000000000000000000000000000000000002820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667",
- "tcId" : 182
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3024021d0100000000000000000000000000000000000000000000000000000000090380fe01",
- "tcId" : 183
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082012402820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667021dff450969597a870820211805983688387a10cd4dcc451a7f3f432a96a3",
- "tcId" : 184
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082010802820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667020100",
- "tcId" : 185
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082010802820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667020101",
- "tcId" : 186
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082010802820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd6670201f0",
- "tcId" : 187
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082012402820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d",
- "tcId" : 188
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082012402820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e",
- "tcId" : 189
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082012402820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667021d0100000000000000000000000000000000000000000000000000000000",
- "tcId" : 190
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082020a02820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd66702820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667",
- "tcId" : 191
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082010a02820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667090380fe01",
- "tcId" : 192
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3024090380fe01021dff450969597a870820211805983688387a10cd4dcc451a7f3f432a96a3",
- "tcId" : 193
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3008090380fe01020100",
- "tcId" : 194
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3008090380fe01020101",
- "tcId" : 195
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3008090380fe010201f0",
- "tcId" : 196
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3024090380fe01021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d",
- "tcId" : 197
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3024090380fe01021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695e",
- "tcId" : 198
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3024090380fe01021d0100000000000000000000000000000000000000000000000000000000",
- "tcId" : 199
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3082010a090380fe0102820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667",
- "tcId" : 200
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "300a090380fe01090380fe01",
- "tcId" : 201
- }
- ]
- },
- {
- "keyDer" : "308203423082023506072a8648ce3804013082022802820101008f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667021d00baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d0282010016a65c58204850704e7502a39757040d34da3a3478c154d4e4a5c02d242ee04f96e61e4bd0904abdac8f37eeb1e09f3182d23c9043cb642f88004160edf9ca09b32076a79c32a627f2473e91879ba2c4e744bd2081544cb55b802c368d1fa83ed489e94e0fa0688e32428a5c78c478c68d0527b71c9a3abb0b0be12c44689639e7d3ce74db101a65aa2b87f64c6826db3ec72f4b5599834bb4edb02f7c90e9a496d3a55d535bebfc45d4f619f63f3dedbb873925c2f224e07731296da887ec1e4748f87efb5fdeb75484316b2232dee553ddaf02112b0d1f02da30973224fe27aeda8b9d4b2922d9ba8be39ed9e103a63c52810bc688b7e2ed4316e1ef17dbde0382010500028201001e77f842b1ae0fcd9929d394161d41e14614ff7507a9a31f4a1f14d22e2a627a1f4e596624883f1a5b168e9425146f22d5f6ee28757414714bb994ba1129f015d6e04a717edf9b530a5d5cab94f14631e8b4cf79aeb358cc741845553841e8ac461630e804a62f43676ba6794af66899c377b869ea612a7b9fe6611aa96be52eb8b62c979117bbbcca8a7ec1e1ffab1c7dfcfc7048700d3ae3858136e897701d7c2921b5dfef1d1f897f50d96ca1b5c2edc58cada18919e35642f0807eebfa00c99a32f4d095c3188f78ed54711be0325c4b532aeccd6540a567c327225440ea15319bde06510479a1861799e25b57decc73c036d75a0702bd373ca231349931",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIIDQjCCAjUGByqGSM44BAEwggIoAoIBAQCPeTXZuarpv6vtiHrPSVG28y7Fnjuv\nNxjo6sSWHz79NgbnQ1GpxBgzObgJ58KuHFObp0dbhdARrbi0eYd1SYRpXKwOjxSz\nNggooi/6JxEKPWKpk0U0CaD+aWxGWPhL3SCBnDcJoBBXsZWtzQAjPbpUhLYpH51k\njviDRIZ3l5zsBLQ0pqwudemYXeI9sCkvwRGMn/qdgYHnM423krcw17njSVkvaAmY\nchU5Feo9a4tGU8YzRY+AOzKkwuDycpAlbk4/ijsIOKHEUOThjBopo33fXqFD3ktm\n/wSQPtXPFiPhWNSHxgjpfyEc2B3KI8tuOAdl+CLjQr5ITAV2OTlgHNZnAh0AuvaW\npoV499/e5/pnyXfHhe8ysjO65YDAvNVpXQKCAQAWplxYIEhQcE51AqOXVwQNNNo6\nNHjBVNTkpcAtJC7gT5bmHkvQkEq9rI837rHgnzGC0jyQQ8tkL4gAQWDt+coJsyB2\np5wypifyRz6Rh5uixOdEvSCBVEy1W4AsNo0fqD7UielOD6BojjJCilx4xHjGjQUn\ntxyaOrsLC+EsRGiWOefTznTbEBplqiuH9kxoJts+xy9LVZmDS7TtsC98kOmkltOl\nXVNb6/xF1PYZ9j897buHOSXC8iTgdzEpbaiH7B5HSPh++1/et1SEMWsiMt7lU92v\nAhErDR8C2jCXMiT+J67ai51LKSLZuovjntnhA6Y8UoELxoi34u1DFuHvF9veA4IB\nBQACggEAHnf4QrGuD82ZKdOUFh1B4UYU/3UHqaMfSh8U0i4qYnofTllmJIg/GlsW\njpQlFG8i1fbuKHV0FHFLuZS6ESnwFdbgSnF+35tTCl1cq5TxRjHotM95rrNYzHQY\nRVU4QeisRhYw6ASmL0Nna6Z5SvZomcN3uGnqYSp7n+ZhGqlr5S64tiyXkRe7vMqK\nfsHh/6scffz8cEhwDTrjhYE26JdwHXwpIbXf7x0fiX9Q2WyhtcLtxYytoYkZ41ZC\n8IB+6/oAyZoy9NCVwxiPeO1UcRvgMlxLUyrszWVApWfDJyJUQOoVMZveBlEEeaGG\nF5niW1fezHPANtdaBwK9NzyiMTSZMQ==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "DSAVer",
- "key" : {
- "g" : "16a65c58204850704e7502a39757040d34da3a3478c154d4e4a5c02d242ee04f96e61e4bd0904abdac8f37eeb1e09f3182d23c9043cb642f88004160edf9ca09b32076a79c32a627f2473e91879ba2c4e744bd2081544cb55b802c368d1fa83ed489e94e0fa0688e32428a5c78c478c68d0527b71c9a3abb0b0be12c44689639e7d3ce74db101a65aa2b87f64c6826db3ec72f4b5599834bb4edb02f7c90e9a496d3a55d535bebfc45d4f619f63f3dedbb873925c2f224e07731296da887ec1e4748f87efb5fdeb75484316b2232dee553ddaf02112b0d1f02da30973224fe27aeda8b9d4b2922d9ba8be39ed9e103a63c52810bc688b7e2ed4316e1ef17dbde",
- "keyType" : "DSA public key",
- "p" : "08f7935d9b9aae9bfabed887acf4951b6f32ec59e3baf3718e8eac4961f3efd3606e74351a9c4183339b809e7c2ae1c539ba7475b85d011adb8b47987754984695cac0e8f14b3360828a22ffa27110a3d62a993453409a0fe696c4658f84bdd20819c3709a01057b195adcd00233dba5484b6291f9d648ef883448677979cec04b434a6ac2e75e9985de23db0292fc1118c9ffa9d8181e7338db792b730d7b9e349592f68099872153915ea3d6b8b4653c633458f803b32a4c2e0f27290256e4e3f8a3b0838a1c450e4e18c1a29a37ddf5ea143de4b66ff04903ed5cf1623e158d487c608e97f211cd81dca23cb6e380765f822e342be484c05763939601cd667",
- "q" : "0baf696a68578f7dfdee7fa67c977c785ef32b233bae580c0bcd5695d",
- "y" : "1e77f842b1ae0fcd9929d394161d41e14614ff7507a9a31f4a1f14d22e2a627a1f4e596624883f1a5b168e9425146f22d5f6ee28757414714bb994ba1129f015d6e04a717edf9b530a5d5cab94f14631e8b4cf79aeb358cc741845553841e8ac461630e804a62f43676ba6794af66899c377b869ea612a7b9fe6611aa96be52eb8b62c979117bbbcca8a7ec1e1ffab1c7dfcfc7048700d3ae3858136e897701d7c2921b5dfef1d1f897f50d96ca1b5c2edc58cada18919e35642f0807eebfa00c99a32f4d095c3188f78ed54711be0325c4b532aeccd6540a567c327225440ea15319bde06510479a1861799e25b57decc73c036d75a0702bd373ca231349931"
- },
- "tests" : [
- {
- "comment" : "random signature",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "303c021c50ab097237324f8fc734140e23c11d515939277a182712f7914986a1021c24a4522acf7885deae134d25b679fea410f8c24afdb140c909522d14",
- "tcId" : 202
- },
- {
- "comment" : "random signature",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "303d021c79bacf75ffe84e6a2159e0152d568781f7fd41e0a14c1200b21b21b7021d00962f1d0404b0318b0e6eee0b95d22d94eb36b51b6f8884e70b973812",
- "tcId" : 203
- },
- {
- "comment" : "random signature",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "303e021d008dea6005d17a3eaad584bed597ff29ca1c91833e1d93a398640a05c9021d00a871f0d68ac9ff53e4714555c8cdc498ccd28ec4924aaf42a65c0db9",
- "tcId" : 204
- },
- {
- "comment" : "random signature",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "303d021d00b5e1ee34d2b07ec24262238d3ef3f691827780baaa2107be3131cfb9021c2bdbe0d5cffee75072c5c4c358a7b6dac45e763555430739b593c2fe",
- "tcId" : 205
- },
- {
- "comment" : "random signature",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "303d021d00adf128e21e06d3d22c819904f0be159bdedfbf21fc22843255762b07021c646f551ee7e3455f8c3299e9568c581f81d31bc1d1a0373407b18dc6",
- "tcId" : 206
- }
- ]
- }
- ]
-}
diff --git a/testvectors/ecdh_webcrypto_test.json b/testvectors/ecdh_webcrypto_test.json
deleted file mode 100644
index 87cebc9..0000000
--- a/testvectors/ecdh_webcrypto_test.json
+++ /dev/null
@@ -1,1300 +0,0 @@
-{
- "algorithm" : "ECDH",
- "generatorVersion" : "0.0a11",
- "numberOfTests" : 57,
- "testGroups" : [
- {
- "type" : "ECDHComp",
- "tests" : [
- {
- "comment" : "normal case",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "5af492c029f055e700150fdf074bbc3b376b3286a0e1a4feb267960bbb0a148e",
- "tcId" : 1,
- "private" : {
- "crv" : "P-256",
- "d" : "TEKm94QkBRnu2W9CQgBCYrabdRQ436q7mBfeypPoHIc",
- "ext" : "true",
- "kty" : "EC",
- "x" : "WyqqM6oDsZdjGfMIvj6sGGkXhyB-6RPNgCNYBbHz7F4",
- "y" : "h5IjGBoRRdQKxucb6rv-EVZwIqZv2XRLi3_rvK-dxSI"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "yISNawZIGrhSC2XREZbJe30drwGpT6gWmocmXgm12So",
- "y" : "0dac4Rq3NgDALW02mtKKwd0hPoqR-H3kK7FohxSMzkc"
- }
- },
- {
- "comment" : "normal case",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "7ee811a7cc92be6c5d6879d6399c467675c34c1f9c2261e1df4ad7d4dc4de93d192a5020feeb61712e4401cf369700ff",
- "tcId" : 2,
- "private" : {
- "crv" : "P-384",
- "d" : "XPNFF3sB7GKqQwJJE7JfjRq-9B92mXqz1v1fWh6-uQ3mnecJw5JwbbWAPsI7NhAt",
- "ext" : "true",
- "kty" : "EC",
- "x" : "ymo32uc2KIgSIck9N6h11vy4zGzXuOnw0-jvC3h_IqlOvEJ9gUXeK8XUkn7xBGvh",
- "y" : "D0e3Bgt0wn4KwyJJDKwHqV6FB7xe3afuTXKBEV7hpj_rqFQqZZsrdz8TJUqjtD5Z"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "y5F1hPIu6IHPMTVd_4jagQ4S6NqKEWrV4bF5Rr04FfqRRqWWoSBNBQVhQuK_OFur",
- "y" : "0nxF1hhtRBy9qvLFZka-r4cSfZyb86ICsdIIIJqJ6My4vouAeLucCI5TTuJqTEQ-"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "0000000000000000000000000000000000000000000000000000000000000000",
- "tcId" : 4,
- "private" : {
- "crv" : "P-256",
- "d" : "V3__4ATEMyhY8ARpZPC-Tl_iZS6vzyYWdDu8Y6sBg3k",
- "ext" : "true",
- "kty" : "EC",
- "x" : "I7gdSwHAhxe3tQ8izFrv0PsGLoIA2Mskr1QoWPE4Bi8",
- "y" : "CNN26pJpxC4OZYPeFbigQYBnb4r1OrUsf1l2wz5uIuc"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "Z_TxDYzhUV5lUiOTCuRbbYQwp1KNzMBZ7L9_8NSZzpQ",
- "y" : "PVLyBeRI9xmjw-s9oUkWNH4Vurydaps86bzHPismQWg"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "00000000ffffffff00000000ffffffff00000000ffffffff0000000100000000",
- "tcId" : 5,
- "private" : {
- "crv" : "P-256",
- "d" : "FY8M1ObgQ6QJpszBP4-649T22PFI17GyzzxJeMqUGng",
- "ext" : "true",
- "kty" : "EC",
- "x" : "SjM1g2j5_2Np3xDBYW_i7BsxFkFO2cl5OGRVGhfrHBg",
- "y" : "AvVlj5C266JG6T5Ohhu2idHQcrIjuJsbvRApRAhXQvk"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "3wOehQMUhX2O2yc_8yPZ0mb5l0jvPn_PUsqRbOs2PwM",
- "y" : "zZycmVJCIQlJaHWyUSEz7taOqXI4v_0UEJQz2sSp-Nk"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff00010001",
- "tcId" : 6,
- "private" : {
- "crv" : "P-256",
- "d" : "GQkQmmjEUaDxUMYyhE-cMN5WPQXe4YHR-Sd4b_bkD_0",
- "ext" : "true",
- "kty" : "EC",
- "x" : "cTTJ44nkV_b62xyriRhErvgE0Ul0WY8594uT18wY2eI",
- "y" : "lCFFPIrYYgK2qZCzIb8Mp6dT0-8UMEmc_HOU_R75coA"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "JdqrnBMBeqmPeE1x15Q8XnaPABJIH7yncU43kF2FTwY",
- "y" : "WPiNVKFUExBWMeKqfay65gysGzyd4XOfJ6nCv9I0oOw"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "7fff0001fffc0007fff0001fffc0007fff0001fffc0007fff0001fffc0007fff",
- "tcId" : 7,
- "private" : {
- "crv" : "P-256",
- "d" : "00-WuNQUk2E8yO_NxDljiGGOdWRVGL1sGd7JOOkPnOM",
- "ext" : "true",
- "kty" : "EC",
- "x" : "2f8GYyCcsHFQo0hGPSu8FbTOIychG7d-b7d8iEch_-0",
- "y" : "yCsGEV5BgWq-Y-7zt21qghpZVy9P3cMS09tC2DrO0QA"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "gGBkbTWiSK0C0KjZBpUn0G6pwplS9Y2mCQusShezSx4",
- "y" : "vmXp2Bh6znrY0dNYS07MxpmpV-4yfzwy6rrC3UlZetM"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "8000000000000000000000000000000000000000000000000000000000000004",
- "tcId" : 8,
- "private" : {
- "crv" : "P-256",
- "d" : "Wj2UZ9nw8WmL8VSGJ4L0NhUMjBA9iMqrImBT1zA_pcA",
- "ext" : "true",
- "kty" : "EC",
- "x" : "LXoHReBeihHt83forxIbehHNNH1VLhs1eYvKUGkKrY0",
- "y" : "uTDrHtcNtyhy-Y_6_Mc-t5e2-iOvqNWgJw7sC7AozgU"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "q8GaAT7v2FB6SxuTPVFVM8y_rSoSnqiwpxZ_Hu8ObQI",
- "y" : "nHZLhfynaWPPWAFvx1K9UdzX8z_UCU5d55A5SX550CY"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "ff00000001fffffffc00000007fffffff00000001fffffffc00000007fffffff",
- "tcId" : 9,
- "private" : {
- "crv" : "P-256",
- "d" : "X3n2bE6P1Vjxqea9LDFYrzhmrpNC6ec_AsYE0efWmbw",
- "ext" : "true",
- "kty" : "EC",
- "x" : "g35sLwD15_TqXQUHszyc5c_N9hsfLqsFp9mtBjSmqSM",
- "y" : "-UvQSiSIpJkLPEKy33MbvcJc9nENkv4QExgUBQB4HtE"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "nhtwFE914Csb_UApjwESl2tZvPbtRJHPqISi4x2-y5o",
- "y" : "SQBYhqVRzPNiih8_eNfCqRRQGc-SxYmdMbJwoisd2Fs"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "ffff00000003fffffff00000003fffffff00000003fffffff00000003fffffff",
- "tcId" : 10,
- "private" : {
- "crv" : "P-256",
- "d" : "GYByC6k5US0eYVKwWavZdx7F-OpKAbWiO-ZpsDU4Qr0",
- "ext" : "true",
- "kty" : "EC",
- "x" : "lGtMphj7_zUNmVfFHAcS9z9OCSweJ04l6DkWSLBszHE",
- "y" : "vGESfIjmiAXDa9zDhdHfBwBWWBxHmY86bc9TKCBSlng"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "cnH8JXOPBGBW9uU-OZgIAev9HXPPlGwxcmFUHywlTyc",
- "y" : "0lOb82YIt-6rvGd7oXZs_1mIcCj7D8oKEUZX5k105qg"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "tcId" : 11,
- "private" : {
- "crv" : "P-384",
- "d" : "yUtG-GHczuzVFQuXWBtPedDrkt2tG4GeX_yy6V6Hm4005blcOLYd45gjX3N8zYKq",
- "ext" : "true",
- "kty" : "EC",
- "x" : "XvcwMIRsP7gKVAjdPBhULB3ylSxbQyD1fBLFgakWnEFluAosTL2QU95E2xpVN0MV",
- "y" : "uraiwhV9ED1BvbZPq5UitbdZg33hohJRadF86SCyN7-GmNrlOhEFqnF-o7PB9rDp"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "gfuq69ezpardRLQ9VEmrstzpzpWxSRy4r1I_rOkKHg_kFSQzVn3vDNzEqQeKQHIA",
- "y" : "1oBddqoXFUrLWBx0zVJ5JUGnt0OkcjJSNEKlM_BBq6XjO5-Ctpy9uS8lpk_49ih2"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002",
- "tcId" : 12,
- "private" : {
- "crv" : "P-384",
- "d" : "0N7muMMenSJu_bYD1y3wN7FIIGFBp60fq9ZNr_DyTEDFaRab1c2PLWnxZwvU1xm8",
- "ext" : "true",
- "kty" : "EC",
- "x" : "M3DOkQjZ_j2pDm-PDGzdW88lBrWNfSolI7LyJJlsAFDO9cog1Lf_MWGm80oJDdgW",
- "y" : "FfrGsxqv2nffIfMUy1GCEzLTPOeEr2m6_0PuMW9fm2UCAMsVUCxbzBtb1nyZXvFt"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "MFLwgeT22ujEUvcNdw2mxUYaJtF-oCheDNYr6qfIRhroSvz5R3lBSMeZj0rquHhJ",
- "y" : "iJ6-sff5hF5m2LniNu0JWAGz5htREd0C9036d9S2oFubcjApcHXNohUPya1P1TM0"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff",
- "tcId" : 13,
- "private" : {
- "crv" : "P-384",
- "d" : "D7CfwAS8fz2OvdO9t33e1bFAW0fEYFQV4taAGHJVAnDNf8TmZXVFPOCvr7gpClTM",
- "ext" : "true",
- "kty" : "EC",
- "x" : "175rvtMdoJASJSXZ4VsugjNMUIB9wpGSznSKUChjy-jq47szrk23ZpiC0yBXtk-v",
- "y" : "_ZUyY4erc7k4B89v4n_kB6kTI1NBO2fxTxZabkubimochVwNvk0kbXQq41NLcZS5"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "Gb-ku-UUrJjEFct4kO-FCIkUj67HU4j2VJBeGnrPC-bmXzJUwa39tChOIc4YrTrM",
- "y" : "wZ6iWL9Z5S9L-9AbHReSxTNeSxqy56tfrGMP7cIOeP3GLip85xCl1HGyLc4gDCv_"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff",
- "tcId" : 14,
- "private" : {
- "crv" : "P-384",
- "d" : "xgpoyacaA-DRj0mqSoDPW99cNakj57inqOZIC_aljU_-ja1QnveTu5VT-IErVFaJ",
- "ext" : "true",
- "kty" : "EC",
- "x" : "lj9GrksnYrR5iKn1mIHL1IAuMP5B5Elp0Xvv27YI_PTQccaq-Ou5ntPylMUzHe1y",
- "y" : "PAwkFHgnQuMabaPPjsIvr4DdBXSR1dJ00Asz6ZyslCorTVKCbxGQDo7qTtHTWKtT"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "OCSThhnjCYVKqk07KFHarvYBy1-n5zHy71-nIFZ19yZn4wnaK3OzCDhHbvH-vfy_",
- "y" : "oc9rkMnhsPjxuRxG4YIZ4SV67wSf1mMNeF8xefnXBw9_BIO857pbbHifq6k7K3K4"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "007fff0001fffc0007fff0001fffc0007fff0001fffc0007fff0001fffc0007fff0001fffc0007fff0001fffc0008000",
- "tcId" : 15,
- "private" : {
- "crv" : "P-384",
- "d" : "I6ItVmh5RIJtO8XLTtOromnKohI1JTbDzNo0hb-Q_Ri1TJ1kkqcznWN4yBmp0zpf",
- "ext" : "true",
- "kty" : "EC",
- "x" : "wg18n8h9e5guY6l2vF7UdlWMeLKlk3X0-EBJctlkbSpOmBUKOUHLlPZ62zJcXH9c",
- "y" : "38LiWgWKuv0NRjUc8rCFo2d6Q6T98KYC-DxXD9jepg11vtF5tNqn--ofXADnusHx"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "0-m3-Cpll7v4BfekNYHAln410f-wlPXfaG2msh7DNzKZesFccMNsdDiidzq2rVQ1",
- "y" : "1qsGv2ekstg34nybDH-FzDrf0kRuKKpLVgOU9JQ81FdsH4Bb_Uh3WoK4_jXtzM_Z"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002",
- "tcId" : 16,
- "private" : {
- "crv" : "P-384",
- "d" : "bWHZtZfa2RzHtC0YGCUb-KOwmJUhqZUjgaU9rL2abeOdxqkModI_b35D3_dlS9Nh",
- "ext" : "true",
- "kty" : "EC",
- "x" : "lctf7qgcgdK9ln0siFC1KkaKiDNgE51ulveCH65ZJ1xiy_6HFWvGljuDttMUkdq-",
- "y" : "tXCGiAA0_9g8AET2oclM88neIGgDpmdHSHxslcAr0ds8Irl2sSAjraJ95NSu2gyn"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "3sfFArTfOdx4alKo4SVuMNhLAPyQM6eJFttq3Ql5rqu_i5M1lvHtYeZqIq2cH6m9",
- "y" : "QvGllFc0mOVgaAqQF_GvoXQmoVJg0QTIIabHh3Wspy7qy0irVm8dpKxzbit8qJOf"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "fff00000001fffffffc00000007fffffff00000001fffffffc00000007fffffff00000001fffffffc00000007fffffff",
- "tcId" : 17,
- "private" : {
- "crv" : "P-384",
- "d" : "mKcUqEZN55w554M6uYXPc1Kfei2DkBygNyAoQV8DtwYqmOUiECDxlyNQYludwUnG",
- "ext" : "true",
- "kty" : "EC",
- "x" : "jOm7u_gNzMp5wd3aUrkybrTPSAGQ7mmuEkYqePSD_LM3TktieWl7dcgeQ73rNLFv",
- "y" : "zCP24hQmQnEbi3iQC2VBn_1Ah-inR5ppHBgPzEvXWwFoz1lK_uzIKm69qoIgYZw9"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "zbs2N62pGygHN1n2u4O0akBKWnvmWD7qLJu4TTlhRVxXzdmh9_6AtOM4dKy2GyXX",
- "y" : "RmNU8rZfvXZjWRVtcAKs6hGWqRYXMvA0Vp5dNWqZcUnwgFnFXxk4f-3wtCsRHg6Q"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "ffffff00000003fffffff00000003fffffff00000003fffffff00000003fffffff00000003fffffff00000003fffffff",
- "tcId" : 18,
- "private" : {
- "crv" : "P-384",
- "d" : "wSOgjOGyS0THIPlyqZdqYTnSLi0UolDiO9gKInMIkThJi-77xLTiPpQdN124OyiR",
- "ext" : "true",
- "kty" : "EC",
- "x" : "U1vW-LFEqwLorzODSawOWSrZdUiiRSM_vrzMGzz1VqzGM2iIDWSW8pBYeecvvFAe",
- "y" : "UqmVNd3fqF_zdBhGbfCLoH1A2NBnuXWbnRKLgkrQM4qUJSI4zI3oLJcUBKyTbPhV"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "FX2pFpSuM62j94lwjdrK-8ppETMSLJUZoSAGdhvDkZAlFgT--DrJXnZ18GldlQQC",
- "y" : "Zajmf3FRa4jAEVbwLP3habKSJjF2jLhqUBNmh1nBnMJRjt07gEACpuwJhAxRdC_L"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffe",
- "tcId" : 19,
- "private" : {
- "crv" : "P-384",
- "d" : "xh8uHXNp6vfEyQcCNQy50MOnMVFVbRb5_mgEimS9pWMwtdYTTtFvYZfyxI1KCTB1",
- "ext" : "true",
- "kty" : "EC",
- "x" : "aIb04bpycj0d6zAvDMjTpM6T1FwDtnziNt8sQLqlAeuCKdQO619P9uwU4_tilLKq",
- "y" : "Tq3rWf3EYkB1IxTDSoWhZNpC2h7kfpGtkbfyQqzviz6RWKp4Ue1ICfu9qVZa91eu"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "q39AYquQt0BdQ6VKuiNC30e55iTHfHqs9ogJK_kunUCWu0vDsnn2tWVbYDii57go",
- "y" : "uqIRUwq6RUG3v49Sy4L-8H9Czx6RO_x0o2ZoZjVjEYcdpEv7I3rwFqO1yLcSbrRS"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "tcId" : 20,
- "private" : {
- "crv" : "P-521",
- "d" : "AVKh0rHG7Pkd3_PuLDYXWSHmODNUmBjhPcYkoayV1g3HZnZRlu1fROV3rOIloeHvRYdrFx_NB5INebN1qaUMNRqB",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AKlNmCvHHVNVD7yVQZDT0ndwQrHFb-CUb1Q5hpcyIZBfm6ztMv2w23vx6l4-7rWaxEaCGFhFuKs4UFt8JBIs3g6Z",
- "y" : "AM9y8f1YkPLcaCxYgDGJVlltBFJNpRu6tFaMueJmi_4TQPdHMfUACPTu3ZPiMOJfLAHjdj-40SuS1DE95PcxdVtE"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AS3urkDLLXtha3NhL90XI0u07sy8om0WO7EbHvsPeJgM0iufl35-RuReyDHZzV10rh-AoHn8y1zITpqxnu8oblJ_",
- "y" : "AC3Pf4WBRCJec-AxWwruShMAKA3GE5e-XD4HhAxEVsJQ8VDNT4dlBhjpmUs91Vl-Yq-nhAVSbVRceiYm8-ripeex"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 21,
- "private" : {
- "crv" : "P-521",
- "d" : "ATmak4nm7hXp1MKCw8hx9rnwRfslPzg0E48tyiLkTJq0PiUlXPIop9zJLOp_zTJxol0otFSGDMQHN7UUuOWataAG",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AVjKsZhF9cafY1ZWqEl5rWLBHKUYICfLSotbTrFxs1Gzqsp5rPvXEiGTw3JoUXUanYAiTlDO4D35pYKrehMka8e6",
- "y" : "AZpeA_ZGbMfb9gefRvzM66QJF4ywd7fX4i7bD6LxWN6X4YvP0TA-9IgEY9P8rmNtEVWNHOQ7lYMXyG3pSJXCiVmo"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "Ab3YIomLurxIHOuHAhK8KzsSUsU-YK4Gr379y2CHaIo9kgP_rh18DiXCoUEvoIIx8gwGTZzzOeRuTPbZRQo5tA8d",
- "y" : "ADD0l0D-8kB5R3GyXenua2pqLjvxMB7XKkYTVTvikv-dr7kj5-zdWAI0bvdYua9iDydcbvNBIfCqnIMrcCuN-tTv"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002",
- "tcId" : 22,
- "private" : {
- "crv" : "P-521",
- "d" : "Ae0B8AuUv5AvAslCh-nNsc5Rp3aiJaOeDq2r5hDxZOtHXDFWPlYZLG4IVeRITPyvroD8ajdheE5fLTk9xkAwLAlN",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AMJZVTWNZBnvGzroqMvz7iQ_l7EdyH_wfH82VUN-yh5HRB8Zhixc1_ZrRAFIBTRXbG3OhpnkbBynsz93elFLmrS1",
- "y" : "ADUZa4-xrZuR6TkvperZvyQpU9LA6anRWvtBpfErRRutoNOXNNqZd4iJM9UrOwgMuwD3EcjHi5LcFlU9fnhAX-4F"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AWImM20DIMkwVqKq5Oj8KGQB7lAiAamgp-MsdmgGpbGoRdHD7BC70po-yvLRKWx0j8wcvDtLBgSlN56X9IiV3_-8",
- "y" : "ALjyFlEqqyfyfxY2USOCXRU1-NNCJgg95ZaX3AwhJK2osJI_5gl6ZGsR269YSc8lvzz-DMQSkSN6izsJewFYWE35"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "00003fffffff00000003fffffff00000003fffffff00000003fffffff00000003fffffff00000003fffffff00000003fffffff00000003fffffff00000003fffffff",
- "tcId" : 23,
- "private" : {
- "crv" : "P-521",
- "d" : "AHCj4dIfcZmOPuhsdHE1_QFbirc5UuwhQSVRGJvnNfMqbvkgwJdDwoh35_rOrvDobZkMCUo2gjywt-jeb1MoTXXL",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AckwlINJRsmZceEqzmdGd6OkBOpgGt7BuIL1_1qKj8KPd0IEVzJOnMIKtllYm6mcb5CjImhB9OTMf2TfbfikDx8z",
- "y" : "AYop_NDJXvj0A2PHJ4oHLfNybIsJ_yuprFdBxil-CDxyYfOoxxKYwZJqv5dFvahgBq2pcxlUtY_edhyo3t87W5Vn"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AFRRtylPwcqFK3-rIUMWNocMLgrAOgcbHuBpzjmQe8H-F4PQb22UmMthmg5bV3HUTAUo8CN_fKYHG5Mp-vhlCDw0",
- "y" : "APnnz_jAwOl6YVA6S-X3i32oAfBRIKgvAGP6-4a1rn3bUxbbX0E6DHxyvXDHBagiswvCTcpmbgf1K2DWl0lYAdvr"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "tcId" : 24,
- "private" : {
- "crv" : "P-521",
- "d" : "AWkrrEpAH1ySoeLzWa29MPCf1d_1AGnmgl5ctM38yHn5HJnANExaKUqMBrOBv5uqqplBUFX7nNL3l4dd7WqaPFIa",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AC3_tgsEuNpiRbo91tSKWj56AQpSbGt1tXpheP-BY-x73ByOHUyH6yiBYeHcdXwi1iLr9utUubAOk0eXUANOYOfe",
- "y" : "AZPGwdcwZSHbhKuduwfvNyo44kzrWP7Hao6soA6tRAB8bWu-ZqY9VfazCp4UviSfL5npVBVlyWHrbJzm6_rZZ6u5"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "ACpQ9eN9V7C6ykS76ZP0u-UARYdeEbXT1ktF1049JBufZvm7AjNXgEIh5smS5edyPsQ2E3CpKCrRb9zBsZDfeUmm",
- "y" : "ADRPkod4ORmJNXBkni6W6xjFgQWzJYWyineMsSJcIx5SgFJzFd0wKpJ4r4NoMEQYP7Hro6pwuPb8lzsh3kXq8k3o"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "01ff00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff",
- "tcId" : 25,
- "private" : {
- "crv" : "P-521",
- "d" : "AVvfMqtnNDa9_sm8S7JMZH6FGX8Rtx3uHHwwqabohiviiTJISFwRwEdc3rrO5XcEbY0R4h2JFj2D_51KB0TsYnt6",
- "ext" : "true",
- "kty" : "EC",
- "x" : "Afrx9MyHjAQXLzWtY8E3Npgc5RHmb_7NJZBnC8IScQExr1Mw6YLdSIApLgebYCItsxn8NI1ePq7Yel40vdYjDmHF",
- "y" : "AQgpwUfPeLtojxZr3CZ7TRkfOW94MFH6Qd3-RKrNxCfWhDbFn08eizxx9MeDYTTBi7QP7YjgGsNwQHdYynaQCrJl"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AapJCiTqodo1UEqh71rQPTFdFWAingHpYzYEcQkoNlaN78YHsEh13mq3t4rfAySlSHISiAxhLCUoNE8A0qJH9-uo",
- "y" : "AbGIwEWcIGbHLtJ8jZdQZlvsq5PPXrp9nv66HuRZIvv4zFjE6EFlmiy05SRbQVdNIxXTPRYzTc3zD2ap0AI6Sp8F"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "01ff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff00010000",
- "tcId" : 26,
- "private" : {
- "crv" : "P-521",
- "d" : "AQRGx7aakMJAtvNZjVcMNtuPiKmi0sR4HbQvx2SiPwIE8av5AQ4489sfWCLJEQT1LJmr7z7uCs_RkZnYQfA5nsRY",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AOzcaMvbri-f4B1RYhnAj0-ma1NDDxi4bTiA56rGUB1jToLVVmtUlf19ejkW7IXaEbIxdOvoPFDyEuQ25lEVviI2",
- "y" : "AAALPmt-i6XKCpayvbbEsXVQgACrzwFm1hH2apTQZ9AuXHMCxqlRtuLWox49b3UWQQxguKUxC-Wp3N6Vc69L0258"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "ARcwdNExeWI1KkBYFq3NrPwHLihiab5Om7EWUye1rUJQ_sqBLSAZ8aH5gunT3LS4govxtGeFJT3591GYZCCx_YR4",
- "y" : "AL6RaKyYB3FkjvdvupBdCR-TMtMFZoTeiYdiOF17lbowRVEuU0ueOZtC3g-oeUVdR38PAb8qjyBuTUjTfy-PAwFg"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "01ffc0007fff0001fffc0007fff0001fffc0007fff0001fffc0007fff0001fffc0007fff0001fffc0007fff0001fffc0007fff0001fffc0007fff0001fffc0007fff",
- "tcId" : 27,
- "private" : {
- "crv" : "P-521",
- "d" : "AEf0gpI9gWUpV2YOJXZbq-_NNs1-0gaz_cqsTCWJryIlZIFpjfAR7E7TYsVWJJOcQ06KThPTq_f465-pNYV6GM0e",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AbbjwscOPKDPxOhuY5Adis_BFWuAtvp6CACwigg7nQsVVMfmmz-2rabNDVM9xfO-IyJluN2iIXfWqfsso9ZfqwNa",
- "y" : "AN0O-aSlTwMFZMh61_w6Dd6WFF4RSgvTUTKrgBbfwvJ51oEFS2N9wkAO6n9BF5LtGEs05Rk4c7YiHW7cduSTGaP7"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "ALerrg1ExBfKvxgAcbHCrRng59VuQrYtenCecu0zFvM6qCfT-K25W10QlV0CUb2ghufXhEHoYcloPvqAs_9s4fbK",
- "y" : "ADkJ75dRag1VYGkeFmYAoHo4srO0iLCnA-UkhCPnFnBeMgYymD1w2jgvQAgaklc0Hu-9UaD7p1_Nf-1TjpWJtUow"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "01ffffff00000001fffffffc00000007fffffff00000001fffffffc00000007fffffff00000001fffffffc00000007fffffff00000001fffffffc000000080000002",
- "tcId" : 28,
- "private" : {
- "crv" : "P-521",
- "d" : "AVq5Tiol6wETE9p3S4QwJkOnBOLHsjacK2jJwqKNg29fcQYU2F1VfIXn_z_W2gCOA1pfV1nxjFHy71Zbvjt0On74",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAiC9FSE0AUJRyxhAyzUpiQ9jx6rK--jcvGKfjhV3wOQc8ESnfvM6Ht6a6q4et-ZpudHxtKYEVbg_Sj-DFPf3In-",
- "y" : "AS4ou5BmSLHuNP15FUxCpaWYcVSAZbEpByTXeaAF4pGrjKAn-QJQTEoeCRzSpaRNOnNuQ4R_RmEYxhWBKGg0GMGV"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AIADDBIkyBDQ9Mdh5Q55qU38Z5MKqGaZMc6u-lYk_BxYqWpjzkBnNLFnfnEPNB5Pe1VB5rBZ2Bgnklo-E_DErnUV",
- "y" : "ATMiYwjDaF7zYFgwtWB1j-yPSeB86uTsOl-jZn1xcuIrFJ5rt5SRZCD770ODhWqd0FZ6XimVkkN_C86DfLhRNFtV"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd",
- "tcId" : 29,
- "private" : {
- "crv" : "P-521",
- "d" : "AV9Wm2yFPuZTEtzoREML-T4ePjFF-qBX1fuKnACO_UXwGLXX63QY8BnW3yTKIRHsLbYZAYl-mcln98Lf031gFvE9",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AFRFfw2juwn-o9pRWj-iWoh6CJnQK-PQuGrRxgCv3-PY4MGCuEWkS9vm4uBoebJqLLrktoCQk9QajjOVO54eXX3Q",
- "y" : "AWBlktVWdA9WSpA2tAU7qiJrt6wahs1APs0DpDra-co5-_qPVJ4MNRGccMm8NIalEpH-BKTzTa0ulEnkKO_WGkzH"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AcV8ffR7tx_RPXFPhG66Wy6v_YdvF_DPBRyC2MBdVnqkDA5qRbb13O7MPDOKIbZByBSPo0fYwWWuJJQyHy6ifvhB",
- "y" : "AVEsOm9DnGCIOdriD6SoT3HpQV6AsJzKG51vehjIngB9QGWjwcMhTZc1vy4FqnOk135hOH18JdBMyp2RvezglWmQ"
- }
- },
- {
- "comment" : "edge cases for shared secret",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe",
- "tcId" : 30,
- "private" : {
- "crv" : "P-521",
- "d" : "AE4aqLfxx8CRwT3QCLZlGuNRCmYhcpKx1cQKa5yYRCJdoRoFfHBmXKEFpPcn02d56w84wAxo5IqLuiSF6iwBXSP7",
- "ext" : "true",
- "kty" : "EC",
- "x" : "ASeR1fEZFj-lqdUm56zzdw9ye2XQ9rZuNGed20Y89cvpCC3k-qGhjERJWVCJEwvbGWHfG3dikPws3bd4BpNF8imw",
- "y" : "AUTDJdEeJ3cOzU0w5QHaygcoV7heHoc6mIxLepOattgSh86q9gpuMlEToVuILBB-XLmDXDPcUAfcTugkSgMt0Cb3"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AGjidY0tiJL7AbgOV75-ZWrkGFHTKhuYfycXv1yUfBUcy97QljiYb9SOHs8g_tdMc-iclHf9jMP33Anyc6mLWIke",
- "y" : "AEWBC6A7bwhGzO7Km2FkS2gAMDm36KRmlOJ4y_EHSwh3wtC-AwMkUesZLwA7bIlsvLGom3MC4Hi9E7Nczgurhg0H"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "64ebddd0211545e08fff948c3c252bafdb61245146915b8524f27cd6ec766d4f",
- "tcId" : 31,
- "private" : {
- "crv" : "P-256",
- "d" : "9WHNIE2tXPb9P1qiTZSGfw8xzSIXbrwjDlu4IMNDGK4",
- "ext" : "true",
- "kty" : "EC",
- "x" : "G5TtS3gQhifa-fzyckvupwbKxmfGuveNC2CwLpchqH8",
- "y" : "FBD5sLTkev2U75DG792XrwCybeK4X-rSkP7OeenV668"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
- "y" : "ZkhceA4vg9ckM71dhKBrtlQcKvMdrocXKL-FahdPk_Q"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "11c2b3d789d5879ae2b6c5bf25e970d246ae19f27e96d2a53b85b844662bfeba",
- "tcId" : 32,
- "private" : {
- "crv" : "P-256",
- "d" : "37nCPA2bNyQYlt2dwyPl499ok2n2P9GDC1PC6Kq3_ps",
- "ext" : "true",
- "kty" : "EC",
- "x" : "qPLjpu-qN03vykV-b3Zmsev1gum3iwur3ptEBN1jqO4",
- "y" : "33Y3hU4lZy8u_ZKc1TJGIhY5TFyqHWH7NGVwikCbE2g"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAAAAP____8AAAAA_____wAAAAD_____AAAAAQAAAAA",
- "y" : "RiwEZuQYAiONbJJey-_HR8_lBeoZavmi0RtihQ_OlG4"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "827b389dd5c08c79f1315302342539be601a7f755bdca98d6702846107a31870",
- "tcId" : 33,
- "private" : {
- "crv" : "P-256",
- "d" : "fQCkXannaJDeh2kAnq5HI7wLxvzj6x5t-HoWWOhDLMY",
- "ext" : "true",
- "kty" : "EC",
- "x" : "_FJoFGfalGIOTH-b1D-ibY0CN8prxadt3__i8MY5nhw",
- "y" : "DgvkRsg976wXQkGkRFNW8a8fN1Vr8bD3Ak3V03Q0wgQ"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAD__wAA__8AAP__AAD__wAA__8AAP__AAD__wABAAE",
- "y" : "aEyKlYbtb5y-RHBYp9ohCLqx5eCmDR9z5OLnE_Cj3-A"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "bb25fc9cb64eb69e52f9d1d4c0d9dc7563d2342738b8545bd849c9616f7c35b8",
- "tcId" : 34,
- "private" : {
- "crv" : "P-256",
- "d" : "7y30Hg3QXiSRil8iTHd33Y9yg3JzVR_PUJ2SaUeNfOQ",
- "ext" : "true",
- "kty" : "EC",
- "x" : "HwhwsMS0T9wPDfjxu0mxkLOfESsQUmIYa4V1KwHrlDc",
- "y" : "H5yuPQ9-ah6D2MO84W-0MBzRBQzBP4Q11teY74VB7ZA"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "f_8AAf_8AAf_8AAf_8AAf_8AAf_8AAf_8AAf_8AAf_8",
- "y" : "LiITyvAwM-D9D3lRFU9ubDqSRKcvrKZenOnutcjhzqk"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "01d6936718941de1c689a8d11cf98c0d50cd18b40589e5e4efc2ab7692e9a11d",
- "tcId" : 35,
- "private" : {
- "crv" : "P-256",
- "d" : "ynQhnwWzXOkr-9Ne4QB_C_gSAjx2gdpSX_aFifK9S0Q",
- "ext" : "true",
- "kty" : "EC",
- "x" : "3v4g84h9rNVn81C14Uxr2QQWp1VZpW33GQ8qfm34ulI",
- "y" : "SEPuncA58RBm9OslWclcvGWZOoNftu-1vu1Efc4sYiE"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ",
- "y" : "K-h4nbgbtIcKnmDFwYyAyD3kZCdygfGvHmQIQ6GjFI4"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "b040da667e626da3ecba81774abe5c78b0913269c4a338e96169280cd960cb11",
- "tcId" : 36,
- "private" : {
- "crv" : "P-256",
- "d" : "dbAXHkNIjNBS9ai8xc1rlIBwtq5u2HFxAHATVr7xORA",
- "ext" : "true",
- "kty" : "EC",
- "x" : "ioFLm07OAbhKONV6TmTlamuJaIwHEzSeeGuNcosgoLk",
- "y" : "jPuKN9axMkHxUMyjgbTTnE9Tq-QJq5u-gmnJ8Y2iFlQ"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "_wAAAAH____8AAAAB_____AAAAAf____wAAAAH____8",
- "y" : "XfgPxsria2wZUvvQDtF07hIJ0GkzX1tIWI4p6AuRka0"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-256",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "4936cc116991029c526353880d1662c358030966cd55a9a8160fe2d159aeb4e7",
- "tcId" : 37,
- "private" : {
- "crv" : "P-256",
- "d" : "XOqmj1_5DbRu0cV4_bPB1JTKV2EImMcAmCiQxztru9Y",
- "ext" : "true",
- "kty" : "EC",
- "x" : "oXuqPe7_EUlvhfee5l1fOFn5X5Jb1wNjVcenVgTJyJg",
- "y" : "29Xvv-xNR8wUyBM_47j4bGb-C3vDFXLKhv0iCc391vo"
- },
- "public" : {
- "crv" : "P-256",
- "ext" : "true",
- "kty" : "EC",
- "x" : "__8AAAAD____8AAAAD____8AAAAD____8AAAAD____8",
- "y" : "LGNlDmpdMy4ph90Jp5AI6PqrvTfknLAWv7ksjND12nc"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "4e895e34c332213a5df19fabddc6b902d692839babb725d3df788565dab301ce21297ac9bb22634d28f4591bdca4bbbb",
- "tcId" : 38,
- "private" : {
- "crv" : "P-384",
- "d" : "T1tn2EWp3XrtJUF4-8hqnhI17p1Y3MLSIw4g_yMkj1ZeJVbJxfeCYc-Kh5O34xL5",
- "ext" : "true",
- "kty" : "EC",
- "x" : "SnFhQe1E4hE8LFnQIHsmKuPj1Hvfp7ghcjeQ6l1Abj1bdfwmQexehMePbqPkz7mx",
- "y" : "FdjHSmVoLnYQaACnx952lcm_Le0dPco8Mf83dOx8nZ6JyWoDe1tk2eInNlmxyJD3"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
- "y" : "PPme8E9RpepjC6P5-WDdWToUyb45_SvSFdO0sIqq-Gu_kn8sRuUqsG-3QriFDlIe"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "359842f1ba4c9be3d068c74399581ba6a322c6d3ab720d0224f71cf5ca550d1071a2b385adc8fb47fbfe74d25d4736a9",
- "tcId" : 39,
- "private" : {
- "crv" : "P-384",
- "d" : "50d0UvWbIrGM0eMD2D1wZuZPg6OCsnGbhPgVynGjTaKmbAPI4aj78fDP4HjyZNoe",
- "ext" : "true",
- "kty" : "EC",
- "x" : "bIby6GKIm_c1VxP2_R3JJaD2a7WfrGIbGhKoFbDY6zWN4Lwzb8ujjRJhB0BlG4sK",
- "y" : "dcKT0WCM0Sf9srQn-YUtmD--lpd9jZkD5AIWKzrDg10igwmh0lgQi_w1NgUguTXB"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC",
- "y" : "cyFSRC-27lw-bOHZIMBZvGI1Y4FNeQQrkDzmDx1Eh_zNRQqG2gPz5u1SXQIBe_2z"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "71716edde561d5f3160f49150d65d2d7288d828de14ca915b835547687e3b9156bc2575e24687393ad6aae3544367355",
- "tcId" : 40,
- "private" : {
- "crv" : "P-384",
- "d" : "rzWr72rzurTFbm6_jsnAgXH-H9VodWaGyETRKJC5n7ao06d5zoivfDUYh8iehcLH",
- "ext" : "true",
- "kty" : "EC",
- "x" : "Ir2zHCrFMrmIUiUr4Zy6260S1oKzexrvWSUEu0e9BlXZZQqHf69RUmhxsbwPsf05",
- "y" : "zRVH8sgQIsx9VOscHN-EAGyLiMQwny0x5faJVqFFE6uqtq05Jq7Peg0Jiwd-sEBk"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAAAAP____8AAAAA_____wAAAAD_____AAAAAP____8AAAAA_____wAAAAD_____",
- "y" : "cDcDhUE9Pv9vo0B7ok9oLCsBtRRF299e97DdCXnxfnE-CQgVcfHpTftmvyggAvOf"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "54a2e9e30ff3dcdf15bb0630dff2af17ae2ddadc9a908a6e844762af8f43b7dc3bb59212e626be44adf94efd3c9bf748",
- "tcId" : 41,
- "private" : {
- "crv" : "P-384",
- "d" : "lat_maoDiHjgtmOALbi0oV019jqEsoSKVEW8Hadq-sDPpexpBAH7c2TlUhfVKOfb",
- "ext" : "true",
- "kty" : "EC",
- "x" : "k7C1k5ErkiAP3jUFHdgT5sw2WF4oPXNIUuLiWazarSE1mNY6uPCnvPvzc19-ufIR",
- "y" : "p3OImY5TpcRNr0cht6RZOo14saiFmxNNQKWKXVmGl7s-9dJ9ulpYqf_Sp3vWts5-"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAD__wAA__8AAP__AAD__wAA__8AAP__AAD__wAA__8AAP__AAD__wAA__8AAP__",
- "y" : "ES4ZHx94u8VLbMTwseWa6Mb_Ggf1Eo5B36KCjhtlONT6LKI5TGqrNEncs_xOtEwJ"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "6125603f2419093887c94cdc24030a53774e68436d9db29e58199ff5043f38850c94a843ced979247f2ca1bd48e712f7",
- "tcId" : 42,
- "private" : {
- "crv" : "P-384",
- "d" : "OriTivAVWkEw0xPlfSEL1XuyfRoo9WXwPFrlaxFY_jHpWXKku0EjnQis9js5i716",
- "ext" : "true",
- "kty" : "EC",
- "x" : "BnGd_rVJP9RPKD1nBm4EJHkAk6UuM3n1WH9-w2tUGC-HHM-ELlLY2imgCV205lLz",
- "y" : "9DWhsjsMME952LVjIxeC8Gw-KTiK1jmnOTmWHbLj9lw0hiK8t9RPS4iQ4bCwxAB2"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAIAA",
- "y" : "AopMjaWgURL-YCXvQZCJad4g0F2WaOXIUu8tSSFy3cKgpiL8SIFk_MGgdrhylCry"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "60d73748120e538409c65508f4fd2c4575ee333d1103be329fd95eda92fdb45665de27db2d3f3ba5c5ce0d448d33442d",
- "tcId" : 43,
- "private" : {
- "crv" : "P-384",
- "d" : "LgLDmLopfrvWYzRGKWleU8ZSMaPiSMLLBKrJWGwXPvD-USKpohFKBUCxI-x6hDuZ",
- "ext" : "true",
- "kty" : "EC",
- "x" : "P0lK0BgW2hvIautb__wcM9wJxsgN0h_9jP6OEkt2uVQSlzOxnkWGjlQrnQthW8W2",
- "y" : "h_lSVNmK7k9renQhp30NyVF_PTDhBNH7CDUQi2O9ttMZsu2LgMCzUmQYcdIRDcy8"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC",
- "y" : "B5faTAdRztFt6A0Wq3xlSl3CfQkmJtCGWhkqHF6nwbiMn8qwV5RnQeQcwoyA7Aua"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "acafe3aa06c90ff391128a2ba4b569d3f76b65ff1ec1e9c98780722c336810768014be29db1c7b523c68f3246b2765c4",
- "tcId" : 44,
- "private" : {
- "crv" : "P-384",
- "d" : "u5P9WvZZwf3krTQVlA_9dx6HLwp4CwBuEWupeU7xskBvkFQkLEsWgc6ODACeDJ34",
- "ext" : "true",
- "kty" : "EC",
- "x" : "aahIFrSc4nFAKY6U6YSFH8SbW5tLaXzgNUzMwFQB4mV9yshGl_J30i-pYrqgf-KT",
- "y" : "kKd0wGLab0vwL9vcZXrF4f9Wwl_YpTtBgdTNBVAsfN7gnDO0_KgUjyiuC8V0YADC"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "__AAAAAf____wAAAAH____8AAAAB_____AAAAAf____wAAAAH____8AAAAB_____",
- "y" : "bHCJiub7MfovCGViry0QSGukxv1eQd_kqmFZi0cHo7wnamL-sbmFV-OxfAJfet9O"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "2f6bdffd0381853dc2c493512138ee843d4f7f0d19fde184f1a438887c741acb066654e45ea79d230c3f3cb376c22665",
- "tcId" : 45,
- "private" : {
- "crv" : "P-384",
- "d" : "t7k8StSVU9m_UnPXIr7cpsZHinyGKtb-ihWaapXGXvBb_Q_7DAkhlodltTuOjBNa",
- "ext" : "true",
- "kty" : "EC",
- "x" : "rZ7Tz-zApVpyC7uD66RRSVxnXAtg9qLorxkVbamhRqt52ztcCT6isv5C73FO_J9S",
- "y" : "SeQr0j5HOA0cdzcPNj1tHq5RNO7DXT47l07tk41gIEPN2TI6h8CQ1teO7oliUXzl"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "____AAAAA_____AAAAA_____AAAAA_____AAAAA_____AAAAA_____AAAAA_____",
- "y" : "SYerrkEoCcL6SP0jsb355iL1pgbEQRchX_phsY70blSn-78R-aa6WcmRtK5QH-3O"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-384",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "7ac7f7cf745457b1a58ea3cddc0337d47211b44403ab4ea47559be4350e8e87ef1aaf153e88eee72a3bdfa88aff1bad1",
- "tcId" : 46,
- "private" : {
- "crv" : "P-384",
- "d" : "G6nOPd7d4YRu2aiuR2rGsJhaHbgu-YD4KWcolBGqjhFF7r4vEut4Z7hJPHCmkYfo",
- "ext" : "true",
- "kty" : "EC",
- "x" : "OdLPzPwjOGKxUaUEWtPkWQcU-lZMiMY7ltEg-sv8cDexBg1YAehFcvNHTNd9Eoco",
- "y" : "4cv-rRGl9hZpU7SdqV25z_tQxBHl3H9M8zYJ-rQ1gvjsvszDI9lWfc2Yda6GEauI"
- },
- "public" : {
- "crv" : "P-384",
- "ext" : "true",
- "kty" : "EC",
- "x" : "__________________________________________7_____AAAAAAAAAAD____-",
- "y" : "cyFSRC-27lw-bOHZIMBZvGI1Y4FNeQQrkDzmDx1Eh_zNRQqG2gPz5u1SXQIBe_2z"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "008a0e65c8611c570562e3eef2172e5fef175d211ca7613d3f301dd8babd9b47d400c31551ac4c06ef3850750a4cc6a012f31bcc556c41ba61054eb6af6829360842",
- "tcId" : 47,
- "private" : {
- "crv" : "P-521",
- "d" : "AKpIH05r5B-hJdYsfs2K1lPebZvuR-CKsJizim-_8jVMkK26amEEKxpylsbVT-aP0kR6-Rx_Jxl9IzyBSyPyWHCt",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AP9uLiYau8O5k7k5b5HVp4wr56kfwhAkJk7K5GoGBaQ79oEgzdbbZA4-Xk5kvHcCt6A9JjhR98ADxmEoAR-GtHN6",
- "y" : "ACu39ZDjMkyQwIVvi1B4bwOPxZcAuitpWsXGXkh4vWzxvL9hKQ1exhkyu1gLyYipMAM8zZRQgcnGqQncxm8syuWK"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
- "y" : "ANIOyf6mtXfBDSbKG7RG9AspnmSLGtUIqtBoiW_uP45hS8YwVNV3K_AaZdQS4LyqjpZdL10zLX85-EbUQK4AH0-H"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "012d650d8f3b211999aea626d97a2a359c98cf42ee4a7ce3353ddfea8e303102d60f1b82c207524bfe2c8f280d9d6c1345fe3f61ff889071310cbc5644a6d8683e66",
- "tcId" : 48,
- "private" : {
- "crv" : "P-521",
- "d" : "AR4Zxy_JL1yzPdR6rG0nq-06vo32mba1JskRrZPRiBAjcf6dNrGITYhWC_V3gtyeEODQbSDlmdvbI4BLN8vPGfxe",
- "ext" : "true",
- "kty" : "EC",
- "x" : "ACZGXGdGsWYaZ0fOuHCpoJ-8D_caLh8TQQYbcZgB8nXUpBKqn0vKcW1f9_XZVzTVYFKiDjyDIDH34dkf6d3yJwec",
- "y" : "AKv_XqoNtUyzdkKqU1ivxekOMmpKa7PKe9PjeCF5pzeVVg-1-6QBZcVOmAlXm2Y-QARvqtvTQbx0FValfOTeNgAj"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB",
- "y" : "ABDlm-k8TyacAmnHnir9ZdauqptwHqzBlPs-4D30eEm_VQ7GNuvuDd1KFvHNlAZgWvOPWEVndw4_Jy1ojIMuhDVk"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "0090cd100d3a35ce5f9fc6c3dbefd3810d5096ed63e5ee046c26c28984f825a0ce6ff3d643e7ea1648b21dc8daad4286673aa84e28f256bbd978606a1fcca2942f7e",
- "tcId" : 49,
- "private" : {
- "crv" : "P-521",
- "d" : "AcfptciIDkTS-s55K0RvlPXZYl3MiXLWQIhQApWyG0rNBlExohWmt4I37TqsKPkuUetp6E5-LNjKfG72RFUZbfi2",
- "ext" : "true",
- "kty" : "EC",
- "x" : "ADmHGMepW0phM-0eOFYStqNF3raQTXAi9FSxb0e8UJiElG4uB4qS_48UaRfqxOrmt-RUoB2lmqmVveoTdSdvtotC",
- "y" : "AMxzlDgVrRolQOtp84UBNp9LX_n01wzS7y9RhaAQC_asgVt8IOymIuOAsdGo4JNeYUI7Zg30fS-elK8XVMa8DPzO"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC",
- "y" : "ANklT9-ABJasszeQsQPF7p-sEoMv5UbGMiJbD3_OPaRXSxqHm2I9ci-o_DTV_CqHMarWkamou4tVTJWgUdaqUFrP"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "019c5a8fb31bfec0a892308140c2d4db952066bf0fb5b613c2674634723269da8fd19f1f93cbab0acd80a268f9d108b9a6103505e710b49ed6f3ec10a9a1aab0cb1d",
- "tcId" : 50,
- "private" : {
- "crv" : "P-521",
- "d" : "AEYv-AnJxUVNa43Cn7jWp0rMBxXHi-pd25Nfu2wd2vVNiw1OAP_KhduvhluBC6KWTZhpHwCNJhbyy5WiMbbfiKxL",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AYMOoz0H-qWHNgCRhOi5vBMJcnSwGP9TKaNfoNthhA0misgNSJuLwEAUct3lk61FnOLDp-wOXWyWfxtiV14LZKIb",
- "y" : "AYLV9C9-sY5659HSeOojg7nt3Y_TZKiZR_XaavQZZZT9HwWOFVCA8s4OAbURON0bCi1DBqInrCxJ7WiiXp3HmzyZ"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AAA_____AAAAA_____AAAAA_____AAAAA_____AAAAA_____AAAAA_____AAAAA_____AAAAA_____AAAAA_____",
- "y" : "AM0oOdhXtGmfXI6KAZR4biaoYvCGtLqAdGrlIl7Tqmj5a3quxVIlgwu5j1LXUiEUGJe6SdejHrvwttfTE1LlJmGQ"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "001e6f34d1c431b605ba5ad341a6d4b21b7c9691d79ae8070fd56705d5ee60c98e3956f12ce58bb831452541b43ffafd102dea31bb4e964da6a3023745554011ebbe",
- "tcId" : 51,
- "private" : {
- "crv" : "P-521",
- "d" : "AeONg5fKDfXtk9-RlPUuOZz26gPs_jHUcxlqe5XPrG3PBxAmMQESzT1ZbWy1aZx6Gtqcq-rZOO2WrosQZgs-MV53",
- "ext" : "true",
- "kty" : "EC",
- "x" : "ALwl2eMdd-N5-DAfX84o2w-_iUTtYgq47BBS5uSGUWcYHug7BU3CTUBrKmYafhUQIqnIYxRPsflRVMqnncnxJglb",
- "y" : "AOq4DoCisqFOiANEtfs0lwIipGH_vkuPHGWNgaWw4oZlzT424fTyWIC4sj_RZc1sTPWD4kT5ROCnZcemPrVRkzyn"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
- "y" : "AAgT2YKRGfQv-pX-qLqegeTNamypf7B3jhLl9d_jUgHdTMqOyg0uOVVVmXBBOB5qwfGN30x04LbpBBz9yh0cEDCR"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "01367e24697254f96336f32098b6a35dd364c1dfc897c03404ccc8b7b9d207b1fdb9c66bc55d586002c561651842f7a11a7b8f4208ffa14f2b81c867ed6ac5b311d8",
- "tcId" : 52,
- "private" : {
- "crv" : "P-521",
- "d" : "AEsWMPirCvc1jgUh5gZJQumH5N4pnOSFfhhCOuXC-URm2HqR6JudLVfMJ_2mSTDEf8ZtYb0Kw4N7s-D_VL_wlzvt",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AWZCsAy5TErC8oCtxpdkWNdeBmsBC_blA3Z9OTcgnfqH6Z6YQvUtj3_XaVS2vShKMd_xkPc9CyEjNPIsUJ_5miOd",
- "y" : "Acgw-GCBGqMPwDF4k9giSYYiEXXYJUhe848wvoZfqL3OqY6cBY9bZXMGRMzwNWVjJK8TpITJHqUq_PXSQpRTrDVP"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "Af8AAAAA_____wAAAAD_____AAAAAP____8AAAAA_____wAAAAD_____AAAAAP____8AAAAA_____wAAAAD_____",
- "y" : "AB_oAMUOVAErdaM-S-fQfI1g8paAo5XpUaajHFCWsOqSj8LL8yfdeE3Ap8pG6nOZK3WLVkE2S0q6Oek3mKTZJaAI"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "0028cde4500ebb4f53aa89d08b162020d53921d43035d585d5645172334c9b0df46e6b0bf66a5240239d51ef1017c14173313317fb544a889efa83effccece7eaea5",
- "tcId" : 53,
- "private" : {
- "crv" : "P-521",
- "d" : "AGSRnAUCVCS-_7fN2JLqlXl1gLNlaiyaC9C6UKFmcZN4yeeg79TzMqFPwCHCrhhe89p2BAs4U9Y5gycIOmTa7B96",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AQ8Us1RKPVn2xxhkRI0_7tqkE5acYGGaG9hnqgp7Nbvw1UprVgWUO8tp2rwfyfvlGc56FIcbmahQTFhNnKq4k6T_",
- "y" : "AAd77iaKst0JYgHEOnz79w-ZseypWs56oKGXzM1CJ_DUj3zHw45O2GhZ_VfAVEHd1prLKYgqN6n6FQ6EuWhJ9Qih"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "Af8AAP__AAD__wAA__8AAP__AAD__wAA__8AAP__AAD__wAA__8AAP__AAD__wAA__8AAP__AAD__wAA__8AAQAA",
- "y" : "AI3Rih9eSCFAvnm7ZaIa1gyJh-UyyENF8BNa_9Ruxx7wKxyjrVbzAdlV-jBsEi1EHW_tz4uFXvJWNQv2nSOnIHrZ"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "01f11556b0c2544695555c2c142ebbf72572244e043b755dfca7adcd32d1ff68177a70af88fdbad573f22943522c5e40a99794e3e629518d471f302bdd5cf0be729b",
- "tcId" : 54,
- "private" : {
- "crv" : "P-521",
- "d" : "ADl_dtWjNwzJxNPMypvvZQIh4hL8nLY-0GZQoinG9y5L9dh-erUW3nwCgLn1-mZI4F9qIxNxpdPL6WuapnyEJuPE",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AOVtRhkHpYEOdY37Ctitf8tdcazfFeYJpGDIND4IE5Zsurd8gqMeSyp89mOH84HYc1-sBF5JhQ-bF3Pqj2W4-vhi",
- "y" : "ASX4TFfru6w_bk3u9k71gKNWFQgDENvSHSLRQhDSCi7w2PHTs9tdJM48O9C7WYw7EImq4oiK3D1jnHbkOyCwLfyd"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "Af_AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__AAH__",
- "y" : "ALEcZo-9VJ82iJ97Y0NAUdom8VcFg5E2sbFKCRUtehgup4BsNUeKMtOqPJwWJ6YVGevscbNvp3RJAluIKeJ_MHg0"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "00f8f1e1940e2a69e733f8a7a5c9a2d30cad0dd901e702a0687cc83913f0123bbf9ffe5ae4ff6c5630118268e8e67f4327482b9b7e69a93ef4da1d3abe00e3692482",
- "tcId" : 55,
- "private" : {
- "crv" : "P-521",
- "d" : "AGiax25EUHBf6o5rTio6wNt2Z1BZdO3Y2ht6Nwj-nUi2sP8oGnmRfx1Qo3k8tGyzTke1Bisrhb_NFo_oByKuRVxt",
- "ext" : "true",
- "kty" : "EC",
- "x" : "ATu4_yZKbhiOikpAwZFrAw5TthD8lUyOjEfH3F8Pwx65KrWdzCTsUxlytYdvO2VGVGGLrfIBRKQeQA6DHxTeRIN1",
- "y" : "AY6_5hJv8HywySeUmLI64-Tyjrwof-9xEGkcF13wZC5t780Nsn78-whvVaeMxfl--bKWCF-8cq-ylayu-LRueG_p"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "Af___wAAAAH____8AAAAB_____AAAAAf____wAAAAH____8AAAAB_____AAAAAf____wAAAAH____8AAAACAAAAC",
- "y" : "AKp178Co2qwdc_MsnFUkFLzPRK-OdDMbR0OefcxJoTWz7mHp9pcX2JtLujVnoZWu2hP77GNL8phLXsa2-A9ZeO1a"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "008567b96fddfb4acc4b0317e5a8144b879e762bd611a8d8d0825c7af7a464d27eee6b721f7bf4aa431b095743299f36c27b0b520432472b040a9807f21abdb78dcb",
- "tcId" : 56,
- "private" : {
- "crv" : "P-521",
- "d" : "AMRVHZr067NGsXtKirPSRFaj2KL9oSIC90jdOYlU4CJTLzssF1bZC0BqnOX9AzxAz3C7-ny0LK7Ik3VbgnDy6GQ8",
- "ext" : "true",
- "kty" : "EC",
- "x" : "ABLN5qTrWH6RKn_frzdnVX3XWnW-sQ63iWeknyzshq-U1Fw_tEFN0AN7sV-JzjQaDDkuHyegXmtxfNuJPBI2AzBe",
- "y" : "AM6aaQYwMBmQKDRt1cvTDEdK6CMahJOePc7IYRix5VKgsbmBfCv7F9_xE5nexRTjDzGv309LnvVJQ0kk9Fv6f2u7"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "Af_____________________________________________________________________________________9",
- "y" : "ABDlm-k8TyacAmnHnir9ZdauqptwHqzBlPs-4D30eEm_VQ7GNuvuDd1KFvHNlAZgWvOPWEVndw4_Jy1ojIMuhDVk"
- }
- },
- {
- "comment" : "edge cases for ephemeral key",
- "curve" : "P-521",
- "name" : "EcdhTestVector",
- "result" : "valid",
- "shared" : "01c0ed430408acb310910db1933c22d021030c8b9c011b201325484911eec542605283f2a41c02f20ea6d96291293ce16794a759bbe1428bd6f4bc53a1db40e80b0e",
- "tcId" : 57,
- "private" : {
- "crv" : "P-521",
- "d" : "AWFrDPqiz_GzwVebeJ-MTnUZsc0Aw-nLZ8PkYl70WQdMhFe9aMQTp5ocQCC0h1_QQBEQxzTYioxfyLTVqA7W7xQ9",
- "ext" : "true",
- "kty" : "EC",
- "x" : "AfAnhZSidHsHhjPfcqc0MsllGBwegXg2tIcHQB3vOeRRvgjL_bLoaYHmp8fZ5ZVrBQcGQ7AMBfB86XiKe-27q_zS",
- "y" : "AE16Vy45Ij40KlRqhAFe_SSI7u5tfr5GfAmAPyeHVlM7ryOAOoohrLymiwSLJEmHCukT97D3xbIPdX_1eQyPWrit"
- },
- "public" : {
- "crv" : "P-521",
- "ext" : "true",
- "kty" : "EC",
- "x" : "Af_____________________________________________________________________________________-",
- "y" : "ANklT9-ABJasszeQsQPF7p-sEoMv5UbGMiJbD3_OPaRXSxqHm2I9ci-o_DTV_CqHMarWkamou4tVTJWgUdaqUFrP"
- }
- }
- ]
- }
- ]
-}
diff --git a/testvectors/ecdsa_test.json b/testvectors/ecdsa_test.json
deleted file mode 100644
index 2322cf0..0000000
--- a/testvectors/ecdsa_test.json
+++ /dev/null
@@ -1,2254 +0,0 @@
-{
- "algorithm" : "ECDSA",
- "generatorVersion" : "0.0a10",
- "numberOfTests" : 273,
- "testGroups" : [
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200044af4f6d1d734798d4c4c6f97c4fff392ee65dc252d617b154ca835ea1535b104fb069171d00e87a92e6c4db1d892bc09b04b5da8bd9b09cfaa41d0a526e55237",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESvT20dc0eY1MTG+XxP/zku5l3CUt\nYXsVTKg16hU1sQT7BpFx0A6HqS5sTbHYkrwJsEtdqL2bCc+qQdClJuVSNw==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "4af4f6d1d734798d4c4c6f97c4fff392ee65dc252d617b154ca835ea1535b104",
- "wy" : "0fb069171d00e87a92e6c4db1d892bc09b04b5da8bd9b09cfaa41d0a526e55237"
- },
- "tests" : [
- {
- "comment" : "signature malleability",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3046022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0221008b8d6e21d0c0bb5185319715ccbce2902802e1eca070b7226dec70ceca023883",
- "tcId" : 1
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3046022100dc6483cb966474fc22f2e68660e5e52f3bfa403b962de583576177c0dab2a260022100db4526559f5145e2fc5aa10d1d993a811973144f99b86474599a9f1e212c07f1",
- "tcId" : 2
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "304402201f0819fe1695c49555d6f3c1648a04c24cc59bad4120b3a66e997481d4e973a002206cf5660873b490ee99563c958a02178890191b7da31bd87e43161d83a6ad0efe",
- "tcId" : 3
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3046022100b925b7d5a274ec43833fc87d66e50d8bf0be579912d882be3300e7167985448f022100e319bfd2931d9a83b709dd5509d0d907188fa03d3025f842ca9123d052be6c70",
- "tcId" : 4
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3046022100d2cb5feded860091556d8710ad7e7aab7a6350d2d97238177604d8d330e0357a022100cab37fcb3ef1fd4485aca7d75dd4685b56f5078383936ad84f8af4c12b874c40",
- "tcId" : 5
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3045022100bcf08f55b39ec37c3939d58e9eb6d42f21bccff63f661eecd06c89acb689067b022062e2ba2ec55bb9fe5aaa888d5836deff0abf45cbbaf2f8228b31d2cefa380466",
- "tcId" : 6
- },
- {
- "comment" : "valid",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 7
- },
- {
- "comment" : "BER:long form encoding of length",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "308145022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 8
- },
- {
- "comment" : "BER:long form encoding of length",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "304602812100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 9
- },
- {
- "comment" : "BER:long form encoding of length",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "3046022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f028120747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 10
- },
- {
- "comment" : "BER:length contains leading 0",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "30820045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 11
- },
- {
- "comment" : "BER:length contains leading 0",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "30470282002100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 12
- },
- {
- "comment" : "BER:length contains leading 0",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "3047022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f02820020747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 13
- },
- {
- "comment" : "BER:indefinite length",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "3080022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0000",
- "tcId" : 14
- },
- {
- "comment" : "BER:prepending 0's to integer",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "30470223000000b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 15
- },
- {
- "comment" : "BER:prepending 0's to integer",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "3047022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f02220000747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 16
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 17
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3044022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 18
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022200b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 19
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022000b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 20
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0221747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 21
- },
- {
- "comment" : "wrong length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f021f747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 22
- },
- {
- "comment" : "uint32 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30850100000045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 23
- },
- {
- "comment" : "uint32 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304a0285010000002100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 24
- },
- {
- "comment" : "uint32 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304a022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f02850100000020747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 25
- },
- {
- "comment" : "uint64 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3089010000000000000045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 26
- },
- {
- "comment" : "uint64 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304e028901000000000000002100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 27
- },
- {
- "comment" : "uint64 overflow in length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304e022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0289010000000000000020747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 28
- },
- {
- "comment" : "length = 2**31 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30847fffffff022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 29
- },
- {
- "comment" : "length = 2**31 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304902847fffffff00b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 30
- },
- {
- "comment" : "length = 2**31 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3049022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f02847fffffff747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 31
- },
- {
- "comment" : "length = 2**32 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3084ffffffff022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 32
- },
- {
- "comment" : "length = 2**32 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30490284ffffffff00b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 33
- },
- {
- "comment" : "length = 2**32 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3049022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0284ffffffff747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 34
- },
- {
- "comment" : "length = 2**40 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3085ffffffffff022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 35
- },
- {
- "comment" : "length = 2**40 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304a0285ffffffffff00b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 36
- },
- {
- "comment" : "length = 2**40 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304a022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0285ffffffffff747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 37
- },
- {
- "comment" : "length = 2**64 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3088ffffffffffffffff022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 38
- },
- {
- "comment" : "length = 2**64 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304d0288ffffffffffffffff00b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 39
- },
- {
- "comment" : "length = 2**64 - 1",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304d022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0288ffffffffffffffff747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 40
- },
- {
- "comment" : "incorrect length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30ff022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 41
- },
- {
- "comment" : "incorrect length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304502ff00b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 42
- },
- {
- "comment" : "incorrect length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f02ff747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 43
- },
- {
- "comment" : "indefinte length without termination",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3080022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 44
- },
- {
- "comment" : "indefinte length without termination",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045028000b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 45
- },
- {
- "comment" : "indefinte length without termination",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0280747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 46
- },
- {
- "comment" : "removing sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "",
- "tcId" : 47
- },
- {
- "comment" : "appending 0's to sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3047022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0000",
- "tcId" : 48
- },
- {
- "comment" : "prepending 0's to sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30470000022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 49
- },
- {
- "comment" : "appending unused 0's",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0000",
- "tcId" : 50
- },
- {
- "comment" : "appending unused 0's",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3047022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f00000220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 51
- },
- {
- "comment" : "appending null value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3047022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0500",
- "tcId" : 52
- },
- {
- "comment" : "appending null value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3047022300b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f05000220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 53
- },
- {
- "comment" : "appending null value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3047022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0222747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0500",
- "tcId" : 54
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304a4981773045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 55
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304925003045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 56
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30473045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0004deadbeef",
- "tcId" : 57
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304a2226498177022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 58
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304922252500022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 59
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304d2223022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0004deadbeef0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 60
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304a022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f22254981770220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 61
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3049022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f222425000220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 62
- },
- {
- "comment" : "including garbage",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304d022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f22220220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0004deadbeef",
- "tcId" : 63
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304daa00bb00cd003045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 64
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304baa02aabb3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 65
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304d2229aa00bb00cd00022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 66
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304b2227aa02aabb022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 67
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304d022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f2228aa00bb00cd000220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 68
- },
- {
- "comment" : "including undefined tags",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304b022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f2226aa02aabb0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 69
- },
- {
- "comment" : "using composition with indefinite length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30803045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0000",
- "tcId" : 70
- },
- {
- "comment" : "using composition with indefinite length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30492280022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f00000220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 71
- },
- {
- "comment" : "using composition with indefinite length",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3049022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f22800220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0000",
- "tcId" : 72
- },
- {
- "comment" : "using composition with wrong tag",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30803145022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0000",
- "tcId" : 73
- },
- {
- "comment" : "using composition with wrong tag",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30492280032100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f00000220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 74
- },
- {
- "comment" : "using composition with wrong tag",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3049022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f22800320747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0000",
- "tcId" : 75
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "2e45022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 76
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3245022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 77
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ff45022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 78
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045002100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 79
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045042100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 80
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045ff2100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 81
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0020747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 82
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0420747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 83
- },
- {
- "comment" : "changing tag value",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3fff20747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 84
- },
- {
- "comment" : "dropping value of sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3000",
- "tcId" : 85
- },
- {
- "comment" : "using composition",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304930010230442100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 86
- },
- {
- "comment" : "using composition",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "304922250201000220b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 87
- },
- {
- "comment" : "using composition",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3049022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f2224020174021f7291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 88
- },
- {
- "comment" : "truncate sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3044022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ec",
- "tcId" : 89
- },
- {
- "comment" : "truncate sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30442100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 90
- },
- {
- "comment" : "prepend empty sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30473000022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 91
- },
- {
- "comment" : "append empty sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3047022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce3000",
- "tcId" : 92
- },
- {
- "comment" : "sequence of sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30473045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 93
- },
- {
- "comment" : "truncated sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3023022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f",
- "tcId" : 94
- },
- {
- "comment" : "repeat element in sequence",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3067022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 95
- },
- {
- "comment" : "removing integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30220220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 96
- },
- {
- "comment" : "appending 0's to integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3047022300b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f00000220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 97
- },
- {
- "comment" : "appending 0's to integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3047022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0222747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce0000",
- "tcId" : 98
- },
- {
- "comment" : "dropping value of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "302402000220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 99
- },
- {
- "comment" : "dropping value of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3025022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0200",
- "tcId" : 100
- },
- {
- "comment" : "modify first byte of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022101b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 101
- },
- {
- "comment" : "modify first byte of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220757291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 102
- },
- {
- "comment" : "modify last byte of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3e0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 103
- },
- {
- "comment" : "modify last byte of integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260eccf",
- "tcId" : 104
- },
- {
- "comment" : "truncate integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3044022000b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 105
- },
- {
- "comment" : "truncate integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30440220b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 106
- },
- {
- "comment" : "truncate integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3044022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f021f747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ec",
- "tcId" : 107
- },
- {
- "comment" : "truncate integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3044022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f021f7291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 108
- },
- {
- "comment" : "leading ff in integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30460222ff00b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 109
- },
- {
- "comment" : "leading ff in integer",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0221ff747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 110
- },
- {
- "comment" : "infinity",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30250901800220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 111
- },
- {
- "comment" : "infinity",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f090180",
- "tcId" : 112
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022101b7babae8332b54b9a3a05b7004579821656e9c5fbb7d96607df713de366051900220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 113
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30440220b7babaea332b54b7a3a05b7004579821eba0a7046d4e595696837e583d9a06ee0220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 114
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30450221ff48454516ccd4ab475c5fa48ffba867de57785e4deb9a082475c2b6e4c602d3c10220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 115
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3044022048454515ccd4ab485c5fa48ffba867de145f58fb92b1a6a9697c81a7c265f9120220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 116
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30450221fe48454517ccd4ab465c5fa48ffba867de9a9163a04482699f8208ec21c99fae700220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 117
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3044022048454516ccd4ab475c5fa48ffba867de57785e4deb9a082475c2b6e4c602d3c10220747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 118
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f022101747291dc2f3f44b07ace68ea33431d6f51cb136eadbe85e7798724b72ec4121f",
- "tcId" : 119
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0221ff747291de2f3f44ae7ace68ea33431d6fd7fd1e135f8f48dd92138f3135fdc77d",
- "tcId" : 120
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3045022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f02208b8d6e22d0c0bb5085319715ccbce2906b1be73ef959189d7a32a60bcd9f1332",
- "tcId" : 121
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0221fe8b8d6e23d0c0bb4f85319715ccbce290ae34ec9152417a188678db48d13bede1",
- "tcId" : 122
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f022101747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 123
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f0221008b8d6e22d0c0bb5085319715ccbce2906b1be73ef959189d7a32a60bcd9f1332",
- "tcId" : 124
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3006020100020100",
- "tcId" : 125
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3006020100020101",
- "tcId" : 126
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30060201000201f0",
- "tcId" : 127
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026020100022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 128
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026020100022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 129
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026020100022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 130
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026020100022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 131
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026020100022100ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 132
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3008020100090380fe01",
- "tcId" : 133
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3006020101020100",
- "tcId" : 134
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3006020101020101",
- "tcId" : 135
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30060201010201f0",
- "tcId" : 136
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026020101022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 137
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026020101022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 138
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026020101022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 139
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026020101022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 140
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026020101022100ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 141
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3008020101090380fe01",
- "tcId" : 142
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30060201f0020100",
- "tcId" : 143
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30060201f0020101",
- "tcId" : 144
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30060201f00201f0",
- "tcId" : 145
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30260201f0022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 146
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30260201f0022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 147
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30260201f0022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 148
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30260201f0022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 149
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30260201f0022100ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 150
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "30080201f0090380fe01",
- "tcId" : 151
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551020100",
- "tcId" : 152
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551020101",
- "tcId" : 153
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc6325510201f0",
- "tcId" : 154
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 155
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 156
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 157
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 158
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551022100ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 159
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3028022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551090380fe01",
- "tcId" : 160
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550020100",
- "tcId" : 161
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550020101",
- "tcId" : 162
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc6325500201f0",
- "tcId" : 163
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 164
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 165
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 166
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 167
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550022100ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 168
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3028022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550090380fe01",
- "tcId" : 169
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552020100",
- "tcId" : 170
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552020101",
- "tcId" : 171
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc6325520201f0",
- "tcId" : 172
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 173
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 174
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 175
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 176
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552022100ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 177
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3028022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552090380fe01",
- "tcId" : 178
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff020100",
- "tcId" : 179
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff020101",
- "tcId" : 180
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff0201f0",
- "tcId" : 181
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 182
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 183
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 184
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 185
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff022100ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 186
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3028022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff090380fe01",
- "tcId" : 187
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000001000000000000000000000001000000000000000000000000020100",
- "tcId" : 188
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000001000000000000000000000001000000000000000000000000020101",
- "tcId" : 189
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3026022100ffffffff000000010000000000000000000000010000000000000000000000000201f0",
- "tcId" : 190
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000001000000000000000000000001000000000000000000000000022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 191
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000001000000000000000000000001000000000000000000000000022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 192
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000001000000000000000000000001000000000000000000000000022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 193
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000001000000000000000000000001000000000000000000000000022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 194
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000001000000000000000000000001000000000000000000000000022100ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 195
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "3028022100ffffffff00000001000000000000000000000001000000000000000000000000090380fe01",
- "tcId" : 196
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d03010703420004d705d16f80987e2d9b1a6957d29ce22febf7d10fa515153182415c8361baaca4b1fc105ee5ce80d514ec1238beae2037a6f83625593620d460819e8682160926",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1wXRb4CYfi2bGmlX0pziL+v30Q+l\nFRUxgkFcg2G6rKSx/BBe5c6A1RTsEji+riA3pvg2JVk2INRggZ6GghYJJg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "0d705d16f80987e2d9b1a6957d29ce22febf7d10fa515153182415c8361baaca4",
- "wy" : "0b1fc105ee5ce80d514ec1238beae2037a6f83625593620d460819e8682160926"
- },
- "tests" : [
- {
- "comment" : "k*G has a large x-coordinate",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "303502104319055358e8617b0c46353d039cdaab022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254e",
- "tcId" : 197
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d03010703420004d705d16f80987e2d9b1a6957d29ce22febf7d10fa515153182415c8361baaca4b1fc105ee5ce80d514ec1238beae2037a6f83625593620d460819e8682160926",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1wXRb4CYfi2bGmlX0pziL+v30Q+l\nFRUxgkFcg2G6rKSx/BBe5c6A1RTsEji+riA3pvg2JVk2INRggZ6GghYJJg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "0d705d16f80987e2d9b1a6957d29ce22febf7d10fa515153182415c8361baaca4",
- "wy" : "0b1fc105ee5ce80d514ec1238beae2037a6f83625593620d460819e8682160926"
- },
- "tests" : [
- {
- "comment" : "r too large",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "3046022100ffffffff00000001000000000000000000000000fffffffffffffffffffffffc022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254e",
- "tcId" : 198
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200043cd8d2f81d6953b0844c09d7b560d527cd2ef67056893eadafa52c8501387d59ee41fdb4d10402ce7a0c5e3b747adfa3a490b62a6b7719068903485c0bb6dc2d",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEPNjS+B1pU7CETAnXtWDVJ80u9nBW\niT6tr6UshQE4fVnuQf200QQCznoMXjt0et+jpJC2Kmt3GQaJA0hcC7bcLQ==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "3cd8d2f81d6953b0844c09d7b560d527cd2ef67056893eadafa52c8501387d59",
- "wy" : "0ee41fdb4d10402ce7a0c5e3b747adfa3a490b62a6b7719068903485c0bb6dc2d"
- },
- "tests" : [
- {
- "comment" : "r,s are large",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "3046022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254f022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254e",
- "tcId" : 199
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200044a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e53e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESgPvn5LrJoyvpgEHJImlY4D6DcQx\ncddxKBOzoZoeteU+IT4opgjOmi9KF/2DDGZUAYp5s+AmPZGoupBiLfby8A==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "4a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e5",
- "wy" : "3e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0"
- },
- "tests" : [
- {
- "comment" : "small r and s",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "3006020105020101",
- "tcId" : 200
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200044a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e53e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESgPvn5LrJoyvpgEHJImlY4D6DcQx\ncddxKBOzoZoeteU+IT4opgjOmi9KF/2DDGZUAYp5s+AmPZGoupBiLfby8A==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "4a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e5",
- "wy" : "3e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0"
- },
- "tests" : [
- {
- "comment" : "r is larger than n",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "3026022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632556020101",
- "tcId" : 201
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200044a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e53e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESgPvn5LrJoyvpgEHJImlY4D6DcQx\ncddxKBOzoZoeteU+IT4opgjOmi9KF/2DDGZUAYp5s+AmPZGoupBiLfby8A==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "4a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e5",
- "wy" : "3e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0"
- },
- "tests" : [
- {
- "comment" : "s is larger than n",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "3026020105022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 202
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200040203736fcb198b15d8d7a0c80f66dddd15259240aa78d08aae67c467de04503434383438d5041ea9a387ee8e4d4e84b4471b160c6bcf2568b072f8f20e87a996",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAgNzb8sZixXY16DID2bd3RUlkkCq\neNCKrmfEZ94EUDQ0ODQ41QQeqaOH7o5NToS0RxsWDGvPJWiwcvjyDoeplg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "203736fcb198b15d8d7a0c80f66dddd15259240aa78d08aae67c467de045034",
- "wy" : "34383438d5041ea9a387ee8e4d4e84b4471b160c6bcf2568b072f8f20e87a996"
- },
- "tests" : [
- {
- "comment" : "point at infinity during verify",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "304402207fffffff800000007fffffffffffffffde737d56d38bcf4279dce5617e3192a80220555555550000000055555555555555553ef7a8e48d07df81a693439654210c70",
- "tcId" : 203
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d03010703420004a17f5b75a35ed64623ca5cbf1f91951292db0c23f0c2ea24c3d0cad0988cabc083a7a618625c228940730b4fa3ee64faecbb2fc20fdde7c58b3a3f6300424dc6",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoX9bdaNe1kYjyly/H5GVEpLbDCPw\nwuokw9DK0JiMq8CDp6YYYlwiiUBzC0+j7mT67Lsvwg/d58WLOj9jAEJNxg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "0a17f5b75a35ed64623ca5cbf1f91951292db0c23f0c2ea24c3d0cad0988cabc0",
- "wy" : "083a7a618625c228940730b4fa3ee64faecbb2fc20fdde7c58b3a3f6300424dc6"
- },
- "tests" : [
- {
- "comment" : "u1 == 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "30440220555555550000000055555555555555553ef7a8e48d07df81a693439654210c700220532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "tcId" : 204
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d0301070342000404ba0cba291a37db13f33bf90dab628c04ec8393a0200419e9eaa1ebcc9fb5c31f3a0a0e6823a49b625ad57b12a32d4047970fc3428f0f0049ecf4265dc12f62",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEBLoMuikaN9sT8zv5DatijATsg5Og\nIAQZ6eqh68yftcMfOgoOaCOkm2Ja1XsSoy1AR5cPw0KPDwBJ7PQmXcEvYg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "4ba0cba291a37db13f33bf90dab628c04ec8393a0200419e9eaa1ebcc9fb5c3",
- "wy" : "1f3a0a0e6823a49b625ad57b12a32d4047970fc3428f0f0049ecf4265dc12f62"
- },
- "tests" : [
- {
- "comment" : "u1 == n - 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "30450220555555550000000055555555555555553ef7a8e48d07df81a693439654210c70022100acd155416a8b77f34089464733ff7cd39c400e9c69af7beb9eac5054ed2ec72c",
- "tcId" : 205
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d03010703420004692b6c828e0feed63d8aeaa2b7322f9ccbe8723a1ed39f229f204a434b8900efa1f6f6abcb38ea3b8fde38b98c7c271f274af56a8c5628dc3329069ae4dd5716",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaStsgo4P7tY9iuqitzIvnMvocjoe\n058inyBKQ0uJAO+h9varyzjqO4/eOLmMfCcfJ0r1aoxWKNwzKQaa5N1XFg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "692b6c828e0feed63d8aeaa2b7322f9ccbe8723a1ed39f229f204a434b8900ef",
- "wy" : "0a1f6f6abcb38ea3b8fde38b98c7c271f274af56a8c5628dc3329069ae4dd5716"
- },
- "tests" : [
- {
- "comment" : "u2 == 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "30440220555555550000000055555555555555553ef7a8e48d07df81a693439654210c700220555555550000000055555555555555553ef7a8e48d07df81a693439654210c70",
- "tcId" : 206
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d0301070342000400cefd9162d13e64cb93687a9cd8f9755ebb5a3ef7632f800f84871874ccef09543ecbeaf7e8044ef721be2fb5f549e4b8480d2587404ebf7dbbef2c54bc0cb1",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAM79kWLRPmTLk2h6nNj5dV67Wj73\nYy+AD4SHGHTM7wlUPsvq9+gETvchvi+19UnkuEgNJYdATr99u+8sVLwMsQ==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "0cefd9162d13e64cb93687a9cd8f9755ebb5a3ef7632f800f84871874ccef09",
- "wy" : "543ecbeaf7e8044ef721be2fb5f549e4b8480d2587404ebf7dbbef2c54bc0cb1"
- },
- "tests" : [
- {
- "comment" : "u2 == n - 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "30450220555555550000000055555555555555553ef7a8e48d07df81a693439654210c70022100aaaaaaaa00000000aaaaaaaaaaaaaaaa7def51c91a0fbf034d26872ca84218e1",
- "tcId" : 207
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200040158137755b901f797a90d4ca8887e023cb2ef63b2ba2c0d455edaef42cf237e2a964fc00d377a8592b8b61aafa7a4aaa7c7b9fd2b41d6e0e17bd1ba5677edcd",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAVgTd1W5AfeXqQ1MqIh+Ajyy72Oy\nuiwNRV7a70LPI34qlk/ADTd6hZK4thqvp6Sqp8e5/StB1uDhe9G6VnftzQ==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "158137755b901f797a90d4ca8887e023cb2ef63b2ba2c0d455edaef42cf237e",
- "wy" : "2a964fc00d377a8592b8b61aafa7a4aaa7c7b9fd2b41d6e0e17bd1ba5677edcd"
- },
- "tests" : [
- {
- "comment" : "weak key",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "304502206f2347cab7dd76858fe0555ac3bc99048c4aacafdfb6bcbe05ea6c42c4934569022100f21d907e3890916dc4fa1f4703c1e50d3f54ddf7383e44023a41de562aa18ed8",
- "tcId" : 208
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200040158137755b901f797a90d4ca8887e023cb2ef63b2ba2c0d455edaef42cf237ed569b03ef2c8857b6d4749e550585b5558384603d4be291f1e842e45a9881232",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAVgTd1W5AfeXqQ1MqIh+Ajyy72Oy\nuiwNRV7a70LPI37VabA+8siFe21HSeVQWFtVWDhGA9S+KR8ehC5FqYgSMg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "158137755b901f797a90d4ca8887e023cb2ef63b2ba2c0d455edaef42cf237e",
- "wy" : "0d569b03ef2c8857b6d4749e550585b5558384603d4be291f1e842e45a9881232"
- },
- "tests" : [
- {
- "comment" : "duplication bug",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "304502206f2347cab7dd76858fe0555ac3bc99048c4aacafdfb6bcbe05ea6c42c4934569022100f21d907e3890916dc4fa1f4703c1e50d3f54ddf7383e44023a41de562aa18ed8",
- "tcId" : 209
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200043f7137e42b6c5d98c6bb61bce91426f8e2c2f33fdc893a0d32be1ba0042c21c59c0df75782993e9a31ef773dc73eeb038cd6594f43ecca77fe586105efa19833",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEP3E35CtsXZjGu2G86RQm+OLC8z/c\niToNMr4boAQsIcWcDfdXgpk+mjHvdz3HPusDjNZZT0Psynf+WGEF76GYMw==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "3f7137e42b6c5d98c6bb61bce91426f8e2c2f33fdc893a0d32be1ba0042c21c5",
- "wy" : "09c0df75782993e9a31ef773dc73eeb038cd6594f43ecca77fe586105efa19833"
- },
- "tests" : [
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "304502203c3fe1264b2995df966337a6ede98fc5c71893e352696703cf863c7e63ac0627022100bcb0a9a02e57ce80f72d91eee92a99ba5b16a3411f9dd541bfdf44a7f2ad54cc",
- "tcId" : 210
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "3045022100a3f9d3ea2c35bb1899508129e0edaf40292ec3b895dc0c6396d9b162b8d88134022073a92358fc9921bf80b3f0f6244d73b141f007a632e8c3cd1f988752e6492c79",
- "tcId" : 211
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "304402203c137c3cf8feb9eb4f7f5984e954918dd408b4df79534150919694d07877067f02202ca4c9d4440262934ca5c8b2cc4bfab3348462b5ab3a308d097dee9b8077a0c0",
- "tcId" : 212
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "3045022005916c5b5d012f85a11fb8adccee8403674dd259e9b158594a3979346d38620c022100945e551009e002951ad9551ed507feca41103c3bf23a156eaefd0c844f3567be",
- "tcId" : 213
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "3044022007c1801de1ec0c089fcbc6301deaa0c161ae59c7e367c6f0376d3fcfcbc6a3e5022006d8ff0b593ed08b35e781551e8ca8222a8f4524e07dc055ec9b78567fe7cd81",
- "tcId" : 214
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "30450220204ff2e911d442d3e46979b2177894bd07cf25485b990f6f162335f916e9d2d00221009825c6539cc3a4d1be8ef523fe28f99f5445377f70471bffbd88362909ee4fde",
- "tcId" : 215
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "304502206a2e4b1eda9b5e5426e0fe6f2fe3180793ec1ae414b4c1164c1cb85a85af49b00221008a40315be22f196eb6d4dca64adab267778eaef5884a074573cb4f2bed185519",
- "tcId" : 216
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "3045022100aaedd77d46a678ca6200a38fcb35550d6c523b6e929efe621673307c295c7de602201dbf3d1edcebd7f7caa604ec3d967a213c57ca2f016ed1c281a2bbce2978c59a",
- "tcId" : 217
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "304402204491da1b704c0410cf6d3ed7c40e770f35d54dd79eb7646537b5e48654b9a28e02204118b53ab6da09a9fcc23af86d8fb8db903a596883167c29042bc13618a3a1b1",
- "tcId" : 218
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "304502205f9da7e8a353a0b324b512a6d7bc9daa655041c09e1aebd281f85b6445ba7ca3022100fb1386685b75f05d836a9a7c2aa698b543fac3cb3a54a256efa9f6f1efaaaedb",
- "tcId" : 219
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b810400230381860004013d6e38dfa75ddb2e7822a68192ba40b947bdbbb666d40c63d03b757eb512ed826bfe58bb2706af6ed7b771c98d86133a8d6f5ac6ec22c589cef90e43480f2b2bee0061d76af46853de2a9e2b444cba5adbeb38ad82541a483350c313ff259b93e0d64085566c6c2bb6ff0fbdbd46e69c48b37ec3905d06234bbbd8ca4198d564c8e465",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBPW4436dd2y54IqaBkrpAuUe9u7Zm\n1Axj0Dt1frUS7YJr/li7Jwavbte3ccmNhhM6jW9axuwixYnO+Q5DSA8rK+4AYddq\n9GhT3iqeK0RMulrb6zitglQaSDNQwxP/JZuT4NZAhVZsbCu2/w+9vUbmnEizfsOQ\nXQYjS7vYykGY1WTI5GU=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp521r1",
- "type" : "ECPublicKey",
- "wx" : "13d6e38dfa75ddb2e7822a68192ba40b947bdbbb666d40c63d03b757eb512ed826bfe58bb2706af6ed7b771c98d86133a8d6f5ac6ec22c589cef90e43480f2b2bee",
- "wy" : "61d76af46853de2a9e2b444cba5adbeb38ad82541a483350c313ff259b93e0d64085566c6c2bb6ff0fbdbd46e69c48b37ec3905d06234bbbd8ca4198d564c8e465"
- },
- "tests" : [
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "30818702411b01186e46e19d71dc2062453be3b4b94c27556069ac5211f6cdb99d4b4d89405c2da8663a32dcec5515cb7357564b32a6ce33f379f3df35b4e2a5db855ad1d7be024200efea92828d6cf125504a247141adc9ecf35fde30c7e0487eff4fbe2f3949b7788d034968a198dcfb4ad1bb6b873ef9f5c8683757aa716f8c00dbc1ccc534c2fece",
- "tcId" : 220
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "3081880242016f39b566c7e037f0c5dfe9f453fb1dc488fa610c341408333326cb632d16dda66af7286e4237de3310cffd6863398257fe2c9e1deb30d61d098c7d5c255b4b45d9024201a49858926129db492d53130bedd4c9be18ac9f7bfd7d62eaf99fe12f58e81d2786b12da9c13b3f025f94f5398e784e909ff363125b98dc35ba850400ef8e4efa2d",
- "tcId" : 221
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "308187024200fcec8495af424d3d6468cf79a0b2d6a2ff7d3c249e78ea1f157e1558066e5118558a830ba105dc8a29b8375642593f0e5c2d23b62a39954ad7a4be3e82a69d817b02410960873c13cd81af95e3980db5fdc537bebfc9ebae4d94d05a276d3bdd86b65ec60175471ae661e16c225c6e17635664a20e8160f7365e4034ca625642de17d479",
- "tcId" : 222
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "308187024171ad3beb8abd01e53fed56ea34f1bd9ae252d290e5c5ae364ae60ce67b0f42186254db2783333a97eeabf2a84b6bcb4683107e03d97bb3e67d400cc8c314a20939024200dc4afe3dca6572fd4a56ba150d3a5266d7828f2c764c416fa2b2e64b1c694040d1fe8061e742c9212ec4330a0d1e312ad65ec4623821d3327da583b78e6a2539ed",
- "tcId" : 223
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "308188024200e53d62a974603f05997fce2df0cb2df83a34cc34b56d71db12cf980db9834e1a322a17fad9ba8d7ea58e2d31de4688527fc5f18424470a51383dbcb177c97c2f6f024201668d2e11b296637f7886291eb339ecfbd630be841b622f81df118cdd16ecebfd0999dca4f82b7fc4f17be81c64d6903ca2a9d854702b6783b1bb47455fc9665032",
- "tcId" : 224
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "308186024107250d6a30bc7c47a63f2aebb3eb0b7b9be3bf833f761bf6a56cd1300224e5753c85987f9e61401c0434ab1566b6a3e5519575415c24417c69c39fc43dab11d3cb024157f319ebf47bbfe2b7d38a3da246b135f31baa455c72c5869016d7fcabdaec581efc5b756d0f451ad079f697961225e55495fbac374bb246fd499c1ba7b9bbae57",
- "tcId" : 225
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "308188024200d2b0e8938f97fad395fa00d91888f9ba29d4df80626cc278ad233c9a9fdc5fd1762cb6a53bc34d1f6f0b1b42dd0ac5bde7c3f95becf6fe39f356a47ffa7cc2343a024201cb90ceb1c46d9d0f584d0e8b58b21a5e9d7b101dc253a1109fe99715f32223b4e02ac3a880e8eeb7d4a92a7d10d33543fad8c78cfb0700bf794f0497f4c8276c3c",
- "tcId" : 226
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "3081880242018a4cffe3fbacdaffe208bbd0c682ffdfc7d77a41d05e71f8e5bfe3685279bc62dd35e3ac1c6bec556bfe3ba0b12c6ef6124dcf05bc61d66856c00740bd271856c8024200a6105606f6bdf923a8dd1a70802a98d42b83293dbd8e78799d9093e22819edc20754e0da61f05c0650069a2f766c0e2caea947d436c9a4cf1d7c4881315fa840b6",
- "tcId" : 227
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "3081880242010bc1d5bcda1e17bb6abffe483005885455d6042eb89dc346765017a270524ad03d8bce116860c79f9a33085b6d9a9ec0bd03944bd117cc24a46e4cfd58a75afa18024201db04999a96b4caa3725d1fd178e0471e05ea8800fce35e1cf52d1c8006083898a28cf8b106eb58588a0aa642bb91581aa940f3e02b9fdcb064cf29cf012b449cb4",
- "tcId" : 228
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "3081880242017381d2a07c84ebe2fb4356f07c27a2d110d6d1ef7c0a23dfb3a038dbbc53d457d3207039bdfb46bacae9d9ed821d46ce328d3d2acdf9641331b28713998d0398dd024200b6b943a7300d396d07a76c29e80a88c1ff1a6def766fb72022db7bb006e311e6cfbc4452390962461e767a97383d2f908122645e82710dd7fbbeff947d2e488bad",
- "tcId" : 229
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d03010703420004e10ba0fabf162af055b859b7d939435cce257ffa274349456403292bb8cb60e9fa1a0a6408df5e4e3675f47621c8f29cda59832a7acedcd3315f6a8ea848afc8",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE4Qug+r8WKvBVuFm32TlDXM4lf/on\nQ0lFZAMpK7jLYOn6GgpkCN9eTjZ19HYhyPKc2lmDKnrO3NMxX2qOqEivyA==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "0e10ba0fabf162af055b859b7d939435cce257ffa274349456403292bb8cb60e9",
- "wy" : "0fa1a0a6408df5e4e3675f47621c8f29cda59832a7acedcd3315f6a8ea848afc8"
- },
- "tests" : [
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3045022100f5a4fa630913d5ad82d46e31c305e6b0933b4d9aaaf52997cf86527e36fb784c02206534b74e9d19ae8756afdde2876ad90195863f7c04ee61997eab183d175cf770",
- "tcId" : 230
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "304502204ccf6585c28ed8ec75d4023f2f8827c3e87c30fa884d992f53b3515ea6060d6b022100b80de22c729068f2191aa7bb638cb26b0018914981b4ab20a09d48333147b9a4",
- "tcId" : 231
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "30460221009f14dfcd5b7963d2f6d3ea0925bfcbdbf3b6a9500d080efbb787f6b792886312022100eae1881b232e64f10dd41b0b94c8c4e662ff3be7d25f1137ede60737664a2c7b",
- "tcId" : 232
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3046022100e43b319bd4d94cd6beeb23caf950dbb448d713de4830ac4f749a30149932cdfb0221008118d54087fae841c61eca28622f95a315f8d9f505ba30fea43c17a7b48e6f9a",
- "tcId" : 233
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3045022100d66f8bfe727d5697feda9fd2a7be014454329f6a72414b69a181a7a7bc6614d402203e7aa1f19cb90fa30cebd30ce5c3022748f050a418d1d42550a76f4eb497b0e7",
- "tcId" : 234
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3046022100db555ffefc339c394d1a8059390a78aa9eba72dc008421f581f78ed1b29c3e910221009082dba3909cfc596ade6108a199d66fc1f726016eae2871c8e343bc14639bb3",
- "tcId" : 235
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "30440220190dd08a839b27641f1145fc8e04e8d71a55f2be835d360bd1c5f5d357c749490220474915b4bc6d81437eaff2f438e05bedcfd10f4222984782f3202ee32b55253d",
- "tcId" : 236
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "304502200159de0f5c777d001cf22e46cccd10dc01a124f12bc707aaaf305d3e05f0fc1a022100c2314c660d0107473edaf36e718248971522c20adea9e7b1f01fe174510ab00d",
- "tcId" : 237
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3045022100ed5137b13ce59346a00a2380e3ff1a874f52172ecd601652dd12e38ce638bb410220776161b448299c2cbcd9856dcd2aeea99423d817895ce9c5d3071c81bf7b0218",
- "tcId" : 238
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "304402206c5fa55a3cc7d21fcdbbd353acaff2c33bcce0a7768277dfea9999c49b80e78e022029316ba855bcfdfed36032e648413beaea51675286ed5fc7c67a623ec6ab550b",
- "tcId" : 239
- }
- ]
- },
- {
- "keyDer" : "304e301006072a8648ce3d020106052b81040021033a0004043d002e8a7578988a8013868221598c76b22591f95b6328a07f60ff1bb55957b1a83fce6aeeb38f2c1489d170e51fd3ba396e4dd4997314",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nME4wEAYHKoZIzj0CAQYFK4EEACEDOgAEBD0ALop1eJiKgBOGgiFZjHayJZH5W2Mo\noH9g/xu1WVexqD/Oau6zjywUidFw5R/TujluTdSZcxQ=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp224r1",
- "type" : "ECPublicKey",
- "wx" : "43d002e8a7578988a8013868221598c76b22591f95b6328a07f60ff",
- "wy" : "1bb55957b1a83fce6aeeb38f2c1489d170e51fd3ba396e4dd4997314"
- },
- "tests" : [
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303c021c31788aeb1f7e5a8ef02691c94b6ef09c178177e1efd0b66024e2bbf0021c61b855d33928aa6a06ce4744459246912bb546299dc1361afe8b54f6",
- "tcId" : 240
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303d021c535fd315dc20cffdb12d9760e78f265b372cbab47d16d452b7323e29021d00b647908b7afbc054bd8da42a2c919542e3f46ee500c701c73077bcdb",
- "tcId" : 241
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303e021d00c4732d71dfa662e7954ff9bebfd649d0979fb3b1cff0f003d2bb2491021d00a646d691a1298e7c35a97a3b466a24fb6920b4fadbe879c7753b6cc0",
- "tcId" : 242
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303c021c5234ab61f3968397d91b43782dd4c1d6fb9d3efe408179350776fbc9021c2eb655fb47d872f419455708db8eeb887798c8b4f2c7a97676dba7b8",
- "tcId" : 243
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303d021c0130551eb38f5031878979407512b41539e433dc286d1fede4b80be3021d009bd60de297786209c5432b806a54b7631621d46de47d48842ff681c5",
- "tcId" : 244
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303c021c27d821f9c9cf6318f2a037de60fa4782c351ba4ff80d932d213c4d07021c62ee9b287ba2a0b3e30ddd3fc64e7929bdad9113a1282c10643ad592",
- "tcId" : 245
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303c021c1016ed7dbcb22340942aa8f0e7a84101d96dc42eb55ca2d681632e90021c5c16afccd82d04f8c444de978fe63d5450d07e12b203c32b2196b495",
- "tcId" : 246
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303d021d00ed965e2d4693550bb57f5e02ddb4decd39a6e04877acff12a73a8235021c355bcf5024e4c59fbd085b93309d9c5bbe1a46753ffb4f721a893886",
- "tcId" : 247
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303e021d00bafa121f3eaa86be5126d205415bbac620a5629055ca27d3df9b8678021d00b85d2b3b11517a994317139d28b75772dec6aeb21b1e9fa07886ad8c",
- "tcId" : 248
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "303d021d00dc63d34b62603b5f6f5e3a55b65d0571b5d1c5aebe0b2ebb5ffac3a9021c6a88c49cb0d3dd86bae375f93c299dcd32c372ce201e4ab50b31d233",
- "tcId" : 249
- }
- ]
- },
- {
- "keyDer" : "3076301006072a8648ce3d020106052b810400220362000437c5fdb948494b3fd8bb5ec5930025276fa55d43f660e1f06b74a4462063f4735ed0a6d9dfdee6797b70655755e8e2e373d53d1f06fe73b766f5c4e06b788dea92b7a17d7cc1abb95d2c90cb2c09b5a2de2e672126debc46516e910952a91dfa",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEN8X9uUhJSz/Yu17FkwAlJ2+lXUP2YOHw\na3SkRiBj9HNe0KbZ397meXtwZVdV6OLjc9U9Hwb+c7dm9cTga3iN6pK3oX18wau5\nXSyQyywJtaLeLmchJt68RlFukQlSqR36\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp384r1",
- "type" : "ECPublicKey",
- "wx" : "37c5fdb948494b3fd8bb5ec5930025276fa55d43f660e1f06b74a4462063f4735ed0a6d9dfdee6797b70655755e8e2e3",
- "wy" : "73d53d1f06fe73b766f5c4e06b788dea92b7a17d7cc1abb95d2c90cb2c09b5a2de2e672126debc46516e910952a91dfa"
- },
- "tests" : [
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3064023063a13e9cff9933f28be9d5512a41e7d360267d969787bb547de033ec25f4ce8d4241739136ef85c87d4fc26b508e6b0a02300d58575ba57ac5677cf1c0c482310f2ac49bd8e7777cbae1c4255a203b43fc4c57cf80d29054305a4816fa585d1d796f",
- "tcId" : 250
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3064022f2d4f256b6cb1a53506a80dcc9168819143d406429c5d6a250382de196d5d85f15d55a03c2f75438c50ee88e500bfcc023100fb09a8ac3864ae3392d4ff8c6735525daccc3c406abf2b55127c1073e637a2d6ffebed7d7e76c33080323732f932b061",
- "tcId" : 251
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3066023100ab7f86f08c50b3d270130751f841d7872d9cd9da32a20d45af87829ad1b3114ed37c40971abf1b9b901bb90e86ec66ed023100f7a2d3aed355f4fa173e5011da4759bf842c607f45e9716f95a55d9c164901113ed50df4883c52b83db7905d34edb7cf",
- "tcId" : 252
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3066023100d6b7b5fb43b88233c0c08039489b0ff9c356488887aead4a4c67761d9dae82ae53346cc4d962453c95d8c6cc8138b15a0231009f9651cff09767563d5821940d16ef418d80b682af5137bfef8ff12ad0c5b0df90cd936b4ac75b750f52b8609b49cb00",
- "tcId" : 253
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "30650231009f04654cfa89783482e23f24a63e0161108b963353856216e8f668b61ce33cb552d9eaf110c1ebf0c7d674410e9efbf20230411c2050c857b0f312ccc3e69afff849bf89e0ff3868ff5693d69c16d901d4d976306b8f5e7cc0a908faa88a06aa4839",
- "tcId" : 254
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "30650230221ce3308b394973315c1ae936d41cbe103b3c480d0249063b491c6f282b6a003910cd1b53f78333d1d6bd0fc45cb775023100f7ae3e8c0849282145e8d411e69bb9abf8df77da4c794b639d0fa16e828ca74034e0d190636fb902cce42d29df3ae674",
- "tcId" : 255
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3066023100fe157fe0d7830b2df78a6f41581b3982e2fe2b37d0c50a90804b9fa51fafb64f88b8a4a2a8899eb85709805626bb2374023100b5e8e146185dd26e1a7178f64377456e2bb56e6e3322d27bc8899a14bed7d8652e09d03dfc1730e3ac8ba1f6f0d7fe8d",
- "tcId" : 256
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3065023100d9533df0741a9d3435366d9347259457bf1ace27f436b809a36a04f73a6499aaf1778bfdae763b16f6ab8329beef4cba0230282693221bf9ee2883c2793bccf45bcc50eceafeae3d6f0b0e7e55edda06bc36deebaabb3aee25339b37e7b2fc420f1d",
- "tcId" : 257
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "306402304b36a23584076fc30ab2ef9e6b026ce1e60a7d380dc6be69fe2c1e1ec6edb737a8cc85c1486e810d00190cbcb6272bc6023030c794a0cca240578eda7d89b5f0a34b05330e926f7576327550fc444c3aee66c4d913c8d90be9b405486c8c879d1080",
- "tcId" : 258
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3065023100d1993840050f853b6b046e3761a6007dca17f24bd96cc38cf08cee3b25ce1142cbe1b23bd97f49f1f73667f9956a0b8502305d1b757f67de261d5b7729a0cb582a0d4133ba6ffb329315328e43a2d3345b670a6c44ddaef6ff4b400616cdc0ecaf83",
- "tcId" : 259
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b81040023038186000400252ba02b52511e0d27c926f51933deb9da574b65790d0586514afe02478a384c7709702304fa45d891f74ea5b7774658ec7f6bd665b7b857a19946ed97a13e12370122a5e01c6cc84e4ccf55a27b836a31e3faa91a27b8967b85abd815595f76bf7a0ed524ac8730bcb3b0c536907c8d492718bbbcc581d27b8d347fbe7844f65675fb",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAJSugK1JRHg0nySb1GTPeudpXS2V5\nDQWGUUr+AkeKOEx3CXAjBPpF2JH3TqW3d0ZY7H9r1mW3uFehmUbtl6E+EjcBIqXg\nHGzITkzPVaJ7g2ox4/qpGie4lnuFq9gVWV92v3oO1SSshzC8s7DFNpB8jUknGLu8\nxYHSe400f754RPZWdfs=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp521r1",
- "type" : "ECPublicKey",
- "wx" : "252ba02b52511e0d27c926f51933deb9da574b65790d0586514afe02478a384c7709702304fa45d891f74ea5b7774658ec7f6bd665b7b857a19946ed97a13e1237",
- "wy" : "122a5e01c6cc84e4ccf55a27b836a31e3faa91a27b8967b85abd815595f76bf7a0ed524ac8730bcb3b0c536907c8d492718bbbcc581d27b8d347fbe7844f65675fb"
- },
- "tests" : [
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "30818702412a996b82715ac9f1fe285a850a617e51ebabf92b521aa0c8548b6ab3fd218ae9bfd63f04416943a4c6ea6a9d679b770a40fb2298511c9e1541f08f63680dcb920d0242011e06a29b2b4b4342d23a5e1986fd5ec5970719a9afa019b17be2b29655187b0ed1d81359dd48d3dcb8c8ca201b33038dfb5980165de4797ae9108d3544dce9e9f2",
- "tcId" : 260
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "30818802420143eefbaa995087d553835fe93afcf43364d834e37302317c0587b7c86604dde272474e7f2501463280e0e979eb59e79e9f7a3236d967230fc5677fad4b29b424a1024201578a2dbb28cb4e7ca50bd237253b7912f3c8a7cb455d7da98c599855838b0dde6ed83276ab8eaefb312756cd3e16e53377358a98b8c612168e84261b510ea42253",
- "tcId" : 261
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "30818702420131247501344d5aac53cdc31d65e22ab02bf552c246f0fa92ea7d24999bf6df4474c64af6c892ad05b1c3d83634c3420f55993d10589352674ffbec71552ff66bb102412655b482f9231e3ba0283b96d0a934c6f0c6282f7907e8d0aa1e6707d0410a78d036461b5e5d3cf7f0e7ceb23c24f334d6cbc2f1d1684039a14c22d8538debb62b",
- "tcId" : 262
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "308188024201538632e5ba4b1119240dbe68e026a9ffe934ad46f129fae49dd30caf2dec9e45504be132685474c6ba473f39f9439717939b3dc725a82488c77b17358511a3eae90242015d36c05195a17382a229a61a011639f8c309696d68e1f3b95d0053ee23bf6cb6249bf7a4fc9f1517147a33438c66edef6c587f00d3de8635be84a785d5e7baf319",
- "tcId" : 263
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "308188024200fafebd657159b7a0f5d9e3b58ceffcb30056407fdbbf345f416d9cfadfc22edd4f31d9ba39a8e3a0ab1a4154f2417ed99cf80600cf95ecb5ce8b0e7ee79cf84c7a024201c47968f0a10144d6f399a270bf8c663eb083c2c6629f13704e855a84d78fe4fd9e4ffd81191882b6ba51b220cb6bc94c55f89a8182460a321325a0c978f57bc17b",
- "tcId" : 264
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3081870241138ffe382f05a34b2aea9bc90c2c5cac363d2cbd3af5c4fd1b39e75a92b34d6a1e6f0304a29a1b53651bda15840e1a93971bf20121c2d72d61481b95c3777116cc024201076665a62dd5dc147b30eb6521deaab06125d77b020c756940b21e1ff66f0d9b18b0013427b72a5ace91ccb790f94d0fea8f058f75324d4803283d2d3ea725a09c",
- "tcId" : 265
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "308188024201a1f9f065bab50e83ab6c8c9008df1bfcb74f344f02efadab68c41d6f89c082157b978562bd4afea4769fbab392224682ef2683b449888f83205917e0918bbec217024201f7c1b72a0c0be8dddda08219060254bfc1e3e3c65427e89eff7868a7d9cfee31ee6653d455041ffa273b1ea383518b33231da95ea353a4d9ff3e5fa8c94c99e8f7",
- "tcId" : 266
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3081880242018270e7745dad6d8488720f4c93b69700d9717503887288c671d916cd649595f9783591833116b2ef912fa72d259ab7114ae3a182a9864a7edd4e6fcb3990649ce702420146242a4a3483946bc090a40ac39339fc124368e7535c84530a98aa3bbcece21909605d4c045b22f611ee5bc33179f11dd0d528c7b64ca241a47a273430b5a4e844",
- "tcId" : 267
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "308188024201a04b162ee70667cd609d86eb5410b9d7c0c72a95ff3b3cab5c2d51023806a221d18db37a130be74b32356b29f6e6420bc022f83f60999b4176d5c9e31d900f226b0242011eb2c375e10607769fee41fa0ab61bd7c4b2761776851590e75bc2c91a0d1f5db1e8031df3ae6ae753e7ee9465c7fb547f97ebf080f756d33e323b0ba0afeeef23",
- "tcId" : 268
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "3081880242009dc34469da72d84ac5addcb57e8b47186733860fc0ed44ea83ed28987cec9549102e537db86589e27204015cd2b2bf197dba0c21f28f01bcb16e0c0ee623e395fb024200db1653be45deca922f80d620f5524d9ce88cbcc9e5ee6c6be6227836f8badf6d99138bdde1ba7b9ee3395382e827f2adbea608ca51175a64c483f1342193f52bbd",
- "tcId" : 269
- }
- ]
- },
- {
- "keyDer" : "304e301006072a8648ce3d020106052b81040021033a0004d90c6ccc60a40e92013f34fbeaa6d9e765e4a25f937f53faf6dc8595e603a9c4b1a60a5a51531b2fb1b57e38151a859c204f0f6c27b6feb6",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nME4wEAYHKoZIzj0CAQYFK4EEACEDOgAE2QxszGCkDpIBPzT76qbZ52Xkol+Tf1P6\n9tyFleYDqcSxpgpaUVMbL7G1fjgVGoWcIE8PbCe2/rY=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-1",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp224r1",
- "type" : "ECPublicKey",
- "wx" : "0d90c6ccc60a40e92013f34fbeaa6d9e765e4a25f937f53faf6dc8595",
- "wy" : "0e603a9c4b1a60a5a51531b2fb1b57e38151a859c204f0f6c27b6feb6"
- },
- "tests" : [
- {
- "comment" : "Hash weaker than DL-group",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "303d021d00a2dfa28cce02d4006d07d3251a8ad54328571941869f48f3fcbcc316021c6d5cbf4e497d80bb1ad7955b441917872580c8977b4c026420ff449d",
- "tcId" : 270
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d03010703420004e49b6e5e078e9aa4364583f037efd94fb1058b9de125cb2a471981c343e662b2beaa75937c479c738574093053a2d54218753a967da74c0064d52e6a4db2cd73",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5JtuXgeOmqQ2RYPwN+/ZT7EFi53h\nJcsqRxmBw0PmYrK+qnWTfEecc4V0CTBTotVCGHU6ln2nTABk1S5qTbLNcw==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-224",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp256r1",
- "type" : "ECPublicKey",
- "wx" : "0e49b6e5e078e9aa4364583f037efd94fb1058b9de125cb2a471981c343e662b2",
- "wy" : "0beaa75937c479c738574093053a2d54218753a967da74c0064d52e6a4db2cd73"
- },
- "tests" : [
- {
- "comment" : "Hash weaker than DL-group",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "30460221008febf29c959ccc9c138a3190b9e22d1721a14351ddb2be669aa4370b944fc318022100d41f7637c75f4f4631aa2dbd42e1282f8a9ac13fb869339d10c3a00a5953397b",
- "tcId" : 271
- }
- ]
- },
- {
- "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004a884162c27b9b66355f98c71d58a568d1306a3cbb530f527355deabc9a91ee1e7c9a0f0667435ec7ccb2507eb93c5ea8b2326d0e69c1e053e49b55de8d6257a07f1421dcfd49290c962d71ea5e5585917d406bd78a345f721e183e2d53a394b2",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEqIQWLCe5tmNV+Yxx1YpWjRMGo8u1MPUn\nNV3qvJqR7h58mg8GZ0Nex8yyUH65PF6osjJtDmnB4FPkm1XejWJXoH8UIdz9SSkM\nli1x6l5VhZF9QGvXijRfch4YPi1To5Sy\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp384r1",
- "type" : "ECPublicKey",
- "wx" : "0a884162c27b9b66355f98c71d58a568d1306a3cbb530f527355deabc9a91ee1e7c9a0f0667435ec7ccb2507eb93c5ea8",
- "wy" : "0b2326d0e69c1e053e49b55de8d6257a07f1421dcfd49290c962d71ea5e5585917d406bd78a345f721e183e2d53a394b2"
- },
- "tests" : [
- {
- "comment" : "Hash weaker than DL-group",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "306502305158cdcc24d284b3427c1364844c04129b5d2d802bfa10401f81fc9c6fc0a4e66dd9c3d9a9964707494c497a5f702949023100c48ae0e2e4610bf39902f14e9abd0e3e785218711320dd353b0c5c4699f575570e0d6855dfcc8cbf28e88cadc3802cea",
- "tcId" : 272
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b8104002303818600040024654b7e0621518502ecf70d7dce95c1000dacc7ea72be66462b2ae13befdc7fcbcb188f811c41ab67b0cb6490a8fd51a6561103b7b8b61413ce7324574ef9aa37009a61befa9b2b32c250b96e7868cb9de26e480b7ff608fdd64e02a392e216098a0d3383975375df15671fbe8d32165bf954e8b4b3efcef764ecca11dfda98e2073c",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAJGVLfgYhUYUC7PcNfc6VwQANrMfq\ncr5mRisq4Tvv3H/LyxiPgRxBq2ewy2SQqP1RplYRA7e4thQTznMkV075qjcAmmG+\n+psrMsJQuW54aMud4m5IC3/2CP3WTgKjkuIWCYoNM4OXU3XfFWcfvo0yFlv5VOi0\ns+/O92TsyhHf2pjiBzw=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "key" : {
- "curve" : "secp521r1",
- "type" : "ECPublicKey",
- "wx" : "24654b7e0621518502ecf70d7dce95c1000dacc7ea72be66462b2ae13befdc7fcbcb188f811c41ab67b0cb6490a8fd51a6561103b7b8b61413ce7324574ef9aa37",
- "wy" : "09a61befa9b2b32c250b96e7868cb9de26e480b7ff608fdd64e02a392e216098a0d3383975375df15671fbe8d32165bf954e8b4b3efcef764ecca11dfda98e2073c"
- },
- "tests" : [
- {
- "comment" : "Hash weaker than DL-group",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "308188024201d9422e516e19f29b1d44450c9a7f63c6621a111f6ac69bbd58a0bcb19dc76d4ffe32dd3ebe796f3b5bf908f882545ba40025bbfd7a67d02507789fe6696384f921024201878e7aa8b9c5dda694c3e9f4bc702ad74ce1e30d959097dfffd173fe57a55fbacfeabe6f514654ea21961f9f2d1f07782f7db156c2807df333de15ec57f58d8099",
- "tcId" : 273
- }
- ]
- }
- ]
-}
diff --git a/testvectors/ecdsa_webcrypto_test.json b/testvectors/ecdsa_webcrypto_test.json
deleted file mode 100644
index 021d152..0000000
--- a/testvectors/ecdsa_webcrypto_test.json
+++ /dev/null
@@ -1,1594 +0,0 @@
-{
- "algorithm" : "ECDSA",
- "generatorVersion" : "0.0a11",
- "numberOfTests" : 123,
- "testGroups" : [
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200044af4f6d1d734798d4c4c6f97c4fff392ee65dc252d617b154ca835ea1535b104fb069171d00e87a92e6c4db1d892bc09b04b5da8bd9b09cfaa41d0a526e55237",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESvT20dc0eY1MTG+XxP/zku5l3CUt\nYXsVTKg16hU1sQT7BpFx0A6HqS5sTbHYkrwJsEtdqL2bCc+qQdClJuVSNw==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "SvT20dc0eY1MTG-XxP_zku5l3CUtYXsVTKg16hU1sQQ",
- "y" : "-waRcdAOh6kubE2x2JK8CbBLXai9mwnPqkHQpSblUjc"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "4af4f6d1d734798d4c4c6f97c4fff392ee65dc252d617b154ca835ea1535b104",
- "wy" : "0fb069171d00e87a92e6c4db1d892bc09b04b5da8bd9b09cfaa41d0a526e55237"
- },
- "tests" : [
- {
- "comment" : "signature malleability",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f8b8d6e21d0c0bb5185319715ccbce2902802e1eca070b7226dec70ceca023883",
- "tcId" : 1
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "f67dd15cef0128e9a4fb3c3e9958dd08039eba90453e8993a54251e667a317ab7e59ce34928cc502a3b3c3758cfb6f4907a2d463b0aba52291793b5854245944",
- "tcId" : 2
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "56179fa191744e602ae7f6ae46e42312c6e336fc83a628ee455c6229b46c33413f0bd962a1a81406a29bc03a4b61c08e9503e75eba0bc29e8bc65494a25d3744",
- "tcId" : 3
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "ca3503dfdf49e158b08046eb3ff169ae4b7f299cfd432ad9d7598ec952dac1c11cfc4c46c9eea69e577310202df187d32c058d9fef2d32bc5283642b79d1373b",
- "tcId" : 4
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "9483c852f5b725da505e8cf57b9148b2772a1f2acc6f479fe8f176e69e1377f5b3cce9b6a9d46d9af3b992f8e947b72b165ac9e216966d34c533a6626796164b",
- "tcId" : 5
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "1656802176c0e98da5512de8f9080f4dd91163c8a7422d1e930d58075309edef88be892159f048816a046d05d426f5d38d38e3f41d52617239fe8f5ae93b1abc",
- "tcId" : 6
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "01b7babae8332b54b9a3a05b7004579821656e9c5fbb7d96607df713de3660519000747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 7
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "48454515ccd4ab485c5fa48ffba867de145f58fb92b1a6a9697c81a7c265f912747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 8
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "01b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f00747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 9
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "48454516ccd4ab475c5fa48ffba867de57785e4deb9a082475c2b6e4c602d3c1747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 10
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "00b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f01747291dc2f3f44b07ace68ea33431d6f51cb136eadbe85e7798724b72ec4121f",
- "tcId" : 11
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "00b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f01747291dd2f3f44af7ace68ea33431d6f94e418c106a6e76285cd59f43260ecce",
- "tcId" : 12
- },
- {
- "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "b7babae9332b54b8a3a05b7004579821a887a1b21465f7db8a3d491b39fd2c3f8b8d6e22d0c0bb5085319715ccbce2906b1be73ef959189d7a32a60bcd9f1332",
- "tcId" : 13
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "tcId" : 14
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 15
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "0000000000000000000000000000000000000000000000000000000000000000ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 16
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "0000000000000000000000000000000000000000000000000000000000000000ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 17
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "0000000000000000000000000000000000000000000000000000000000000000ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 18
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "0000000000000000000000000000000000000000000000000000000000000000ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 19
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "0000000000000000000000000000000000000000000000000000000000000000ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 20
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
- "tcId" : 21
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 22
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "0000000000000000000000000000000000000000000000000000000000000001ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 23
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "0000000000000000000000000000000000000000000000000000000000000001ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 24
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "0000000000000000000000000000000000000000000000000000000000000001ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 25
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "0000000000000000000000000000000000000000000000000000000000000001ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 26
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "0000000000000000000000000000000000000000000000000000000000000001ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 27
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc6325510000000000000000000000000000000000000000000000000000000000000000",
- "tcId" : 28
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc6325510000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 29
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 30
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 31
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 32
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 33
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 34
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc6325500000000000000000000000000000000000000000000000000000000000000000",
- "tcId" : 35
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc6325500000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 36
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 37
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 38
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 39
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 40
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 41
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc6325520000000000000000000000000000000000000000000000000000000000000000",
- "tcId" : 42
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc6325520000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 43
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 44
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 45
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 46
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 47
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 48
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000",
- "tcId" : 49
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 50
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000000ffffffffffffffffffffffffffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 51
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000000ffffffffffffffffffffffffffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 52
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000000ffffffffffffffffffffffffffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 53
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000000ffffffffffffffffffffffffffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 54
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000000ffffffffffffffffffffffffffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 55
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff000000010000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "tcId" : 56
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff000000010000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 57
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000001000000000000000000000000ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
- "tcId" : 58
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000001000000000000000000000000ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632550",
- "tcId" : 59
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000001000000000000000000000000ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 60
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000001000000000000000000000000ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
- "tcId" : 61
- },
- {
- "comment" : "Signatures with special case values for r and s.",
- "message" : "48656c6c6f",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000001000000000000000000000000ffffffff00000001000000000000000000000001000000000000000000000000",
- "tcId" : 62
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d03010703420004d705d16f80987e2d9b1a6957d29ce22febf7d10fa515153182415c8361baaca4b1fc105ee5ce80d514ec1238beae2037a6f83625593620d460819e8682160926",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1wXRb4CYfi2bGmlX0pziL+v30Q+l\nFRUxgkFcg2G6rKSx/BBe5c6A1RTsEji+riA3pvg2JVk2INRggZ6GghYJJg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "1wXRb4CYfi2bGmlX0pziL-v30Q-lFRUxgkFcg2G6rKQ",
- "y" : "sfwQXuXOgNUU7BI4vq4gN6b4NiVZNiDUYIGehoIWCSY"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "0d705d16f80987e2d9b1a6957d29ce22febf7d10fa515153182415c8361baaca4",
- "wy" : "0b1fc105ee5ce80d514ec1238beae2037a6f83625593620d460819e8682160926"
- },
- "tests" : [
- {
- "comment" : "k*G has a large x-coordinate",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "000000000000000000000000000000004319055358e8617b0c46353d039cdaabffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254e",
- "tcId" : 63
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d03010703420004d705d16f80987e2d9b1a6957d29ce22febf7d10fa515153182415c8361baaca4b1fc105ee5ce80d514ec1238beae2037a6f83625593620d460819e8682160926",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1wXRb4CYfi2bGmlX0pziL+v30Q+l\nFRUxgkFcg2G6rKSx/BBe5c6A1RTsEji+riA3pvg2JVk2INRggZ6GghYJJg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "1wXRb4CYfi2bGmlX0pziL-v30Q-lFRUxgkFcg2G6rKQ",
- "y" : "sfwQXuXOgNUU7BI4vq4gN6b4NiVZNiDUYIGehoIWCSY"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "0d705d16f80987e2d9b1a6957d29ce22febf7d10fa515153182415c8361baaca4",
- "wy" : "0b1fc105ee5ce80d514ec1238beae2037a6f83625593620d460819e8682160926"
- },
- "tests" : [
- {
- "comment" : "r too large",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "ffffffff00000001000000000000000000000000fffffffffffffffffffffffcffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254e",
- "tcId" : 64
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200043cd8d2f81d6953b0844c09d7b560d527cd2ef67056893eadafa52c8501387d59ee41fdb4d10402ce7a0c5e3b747adfa3a490b62a6b7719068903485c0bb6dc2d",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEPNjS+B1pU7CETAnXtWDVJ80u9nBW\niT6tr6UshQE4fVnuQf200QQCznoMXjt0et+jpJC2Kmt3GQaJA0hcC7bcLQ==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "PNjS-B1pU7CETAnXtWDVJ80u9nBWiT6tr6UshQE4fVk",
- "y" : "7kH9tNEEAs56DF47dHrfo6SQtiprdxkGiQNIXAu23C0"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "3cd8d2f81d6953b0844c09d7b560d527cd2ef67056893eadafa52c8501387d59",
- "wy" : "0ee41fdb4d10402ce7a0c5e3b747adfa3a490b62a6b7719068903485c0bb6dc2d"
- },
- "tests" : [
- {
- "comment" : "r,s are large",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254fffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc63254e",
- "tcId" : 65
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200044a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e53e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESgPvn5LrJoyvpgEHJImlY4D6DcQx\ncddxKBOzoZoeteU+IT4opgjOmi9KF/2DDGZUAYp5s+AmPZGoupBiLfby8A==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "SgPvn5LrJoyvpgEHJImlY4D6DcQxcddxKBOzoZoeteU",
- "y" : "PiE-KKYIzpovShf9gwxmVAGKebPgJj2RqLqQYi328vA"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "4a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e5",
- "wy" : "3e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0"
- },
- "tests" : [
- {
- "comment" : "small r and s",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "00000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 66
- },
- {
- "comment" : "incorrect size of signature",
- "message" : "54657374",
- "result" : "acceptable",
- "sig" : "0501",
- "tcId" : 67
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200044a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e53e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESgPvn5LrJoyvpgEHJImlY4D6DcQx\ncddxKBOzoZoeteU+IT4opgjOmi9KF/2DDGZUAYp5s+AmPZGoupBiLfby8A==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "SgPvn5LrJoyvpgEHJImlY4D6DcQxcddxKBOzoZoeteU",
- "y" : "PiE-KKYIzpovShf9gwxmVAGKebPgJj2RqLqQYi328vA"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "4a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e5",
- "wy" : "3e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0"
- },
- "tests" : [
- {
- "comment" : "r is larger than n",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc6325560000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 68
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200044a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e53e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESgPvn5LrJoyvpgEHJImlY4D6DcQx\ncddxKBOzoZoeteU+IT4opgjOmi9KF/2DDGZUAYp5s+AmPZGoupBiLfby8A==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "SgPvn5LrJoyvpgEHJImlY4D6DcQxcddxKBOzoZoeteU",
- "y" : "PiE-KKYIzpovShf9gwxmVAGKebPgJj2RqLqQYi328vA"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "4a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e5",
- "wy" : "3e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0"
- },
- "tests" : [
- {
- "comment" : "s is larger than n",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "0000000000000000000000000000000000000000000000000000000000000005ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632552",
- "tcId" : 69
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200040203736fcb198b15d8d7a0c80f66dddd15259240aa78d08aae67c467de04503434383438d5041ea9a387ee8e4d4e84b4471b160c6bcf2568b072f8f20e87a996",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAgNzb8sZixXY16DID2bd3RUlkkCq\neNCKrmfEZ94EUDQ0ODQ41QQeqaOH7o5NToS0RxsWDGvPJWiwcvjyDoeplg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AgNzb8sZixXY16DID2bd3RUlkkCqeNCKrmfEZ94EUDQ",
- "y" : "NDg0ONUEHqmjh-6OTU6EtEcbFgxrzyVosHL48g6HqZY"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "203736fcb198b15d8d7a0c80f66dddd15259240aa78d08aae67c467de045034",
- "wy" : "34383438d5041ea9a387ee8e4d4e84b4471b160c6bcf2568b072f8f20e87a996"
- },
- "tests" : [
- {
- "comment" : "point at infinity during verify",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "7fffffff800000007fffffffffffffffde737d56d38bcf4279dce5617e3192a8555555550000000055555555555555553ef7a8e48d07df81a693439654210c70",
- "tcId" : 70
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d03010703420004a17f5b75a35ed64623ca5cbf1f91951292db0c23f0c2ea24c3d0cad0988cabc083a7a618625c228940730b4fa3ee64faecbb2fc20fdde7c58b3a3f6300424dc6",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoX9bdaNe1kYjyly/H5GVEpLbDCPw\nwuokw9DK0JiMq8CDp6YYYlwiiUBzC0+j7mT67Lsvwg/d58WLOj9jAEJNxg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "oX9bdaNe1kYjyly_H5GVEpLbDCPwwuokw9DK0JiMq8A",
- "y" : "g6emGGJcIolAcwtPo-5k-uy7L8IP3efFizo_YwBCTcY"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "0a17f5b75a35ed64623ca5cbf1f91951292db0c23f0c2ea24c3d0cad0988cabc0",
- "wy" : "083a7a618625c228940730b4fa3ee64faecbb2fc20fdde7c58b3a3f6300424dc6"
- },
- "tests" : [
- {
- "comment" : "u1 == 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "555555550000000055555555555555553ef7a8e48d07df81a693439654210c70532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "tcId" : 71
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d0301070342000404ba0cba291a37db13f33bf90dab628c04ec8393a0200419e9eaa1ebcc9fb5c31f3a0a0e6823a49b625ad57b12a32d4047970fc3428f0f0049ecf4265dc12f62",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEBLoMuikaN9sT8zv5DatijATsg5Og\nIAQZ6eqh68yftcMfOgoOaCOkm2Ja1XsSoy1AR5cPw0KPDwBJ7PQmXcEvYg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "BLoMuikaN9sT8zv5DatijATsg5OgIAQZ6eqh68yftcM",
- "y" : "HzoKDmgjpJtiWtV7EqMtQEeXD8NCjw8ASez0Jl3BL2I"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "4ba0cba291a37db13f33bf90dab628c04ec8393a0200419e9eaa1ebcc9fb5c3",
- "wy" : "1f3a0a0e6823a49b625ad57b12a32d4047970fc3428f0f0049ecf4265dc12f62"
- },
- "tests" : [
- {
- "comment" : "u1 == n - 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "555555550000000055555555555555553ef7a8e48d07df81a693439654210c70acd155416a8b77f34089464733ff7cd39c400e9c69af7beb9eac5054ed2ec72c",
- "tcId" : 72
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d03010703420004692b6c828e0feed63d8aeaa2b7322f9ccbe8723a1ed39f229f204a434b8900efa1f6f6abcb38ea3b8fde38b98c7c271f274af56a8c5628dc3329069ae4dd5716",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaStsgo4P7tY9iuqitzIvnMvocjoe\n058inyBKQ0uJAO+h9varyzjqO4/eOLmMfCcfJ0r1aoxWKNwzKQaa5N1XFg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "aStsgo4P7tY9iuqitzIvnMvocjoe058inyBKQ0uJAO8",
- "y" : "ofb2q8s46juP3ji5jHwnHydK9WqMVijcMykGmuTdVxY"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "692b6c828e0feed63d8aeaa2b7322f9ccbe8723a1ed39f229f204a434b8900ef",
- "wy" : "0a1f6f6abcb38ea3b8fde38b98c7c271f274af56a8c5628dc3329069ae4dd5716"
- },
- "tests" : [
- {
- "comment" : "u2 == 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "555555550000000055555555555555553ef7a8e48d07df81a693439654210c70555555550000000055555555555555553ef7a8e48d07df81a693439654210c70",
- "tcId" : 73
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d0301070342000400cefd9162d13e64cb93687a9cd8f9755ebb5a3ef7632f800f84871874ccef09543ecbeaf7e8044ef721be2fb5f549e4b8480d2587404ebf7dbbef2c54bc0cb1",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAM79kWLRPmTLk2h6nNj5dV67Wj73\nYy+AD4SHGHTM7wlUPsvq9+gETvchvi+19UnkuEgNJYdATr99u+8sVLwMsQ==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AM79kWLRPmTLk2h6nNj5dV67Wj73Yy-AD4SHGHTM7wk",
- "y" : "VD7L6vfoBE73Ib4vtfVJ5LhIDSWHQE6_fbvvLFS8DLE"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "0cefd9162d13e64cb93687a9cd8f9755ebb5a3ef7632f800f84871874ccef09",
- "wy" : "543ecbeaf7e8044ef721be2fb5f549e4b8480d2587404ebf7dbbef2c54bc0cb1"
- },
- "tests" : [
- {
- "comment" : "u2 == n - 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "555555550000000055555555555555553ef7a8e48d07df81a693439654210c70aaaaaaaa00000000aaaaaaaaaaaaaaaa7def51c91a0fbf034d26872ca84218e1",
- "tcId" : 74
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200040158137755b901f797a90d4ca8887e023cb2ef63b2ba2c0d455edaef42cf237e2a964fc00d377a8592b8b61aafa7a4aaa7c7b9fd2b41d6e0e17bd1ba5677edcd",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAVgTd1W5AfeXqQ1MqIh+Ajyy72Oy\nuiwNRV7a70LPI34qlk/ADTd6hZK4thqvp6Sqp8e5/StB1uDhe9G6VnftzQ==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AVgTd1W5AfeXqQ1MqIh-Ajyy72OyuiwNRV7a70LPI34",
- "y" : "KpZPwA03eoWSuLYar6ekqqfHuf0rQdbg4XvRulZ37c0"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "158137755b901f797a90d4ca8887e023cb2ef63b2ba2c0d455edaef42cf237e",
- "wy" : "2a964fc00d377a8592b8b61aafa7a4aaa7c7b9fd2b41d6e0e17bd1ba5677edcd"
- },
- "tests" : [
- {
- "comment" : "weak key",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "6f2347cab7dd76858fe0555ac3bc99048c4aacafdfb6bcbe05ea6c42c4934569f21d907e3890916dc4fa1f4703c1e50d3f54ddf7383e44023a41de562aa18ed8",
- "tcId" : 75
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d030107034200040158137755b901f797a90d4ca8887e023cb2ef63b2ba2c0d455edaef42cf237ed569b03ef2c8857b6d4749e550585b5558384603d4be291f1e842e45a9881232",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAVgTd1W5AfeXqQ1MqIh+Ajyy72Oy\nuiwNRV7a70LPI37VabA+8siFe21HSeVQWFtVWDhGA9S+KR8ehC5FqYgSMg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AVgTd1W5AfeXqQ1MqIh-Ajyy72OyuiwNRV7a70LPI34",
- "y" : "1WmwPvLIhXttR0nlUFhbVVg4RgPUvikfHoQuRamIEjI"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "158137755b901f797a90d4ca8887e023cb2ef63b2ba2c0d455edaef42cf237e",
- "wy" : "0d569b03ef2c8857b6d4749e550585b5558384603d4be291f1e842e45a9881232"
- },
- "tests" : [
- {
- "comment" : "duplication bug",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "6f2347cab7dd76858fe0555ac3bc99048c4aacafdfb6bcbe05ea6c42c4934569f21d907e3890916dc4fa1f4703c1e50d3f54ddf7383e44023a41de562aa18ed8",
- "tcId" : 76
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b810400230381860004011d2fc994df204b63f05ae8420ca390559b80c4988ef639b95c469e5cb24cf216540cbebc470bcaa0466612dbde6d03098c6996e0a05f02902183ceba4b530f4f3500a99e4cdc8a50c0d98d870944e56548dc4cf6bbbf3d6978efbc8fc8778b33e132d2c185c20844cf3df394d522259317e3931f0130f23f6500c880f3a8319ab44a0e",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBHS/JlN8gS2PwWuhCDKOQVZuAxJiO\n9jm5XEaeXLJM8hZUDL68RwvKoEZmEtvebQMJjGmW4KBfApAhg866S1MPTzUAqZ5M\n3IpQwNmNhwlE5WVI3Ez2u789aXjvvI/Id4sz4TLSwYXCCETPPfOU1SIlkxfjkx8B\nMPI/ZQDIgPOoMZq0Sg4=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AR0vyZTfIEtj8FroQgyjkFWbgMSYjvY5uVxGnlyyTPIWVAy-vEcLyqBGZhLb3m0DCYxpluCgXwKQIYPOuktTD081",
- "y" : "AKmeTNyKUMDZjYcJROVlSNxM9ru_PWl477yPyHeLM-Ey0sGFwghEzz3zlNUiJZMX45MfATDyP2UAyIDzqDGatEoO"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "11d2fc994df204b63f05ae8420ca390559b80c4988ef639b95c469e5cb24cf216540cbebc470bcaa0466612dbde6d03098c6996e0a05f02902183ceba4b530f4f35",
- "wy" : "0a99e4cdc8a50c0d98d870944e56548dc4cf6bbbf3d6978efbc8fc8778b33e132d2c185c20844cf3df394d522259317e3931f0130f23f6500c880f3a8319ab44a0e"
- },
- "tests" : [
- {
- "comment" : "k*G has a large x-coordinate",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "00000000000000000000000000000000000000000000000000000000000000000005ae79787c40d069948033feb708f65a2fc44a36477663b851449048e16ec79bf501fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386406",
- "tcId" : 77
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b810400230381860004011d2fc994df204b63f05ae8420ca390559b80c4988ef639b95c469e5cb24cf216540cbebc470bcaa0466612dbde6d03098c6996e0a05f02902183ceba4b530f4f3500a99e4cdc8a50c0d98d870944e56548dc4cf6bbbf3d6978efbc8fc8778b33e132d2c185c20844cf3df394d522259317e3931f0130f23f6500c880f3a8319ab44a0e",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBHS/JlN8gS2PwWuhCDKOQVZuAxJiO\n9jm5XEaeXLJM8hZUDL68RwvKoEZmEtvebQMJjGmW4KBfApAhg866S1MPTzUAqZ5M\n3IpQwNmNhwlE5WVI3Ez2u789aXjvvI/Id4sz4TLSwYXCCETPPfOU1SIlkxfjkx8B\nMPI/ZQDIgPOoMZq0Sg4=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AR0vyZTfIEtj8FroQgyjkFWbgMSYjvY5uVxGnlyyTPIWVAy-vEcLyqBGZhLb3m0DCYxpluCgXwKQIYPOuktTD081",
- "y" : "AKmeTNyKUMDZjYcJROVlSNxM9ru_PWl477yPyHeLM-Ey0sGFwghEzz3zlNUiJZMX45MfATDyP2UAyIDzqDGatEoO"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "11d2fc994df204b63f05ae8420ca390559b80c4988ef639b95c469e5cb24cf216540cbebc470bcaa0466612dbde6d03098c6996e0a05f02902183ceba4b530f4f35",
- "wy" : "0a99e4cdc8a50c0d98d870944e56548dc4cf6bbbf3d6978efbc8fc8778b33e132d2c185c20844cf3df394d522259317e3931f0130f23f6500c880f3a8319ab44a0e"
- },
- "tests" : [
- {
- "comment" : "r too large",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386406",
- "tcId" : 78
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b810400230381860004019a029c77fed04cab1ab8937fda8128fc19bf8c41a8f242f6a9ca6f0ae813c1709b8b03e26a9298fe59f99e3706ffc28c43d26a11690d2ffd815a33ea329076697800125b2a4b635f514fd5d63215672f311ae5935c1774ed5d8a44897b68191e6369ab26df915e2066a943e59a3577319dac5a86640bc8c718d2b159479fdd22d11441",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBmgKcd/7QTKsauJN/2oEo/Bm/jEGo\n8kL2qcpvCugTwXCbiwPiapKY/ln5njcG/8KMQ9JqEWkNL/2BWjPqMpB2aXgAElsq\nS2NfUU/V1jIVZy8xGuWTXBd07V2KRIl7aBkeY2mrJt+RXiBmqUPlmjV3MZ2sWoZk\nC8jHGNKxWUef3SLRFEE=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AZoCnHf-0EyrGriTf9qBKPwZv4xBqPJC9qnKbwroE8Fwm4sD4mqSmP5Z-Z43Bv_CjEPSahFpDS_9gVoz6jKQdml4",
- "y" : "ABJbKktjX1FP1dYyFWcvMRrlk1wXdO1dikSJe2gZHmNpqybfkV4gZqlD5Zo1dzGdrFqGZAvIxxjSsVlHn90i0RRB"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "19a029c77fed04cab1ab8937fda8128fc19bf8c41a8f242f6a9ca6f0ae813c1709b8b03e26a9298fe59f99e3706ffc28c43d26a11690d2ffd815a33ea3290766978",
- "wy" : "125b2a4b635f514fd5d63215672f311ae5935c1774ed5d8a44897b68191e6369ab26df915e2066a943e59a3577319dac5a86640bc8c718d2b159479fdd22d11441"
- },
- "tests" : [
- {
- "comment" : "r,s are large",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e9138640701fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386406",
- "tcId" : 79
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b810400230381860004005f5059308349f9ebbb4d1c55c0afccf62162ec1dd12ef3ed906656924ffd99cab9f06b0eb218cff078a4677a5ce1cc07652bc976aefc732c28f67ef078a434e99900a5d14df310630d76ec03cb6f9b95bf1a22438105c88cd9fd3dac80f857add38271d8ba901684b26d436d4a859ad4cda5e9677b73cab3f3e5e41a3d7996607279ab",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAX1BZMINJ+eu7TRxVwK/M9iFi7B3R\nLvPtkGZWkk/9mcq58GsOshjP8HikZ3pc4cwHZSvJdq78cywo9n7weKQ06ZkApdFN\n8xBjDXbsA8tvm5W/GiJDgQXIjNn9PayA+Fet04Jx2LqQFoSybUNtSoWa1M2l6Wd7\nc8qz8+XkGj15lmByeas=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AF9QWTCDSfnru00cVcCvzPYhYuwd0S7z7ZBmVpJP_ZnKufBrDrIYz_B4pGd6XOHMB2UryXau_HMsKPZ-8HikNOmZ",
- "y" : "AKXRTfMQYw127APLb5uVvxoiQ4EFyIzZ_T2sgPhXrdOCcdi6kBaEsm1DbUqFmtTNpelne3PKs_Pl5Bo9eZZgcnmr"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "5f5059308349f9ebbb4d1c55c0afccf62162ec1dd12ef3ed906656924ffd99cab9f06b0eb218cff078a4677a5ce1cc07652bc976aefc732c28f67ef078a434e999",
- "wy" : "0a5d14df310630d76ec03cb6f9b95bf1a22438105c88cd9fd3dac80f857add38271d8ba901684b26d436d4a859ad4cda5e9677b73cab3f3e5e41a3d7996607279ab"
- },
- "tests" : [
- {
- "comment" : "small r and s",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 80
- },
- {
- "comment" : "incorrect size of signature",
- "message" : "54657374",
- "result" : "acceptable",
- "sig" : "0101",
- "tcId" : 81
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b810400230381860004005f5059308349f9ebbb4d1c55c0afccf62162ec1dd12ef3ed906656924ffd99cab9f06b0eb218cff078a4677a5ce1cc07652bc976aefc732c28f67ef078a434e99900a5d14df310630d76ec03cb6f9b95bf1a22438105c88cd9fd3dac80f857add38271d8ba901684b26d436d4a859ad4cda5e9677b73cab3f3e5e41a3d7996607279ab",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAX1BZMINJ+eu7TRxVwK/M9iFi7B3R\nLvPtkGZWkk/9mcq58GsOshjP8HikZ3pc4cwHZSvJdq78cywo9n7weKQ06ZkApdFN\n8xBjDXbsA8tvm5W/GiJDgQXIjNn9PayA+Fet04Jx2LqQFoSybUNtSoWa1M2l6Wd7\nc8qz8+XkGj15lmByeas=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AF9QWTCDSfnru00cVcCvzPYhYuwd0S7z7ZBmVpJP_ZnKufBrDrIYz_B4pGd6XOHMB2UryXau_HMsKPZ-8HikNOmZ",
- "y" : "AKXRTfMQYw127APLb5uVvxoiQ4EFyIzZ_T2sgPhXrdOCcdi6kBaEsm1DbUqFmtTNpelne3PKs_Pl5Bo9eZZgcnmr"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "5f5059308349f9ebbb4d1c55c0afccf62162ec1dd12ef3ed906656924ffd99cab9f06b0eb218cff078a4677a5ce1cc07652bc976aefc732c28f67ef078a434e999",
- "wy" : "0a5d14df310630d76ec03cb6f9b95bf1a22438105c88cd9fd3dac80f857add38271d8ba901684b26d436d4a859ad4cda5e9677b73cab3f3e5e41a3d7996607279ab"
- },
- "tests" : [
- {
- "comment" : "r is larger than n",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e9138640a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
- "tcId" : 82
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b810400230381860004005f5059308349f9ebbb4d1c55c0afccf62162ec1dd12ef3ed906656924ffd99cab9f06b0eb218cff078a4677a5ce1cc07652bc976aefc732c28f67ef078a434e99900a5d14df310630d76ec03cb6f9b95bf1a22438105c88cd9fd3dac80f857add38271d8ba901684b26d436d4a859ad4cda5e9677b73cab3f3e5e41a3d7996607279ab",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAX1BZMINJ+eu7TRxVwK/M9iFi7B3R\nLvPtkGZWkk/9mcq58GsOshjP8HikZ3pc4cwHZSvJdq78cywo9n7weKQ06ZkApdFN\n8xBjDXbsA8tvm5W/GiJDgQXIjNn9PayA+Fet04Jx2LqQFoSybUNtSoWa1M2l6Wd7\nc8qz8+XkGj15lmByeas=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AF9QWTCDSfnru00cVcCvzPYhYuwd0S7z7ZBmVpJP_ZnKufBrDrIYz_B4pGd6XOHMB2UryXau_HMsKPZ-8HikNOmZ",
- "y" : "AKXRTfMQYw127APLb5uVvxoiQ4EFyIzZ_T2sgPhXrdOCcdi6kBaEsm1DbUqFmtTNpelne3PKs_Pl5Bo9eZZgcnmr"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "5f5059308349f9ebbb4d1c55c0afccf62162ec1dd12ef3ed906656924ffd99cab9f06b0eb218cff078a4677a5ce1cc07652bc976aefc732c28f67ef078a434e999",
- "wy" : "0a5d14df310630d76ec03cb6f9b95bf1a22438105c88cd9fd3dac80f857add38271d8ba901684b26d436d4a859ad4cda5e9677b73cab3f3e5e41a3d7996607279ab"
- },
- "tests" : [
- {
- "comment" : "s is larger than n",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e9138640a",
- "tcId" : 83
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b810400230381860004013b73be0ec4f18b36fdc20aac9675580a20cc725ed0de6fea63ab6111b4aaecc69b1fdf05bb1c7a71c4b7a5a1eaaff23be15604f405b5ecd3b3ed6afea8e49cd64900912180c981f480d2b8b7438988b03a0c5efdbd2da094f082f7fa57ecc41fde8c65d3c9d80f34f9124e151da55d96d2a9b991672de79449bcc1c0192b7650ae90b7",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBO3O+DsTxizb9wgqslnVYCiDMcl7Q\n3m/qY6thEbSq7MabH98Fuxx6ccS3paHqr/I74VYE9AW17NOz7Wr+qOSc1kkAkSGA\nyYH0gNK4t0OJiLA6DF79vS2glPCC9/pX7MQf3oxl08nYDzT5Ek4VHaVdltKpuZFn\nLeeUSbzBwBkrdlCukLc=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "ATtzvg7E8Ys2_cIKrJZ1WAogzHJe0N5v6mOrYRG0quzGmx_fBbscenHEt6Wh6q_yO-FWBPQFtezTs-1q_qjknNZJ",
- "y" : "AJEhgMmB9IDSuLdDiYiwOgxe_b0toJTwgvf6V-zEH96MZdPJ2A80-RJOFR2lXZbSqbmRZy3nlEm8wcAZK3ZQrpC3"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "13b73be0ec4f18b36fdc20aac9675580a20cc725ed0de6fea63ab6111b4aaecc69b1fdf05bb1c7a71c4b7a5a1eaaff23be15604f405b5ecd3b3ed6afea8e49cd649",
- "wy" : "0912180c981f480d2b8b7438988b03a0c5efdbd2da094f082f7fa57ecc41fde8c65d3c9d80f34f9124e151da55d96d2a9b991672de79449bcc1c0192b7650ae90b7"
- },
- "tests" : [
- {
- "comment" : "point at infinity during verify",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "00fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd28c343c1df97cb35bfe600a47b84d2e81ddae4dc44ce23d75db7db8f489c320400aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8c5d782813fba87792a9955c2fd033745693c9892d8896d3a3e7a925f85bd76ad",
- "tcId" : 84
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b81040023038186000401c01eab9ba6ddd21e33421034acd6ac923a409fab349e0380bfaa54b404890086a5e12fb09e1352712cfde15abc2563079a73d333c9c79c670fb06b5d802aa9b77600a76a28d03f657c61bf87ff78e7733a069556d2bd638b79316ab70b5a2809bc8a98a2a843238d4abe2698b2aa6aede1b2541bf3dcd007cf9cd5c4d4969c4f7ffccb",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBwB6rm6bd0h4zQhA0rNaskjpAn6s0\nngOAv6pUtASJAIal4S+wnhNScSz94Vq8JWMHmnPTM8nHnGcPsGtdgCqpt3YAp2oo\n0D9lfGG/h/9453M6BpVW0r1ji3kxarcLWigJvIqYoqhDI41KviaYsqpq7eGyVBvz\n3NAHz5zVxNSWnE9//Ms=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AcAeq5um3dIeM0IQNKzWrJI6QJ-rNJ4DgL-qVLQEiQCGpeEvsJ4TUnEs_eFavCVjB5pz0zPJx5xnD7BrXYAqqbd2",
- "y" : "AKdqKNA_ZXxhv4f_eOdzOgaVVtK9Y4t5MWq3C1ooCbyKmKKoQyONSr4mmLKqau3hslQb89zQB8-c1cTUlpxPf_zL"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "1c01eab9ba6ddd21e33421034acd6ac923a409fab349e0380bfaa54b404890086a5e12fb09e1352712cfde15abc2563079a73d333c9c79c670fb06b5d802aa9b776",
- "wy" : "0a76a28d03f657c61bf87ff78e7733a069556d2bd638b79316ab70b5a2809bc8a98a2a843238d4abe2698b2aa6aede1b2541bf3dcd007cf9cd5c4d4969c4f7ffccb"
- },
- "tests" : [
- {
- "comment" : "u1 == 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "00aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8c5d782813fba87792a9955c2fd033745693c9892d8896d3a3e7a925f85bd76ad0000c6ee9e33cf5c6715a1d148fd73f7318884b41adcb916021e2bc0e800a5c5dd97f5142178f6ae88c8fdd98e1afb0ce4c8d2c54b5f37b30b7da1997bb33b0b8a31",
- "tcId" : 85
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b81040023038186000400186365c73588807a51005412db004b45f5f7be3a6074e6119042978dbfbc5a431e16cc930747e6cd7511505b4c9349cedf908a5a9dbd33cdb0aeccbf69454457fb0014620a29a2691d8038d39e1e4de7c4243c8c42601e719945c1297c1a4b10d7415af37bf1ed0ddc9030bce530185dfdfc4658ff635f6bd9660becc8ff9eca4fddfa",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAGGNlxzWIgHpRAFQS2wBLRfX3vjpg\ndOYRkEKXjb+8WkMeFsyTB0fmzXURUFtMk0nO35CKWp29M82wrsy/aUVEV/sAFGIK\nKaJpHYA4054eTefEJDyMQmAecZlFwSl8GksQ10Fa83vx7Q3ckDC85TAYXf38Rlj/\nY19r2WYL7Mj/nspP3fo=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "ABhjZcc1iIB6UQBUEtsAS0X19746YHTmEZBCl42_vFpDHhbMkwdH5s11EVBbTJNJzt-QilqdvTPNsK7Mv2lFRFf7",
- "y" : "ABRiCimiaR2AONOeHk3nxCQ8jEJgHnGZRcEpfBpLENdBWvN78e0N3JAwvOUwGF39_EZY_2Nfa9lmC-zI_57KT936"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "186365c73588807a51005412db004b45f5f7be3a6074e6119042978dbfbc5a431e16cc930747e6cd7511505b4c9349cedf908a5a9dbd33cdb0aeccbf69454457fb",
- "wy" : "14620a29a2691d8038d39e1e4de7c4243c8c42601e719945c1297c1a4b10d7415af37bf1ed0ddc9030bce530185dfdfc4658ff635f6bd9660becc8ff9eca4fddfa"
- },
- "tests" : [
- {
- "comment" : "u1 == n - 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "00aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8c5d782813fba87792a9955c2fd033745693c9892d8896d3a3e7a925f85bd76ad01ff391161cc30a398ea5e2eb7028c08ce777b4be52346e9fde1d43f17ff5a3a22625c72660ac8810da281f2732dfbfcc10768f07e5951e93c3119d63b6b562cd9d8",
- "tcId" : 86
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b810400230381860004002e2a746b55e05bc130d374c8abb8bf651a2e2b025404f08545befcb95c9f7f681f6f5b9bf2ebc45d4c8572921d3ab5dce144ea5d50ebec89b8c8f010ea31494863008c816f122d5d63b5fea00d1a00ed23577f7ef7d48f3973568353d468368ec77cbc9e3c5012839b74833087d51ba3e680ab5375be680ea8c18f7b619f32b141f281",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQALip0a1XgW8Ew03TIq7i/ZRouKwJU\nBPCFRb78uVyff2gfb1ub8uvEXUyFcpIdOrXc4UTqXVDr7Im4yPAQ6jFJSGMAjIFv\nEi1dY7X+oA0aAO0jV39+99SPOXNWg1PUaDaOx3y8njxQEoObdIMwh9Ubo+aAq1N1\nvmgOqMGPe2GfMrFB8oE=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AC4qdGtV4FvBMNN0yKu4v2UaLisCVATwhUW-_Llcn39oH29bm_LrxF1MhXKSHTq13OFE6l1Q6-yJuMjwEOoxSUhj",
- "y" : "AIyBbxItXWO1_qANGgDtI1d_fvfUjzlzVoNT1Gg2jsd8vJ48UBKDm3SDMIfVG6PmgKtTdb5oDqjBj3thnzKxQfKB"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "2e2a746b55e05bc130d374c8abb8bf651a2e2b025404f08545befcb95c9f7f681f6f5b9bf2ebc45d4c8572921d3ab5dce144ea5d50ebec89b8c8f010ea31494863",
- "wy" : "08c816f122d5d63b5fea00d1a00ed23577f7ef7d48f3973568353d468368ec77cbc9e3c5012839b74833087d51ba3e680ab5375be680ea8c18f7b619f32b141f281"
- },
- "tests" : [
- {
- "comment" : "u2 == 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "00aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8c5d782813fba87792a9955c2fd033745693c9892d8896d3a3e7a925f85bd76ad00aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8c5d782813fba87792a9955c2fd033745693c9892d8896d3a3e7a925f85bd76ad",
- "tcId" : 87
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b81040023038186000400d379f79826b04198df371ab0519d1a7f0a4f199d6149ca8b7f13a5da09cba024fbe7d4ff7fd7a8a93b5cbcaf3c68243f630d47d8f2b652b6a7d6b1c522a75fa9f201c660722d95c83c6b9457944acc671e881e8d17b07362f2f82799456f2f15d662d36aa09d5a5236288d3c1382e3e2308f46867d53c588a370857fae4d32f0a3ddaf",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQA03n3mCawQZjfNxqwUZ0afwpPGZ1h\nScqLfxOl2gnLoCT759T/f9eoqTtcvK88aCQ/Yw1H2PK2Uran1rHFIqdfqfIBxmBy\nLZXIPGuUV5RKzGceiB6NF7BzYvL4J5lFby8V1mLTaqCdWlI2KI08E4Lj4jCPRoZ9\nU8WIo3CFf65NMvCj3a8=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "ANN595gmsEGY3zcasFGdGn8KTxmdYUnKi38TpdoJy6Ak--fU_3_XqKk7XLyvPGgkP2MNR9jytlK2p9axxSKnX6ny",
- "y" : "AcZgci2VyDxrlFeUSsxnHogejRewc2Ly-CeZRW8vFdZi02qgnVpSNiiNPBOC4-Iwj0aGfVPFiKNwhX-uTTLwo92v"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "0d379f79826b04198df371ab0519d1a7f0a4f199d6149ca8b7f13a5da09cba024fbe7d4ff7fd7a8a93b5cbcaf3c68243f630d47d8f2b652b6a7d6b1c522a75fa9f2",
- "wy" : "1c660722d95c83c6b9457944acc671e881e8d17b07362f2f82799456f2f15d662d36aa09d5a5236288d3c1382e3e2308f46867d53c588a370857fae4d32f0a3ddaf"
- },
- "tests" : [
- {
- "comment" : "u2 == n - 1",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "00aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8c5d782813fba87792a9955c2fd033745693c9892d8896d3a3e7a925f85bd76ad015555555555555555555555555555555555555555555555555555555555555555518baf05027f750ef25532ab85fa066e8ad2793125b112da747cf524bf0b7aed5c",
- "tcId" : 88
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b81040023038186000401400fa3bc87482ec1ba75346a129ec8f79456e7d6343b2a6be22490884b8f8b89114c0e5f9558d7627adeae53ff8ce37baf94b99d04f75098ca8e3e77c6be02bc3e01690d770806bde9f4d2760293aba6076066f1762e8448f0d08724ef311ff7596f35e8b6a9346de65bea924b9d30bb972e3b38878172f9040378a0db47299e979856",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBQA+jvIdILsG6dTRqEp7I95RW59Y0\nOypr4iSQiEuPi4kRTA5flVjXYnrerlP/jON7r5S5nQT3UJjKjj53xr4CvD4BaQ13\nCAa96fTSdgKTq6YHYGbxdi6ESPDQhyTvMR/3WW816LapNG3mW+qSS50wu5cuOziH\ngXL5BAN4oNtHKZ6XmFY=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AUAPo7yHSC7BunU0ahKeyPeUVufWNDsqa-IkkIhLj4uJEUwOX5VY12J63q5T_4zje6-UuZ0E91CYyo4-d8a-Arw-",
- "y" : "AWkNdwgGven00nYCk6umB2Bm8XYuhEjw0Ick7zEf91lvNei2qTRt5lvqkkudMLuXLjs4h4Fy-QQDeKDbRymel5hW"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "1400fa3bc87482ec1ba75346a129ec8f79456e7d6343b2a6be22490884b8f8b89114c0e5f9558d7627adeae53ff8ce37baf94b99d04f75098ca8e3e77c6be02bc3e",
- "wy" : "1690d770806bde9f4d2760293aba6076066f1762e8448f0d08724ef311ff7596f35e8b6a9346de65bea924b9d30bb972e3b38878172f9040378a0db47299e979856"
- },
- "tests" : [
- {
- "comment" : "weak key",
- "message" : "54657374",
- "result" : "valid",
- "sig" : "0090c8d0d718cb9d8d81094e6d068fb13c16b4df8c77bac676dddfe3e68855bed06b9ba8d0f8a80edce03a9fac7da561e24b1cd22d459239a146695a671f81f73aaf00a24fbd602ff7012b6b00e9aa1683b45bfa2d62dc768737e8da92cad52f069efbea526acc68096fc0ef9960c6b989bf8922aea38fd463d02c0e7c25e336f32b0874",
- "tcId" : 89
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b81040023038186000401400fa3bc87482ec1ba75346a129ec8f79456e7d6343b2a6be22490884b8f8b89114c0e5f9558d7627adeae53ff8ce37baf94b99d04f75098ca8e3e77c6be02bc3e0096f288f7f942160b2d89fd6c5459f89f990e89d17bb70f2f78db10cee008a690ca174956cb9219a4156db462cf4468d1c4c7787e8d06fbfc875f24b8d6616867a9",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBQA+jvIdILsG6dTRqEp7I95RW59Y0\nOypr4iSQiEuPi4kRTA5flVjXYnrerlP/jON7r5S5nQT3UJjKjj53xr4CvD4AlvKI\n9/lCFgstif1sVFn4n5kOidF7tw8veNsQzuAIppDKF0lWy5IZpBVttGLPRGjRxMd4\nfo0G+/yHXyS41mFoZ6k=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AUAPo7yHSC7BunU0ahKeyPeUVufWNDsqa-IkkIhLj4uJEUwOX5VY12J63q5T_4zje6-UuZ0E91CYyo4-d8a-Arw-",
- "y" : "AJbyiPf5QhYLLYn9bFRZ-J-ZDonRe7cPL3jbEM7gCKaQyhdJVsuSGaQVbbRiz0Ro0cTHeH6NBvv8h18kuNZhaGep"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "1400fa3bc87482ec1ba75346a129ec8f79456e7d6343b2a6be22490884b8f8b89114c0e5f9558d7627adeae53ff8ce37baf94b99d04f75098ca8e3e77c6be02bc3e",
- "wy" : "096f288f7f942160b2d89fd6c5459f89f990e89d17bb70f2f78db10cee008a690ca174956cb9219a4156db462cf4468d1c4c7787e8d06fbfc875f24b8d6616867a9"
- },
- "tests" : [
- {
- "comment" : "duplication bug",
- "message" : "54657374",
- "result" : "invalid",
- "sig" : "0090c8d0d718cb9d8d81094e6d068fb13c16b4df8c77bac676dddfe3e68855bed06b9ba8d0f8a80edce03a9fac7da561e24b1cd22d459239a146695a671f81f73aaf00a24fbd602ff7012b6b00e9aa1683b45bfa2d62dc768737e8da92cad52f069efbea526acc68096fc0ef9960c6b989bf8922aea38fd463d02c0e7c25e336f32b0874",
- "tcId" : 90
- }
- ]
- },
- {
- "keyDer" : "3059301306072a8648ce3d020106082a8648ce3d0301070342000482efed52b9053723f669085c5aae160e7b995362aadfb715224c3b75c78c39ede4f52fd89da37fae31b852ce0f5ef5897dfc79de579435a938e1e723a2f4df06",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgu/tUrkFNyP2aQhcWq4WDnuZU2Kq\n37cVIkw7dceMOe3k9S/YnaN/rjG4Us4PXvWJffx53leUNak44ecjovTfBg==\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-256",
- "kid" : "none",
- "kty" : "EC",
- "x" : "gu_tUrkFNyP2aQhcWq4WDnuZU2Kq37cVIkw7dceMOe0",
- "y" : "5PUv2J2jf64xuFLOD171iX38ed5XlDWpOOHnI6L03wY"
- },
- "key" : {
- "curve" : "secp256r1",
- "keySize" : 256,
- "type" : "ECPublicKey",
- "wx" : "082efed52b9053723f669085c5aae160e7b995362aadfb715224c3b75c78c39ed",
- "wy" : "0e4f52fd89da37fae31b852ce0f5ef5897dfc79de579435a938e1e723a2f4df06"
- },
- "tests" : [
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "1e63913374b3ead80d4b27bfdf7a50eb063c39bc585ea43cbd12f9dce3071a44a7bbd74b1eac2c54fccec9a3523ca29c95b7ace517ab2b0f4995d220481ce326",
- "tcId" : 91
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "e3f4fced8145c2ad8da913d8e15ba196f10a85d44a320c94a09cb194aea8ef1883afe416680a2c0cc915753ec869d9f2117256abecf234164613722bd7a8cb7c",
- "tcId" : 92
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "9f30cc8eafbeacc166a1af87664bef8b2add9c1988841f5de200feaaee1393fdd986454e46e388e11d6d3fb10d7eea364b814751975327401ad124951dbdda45",
- "tcId" : 93
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "67e8a0b9ba82d0c4e1ad9fad1592a179c6dac964215c8a519863141e053f55dd6c41d1be827bb6b5658ccf8c0ff16d87f3ce16d62a7641b64a107191d6531ad7",
- "tcId" : 94
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "9963a72f589bcf7d4a561f8b0bed9af6e5a1309a1f5ab1791ce179d68478fe905c6870382a1ea973a84f85d8365b8d6e67527a5bdc9b80526a28968e7884758c",
- "tcId" : 95
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "74a6f79b92039e101a3a45ad6287d16a05107d07899ec858eade5d51b7b5f61d79f33dc00dbed4edb967eda02768731b4dc5bffe6764e7258b2d7bbf223947c6",
- "tcId" : 96
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "5a5599a21beec4979655e89a77ab145566296f71095c457a40ef52efd98c4bd5cb7b8beff27c7bb66c5ed2aad94b7e204c4c0a4748d1f35aff4b6eeb25236e4b",
- "tcId" : 97
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "d1a536b7938286c12f3d7cc12d779cfd7662dd1b1a80a0e50d6f15d8ec34d1748eedd5e3bf94ce409210e4c58fae664657dc160d41525fd7f62a17d614ccae50",
- "tcId" : 98
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "3e594afa1518a97360941a8930785150ec14cbd9d390da407155557e47540fd7590aeb35acb45eebf80e590585329e0543d3ebd6536321429cd6905541667d8f",
- "tcId" : 99
- },
- {
- "comment" : "random signature",
- "message" : "00000000000000000000000000000000",
- "result" : "valid",
- "sig" : "ff84c44ad23cb2bb9a92309c92c41487e618442f54decd53532f84e14326c49787fccaa0107558605d49ddf10bf83c561dbd75035e3acfd17bb5d49f2de1e15f",
- "tcId" : 100
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b810400230381860004008299c4e2bbbc1a061eb5d09c5ca6655e923fd85f08376cc8de849cf0e3cfa45d242976899c27551cccc30f9d9a82d2baa396e020def5454652239858d1eb44a33b00202ef1fbd2b2717fd75e40975aec6ed7f5c060fb04291711402d503840976b9f6ad826a05957f8691b4cfd8e2b4a774908d7c7ea94e47c33e5763309404cdd5e4a",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAgpnE4ru8GgYetdCcXKZlXpI/2F8I\nN2zI3oSc8OPPpF0kKXaJnCdVHMzDD52agtK6o5bgIN71RUZSI5hY0etEozsAIC7x\n+9KycX/XXkCXWuxu1/XAYPsEKRcRQC1QOECXa59q2CagWVf4aRtM/Y4rSndJCNfH\n6pTkfDPldjMJQEzdXko=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-512",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AIKZxOK7vBoGHrXQnFymZV6SP9hfCDdsyN6EnPDjz6RdJCl2iZwnVRzMww-dmoLSuqOW4CDe9UVGUiOYWNHrRKM7",
- "y" : "ACAu8fvSsnF_115Al1rsbtf1wGD7BCkXEUAtUDhAl2ufatgmoFlX-GkbTP2OK0p3SQjXx-qU5Hwz5XYzCUBM3V5K"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "08299c4e2bbbc1a061eb5d09c5ca6655e923fd85f08376cc8de849cf0e3cfa45d242976899c27551cccc30f9d9a82d2baa396e020def5454652239858d1eb44a33b",
- "wy" : "202ef1fbd2b2717fd75e40975aec6ed7f5c060fb04291711402d503840976b9f6ad826a05957f8691b4cfd8e2b4a774908d7c7ea94e47c33e5763309404cdd5e4a"
- },
- "tests" : [
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "01901935f873695f6d978537d1932a74b594e98ee672348f9a25abe2cf8b8aae31208c90f80fe508c356302f11f4b7d8180aa1c70207483c560133ada3060dce63c9004acb84ee9ca82af573e5ab9ec86820e60d12f20168862cf34429219dd6d8610298af6d01a57c4b5d867acbb9faab0628501a489a6ec63273022e72aa1aaec8dfc5",
- "tcId" : 101
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "008b2d6f870aa5a329e2cfd2d7b557879ed300154058e2c55569312d929d43e44b761fba188745e047cabd77ad54b5ec3f301ad5725e41dc07e28cabdd0f948d10e201496e8da0f64dda20666dd78dfb529695f32df3d4c33e402dfe85db1ebce89396553aef4d62cb3bac401241ab9938040a6d22b36bb866d3878a7001c646e2ade4fd",
- "tcId" : 102
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "0102dc32e8f53daeb00ac0b9ea88a3496b19be2831261660e2ef599c08623c3bb4cb7f9d4e5d24e9b50256b3243292b6a5d7de11e371aae3e88abdb01112b5fc31e400ed4642d1a5d4456a8bd94037d180cfe2faadb1fccf434fcbb12eb0a353064a9764bb8b8d689320e8a83af8045109c2007f1486627cc7ac0c5c713a419075862434",
- "tcId" : 103
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "002be69063cb7c574e1f15b2f762b9499411ee01f786e1bd6876c753b640cf0c4861ec5e85f0a7ec4f430ac7f4cd6c8afda97df7f7914549770b46f429931c8a02ad00898a7ded6b2a1ae812bf52fa1afb219b9b28b6b5e8e09f2eb3a3a364eed565664ae25dde99fd3421821e241e28cc9b3168943fb5ef56c7c9fb3a7bbba4c4e20f75",
- "tcId" : 104
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "0019c52156a6044e89a69d35d5ea3855108c39f038652be3a3819fd38c4f087510918c5a013b1e06c5c463db7aae0c584316dae3062d90da918ff474e687d7bd9c5101caf79795bca185e27c985083ee936455d1c60c1c7e3d95e032cef0d80bf1426df5cdf1b9a5edbec533bc737c24b77b4694f233ec2f5e88d9effdd2a9b8d3b800d4",
- "tcId" : 105
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "00e903e8ad55d36cfdf951f631d4226b5bf79c17e7c2f53c4dabecfbf8675d38ed29e150fbf1d86f44c730df7777410e9df72a5a88cbe5f52e083585d1765ca3055300b85d63f3c4e2f36691e165026696a9eeb8adc4c0e32bf56c03de418eed3fd48057e9d402dc124d710e2536986472cf75b87ec283574223cb193af34966ea93183f",
- "tcId" : 106
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "006c5437ca8b2f853c2a4216d9e7379c4400bd5fb2b74d6c4af5658589d4894eff0c754465569c45804c0b3b105a917ea53006cfbc7f0e967b14014dda4f1a6a3f0101620b46f91afbde439d2f479555ed03b5210df454926d2473513b6342016bbb24b1eb10f16d5666732b977ca4938dfed9bbf36aab261f924f153a4eded721da124b",
- "tcId" : 107
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "005f49f8e46ee467fba634e7b2c7a089eabadfd82727a4dd4e8e20c2eef15d795cf287c62f86cc64cd988b83a4271084b32c2176ef15815026220c17a5d1255e953e01bae15b61f0ad85db8c4aaa70aab509e6ebf32ffab91c90e63da1670f94d1ea54d50e98dfb3f67626a27c047b457a20fdae6110acd4ffc96f17d38e90af8bd7b819",
- "tcId" : 108
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "0044a5b08f9d5031efe823a3f7b2226ea7c88e7d770acd5943a5804fe6f48a1421aee3c530145c20680ae35b198e5a0565a71748b37f3944708d40e1acaf928bdd7f008d5fbe874e1b709f4b20e78e08755ce1792a724bdc2e48816193d77e95e021f1baf99c8d26a981b5c882c56a70f8a06dec227a3f29204f9f582c72eaccd1f96165",
- "tcId" : 109
- },
- {
- "comment" : "random signature",
- "message" : "0000000000000000000000000000000000000000",
- "result" : "valid",
- "sig" : "0077751cca360c5abf093605729cfc68e1c80b255b01e3d12b632d00b6dfdc8e37c74cf4d862d66c7989d2f999af58d33720cae0aa83251a968be4db122d3470c9f901af02304c5bdc546c2d06785ef906367d7117e6efec63151ad02d5346f7253206a70125dde96824f17005aaaebaa50f7c4d2bc1f7b653075fbc9c1a8afa225630c2",
- "tcId" : 110
- }
- ]
- },
- {
- "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004820ee7b7457b52790f012e3f0a0e315d6a4270ff8ffeae9404a4c43d1e47a8fcfcae1a6ff4751635f42aaf94b0e3654de80847146fb7360f4aee71cdbf54eb16387d07d6e6894be68a5dfb62aed5b1f839596ea7bac188a4b766eb94e33f22d5",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEgg7nt0V7UnkPAS4/Cg4xXWpCcP+P/q6U\nBKTEPR5HqPz8rhpv9HUWNfQqr5Sw42VN6AhHFG+3Ng9K7nHNv1TrFjh9B9bmiUvm\nil37Yq7Vsfg5WW6nusGIpLdm65TjPyLV\n-----END PUBLIC KEY-----",
- "sha" : "SHA-384",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-384",
- "kid" : "none",
- "kty" : "EC",
- "x" : "gg7nt0V7UnkPAS4_Cg4xXWpCcP-P_q6UBKTEPR5HqPz8rhpv9HUWNfQqr5Sw42VN",
- "y" : "6AhHFG-3Ng9K7nHNv1TrFjh9B9bmiUvmil37Yq7Vsfg5WW6nusGIpLdm65TjPyLV"
- },
- "key" : {
- "curve" : "secp384r1",
- "keySize" : 384,
- "type" : "ECPublicKey",
- "wx" : "0820ee7b7457b52790f012e3f0a0e315d6a4270ff8ffeae9404a4c43d1e47a8fcfcae1a6ff4751635f42aaf94b0e3654d",
- "wy" : "0e80847146fb7360f4aee71cdbf54eb16387d07d6e6894be68a5dfb62aed5b1f839596ea7bac188a4b766eb94e33f22d5"
- },
- "tests" : [
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "6d61307eb3042c72fa2e5051e5d7fd969357bbf7a77ef28db8e5c35431a253e47fd271c5b14a377f41e9db9353c33e848bf9412381b9fe33fdb00757af2e08440d36d4fc7ee0c085850daae1f8df972ab8299f381be2951e8e0b1e1eb9b5f803",
- "tcId" : 111
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "87c43936c6b260236bc47417f0fdc6c5dabfd38576f74135dff1fad9daade052098c82e46e1dd4577168dab9a2af95f1a7f1fd50ee1a7b34b4ddeea66ce3b0455377c47cc75cbdcd7f7848b3dd6c567dcfcb77a29951ea6bf5e6d30bfbd7b064",
- "tcId" : 112
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "cacd409cefcf1fc0d10b7f4cdfd751c4e207a71f7e602bfb855a592f5b33e6d666443ee9c9abd1258aa65ca06318447e50fbc450a2d2d6669a790cecac7748bc11111429fa0631a1c2f8ce0d8abb60d2b699db316f1b88e748f3f8af2b4623b2",
- "tcId" : 113
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "8bfd7fe7562e19381fe51cdf5784fc8248e71a19ec73db9ab59a49eb28bd05763b0789072a6449dbcf32dc227eebaca8c7f49385fd9e3c8c4199030e238bf1c38b0000a03bd230d303cd0cb06e9a1cf70248c35da5258db2bb2047ff4b13bd9e",
- "tcId" : 114
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "4936aacd98530d41afb1adcb0429d6e18d55b8956f7996f47dc5fe712bb5484ea9c992cc8fd7c5e50a5312c9a1fca21e68a97212b13a2d1d95fe45a434051cdebdb4886e9f23392384a32f61b50990e123241b06813095ffd557d181af38cdb3",
- "tcId" : 115
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "323afee80faf41d30344b29d7c5dc63960c9f229f2cffe66a5d58fc0918ff15996e9e65879aad3c9ebddb3f67568db09f70abf2c40cd360dec66fd59df3dc3b845f90657e82f4b9f1da8aab9df5f45003224cb4b6519274d2925b245edbc3543",
- "tcId" : 116
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "e52d47dc305382258dcfc364bcfbec863e844c75768dee340c9a5c6f0f98904726f500a2997f8f835a4db5968e6f727b7e9e3a2c64e66064f15a527a8a44396c29db47397058d0498cca36ed93ae76d92918087fd367e2db74ca807db6d33d1f",
- "tcId" : 117
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "bffd543c002ab7740588aef8212205cef78baa907ab537634f5c3cfad76013d5085ec4f734fd085e0e153c6d86cf798bd237c58554f0c00888676c7b0147ffd7e336824775a4f675956be1daf617e2834abdc465c2e72b42032b6364ed926dc9",
- "tcId" : 118
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "176847a307aebae41f08db05411eedac6f47f20ffde5a5e10c9bf45d1b244eef2c724497f4857f2f06aee4cac11ac37c9c80f7283350fde434d6b0fbccc8f26434ad2ad9a5bc9e3665dfd11009f68cb959aab1e1c5b2481cd987836854650f7d",
- "tcId" : 119
- },
- {
- "comment" : "random signature",
- "message" : "48656c6c6f",
- "result" : "valid",
- "sig" : "be2eec483e0c2d9fad3e03163bdfaadc6baef5ffe3373aa1a48cfc0c00fd67da56dff871a98be8fab8645bf5ca645d65aae76f1d6acd4bfdbe683b5315a956ed96f57e82ff04932e837e759b40d8dcc73521a289508a7a71e430f680d6c0fb3d",
- "tcId" : 120
- }
- ]
- },
- {
- "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004031fbb3c18dfaff249ed5b7ddcfb0282197fda8708cc4d2c49000939c413dcb907e275efccaec2a13ef98638ebb90c07015df32d9c8cef5c0a3cbccff96d36d5738201b8430c231acde7c831bb5a270cec6d35f5427443a0b0242ff2289ba07c",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEAx+7PBjfr/JJ7Vt93PsCghl/2ocIzE0s\nSQAJOcQT3LkH4nXvzK7CoT75hjjruQwHAV3zLZyM71wKPLzP+W021XOCAbhDDCMa\nzefIMbtaJwzsbTX1QnRDoLAkL/Iom6B8\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-384",
- "kid" : "none",
- "kty" : "EC",
- "x" : "Ax-7PBjfr_JJ7Vt93PsCghl_2ocIzE0sSQAJOcQT3LkH4nXvzK7CoT75hjjruQwH",
- "y" : "AV3zLZyM71wKPLzP-W021XOCAbhDDCMazefIMbtaJwzsbTX1QnRDoLAkL_Iom6B8"
- },
- "key" : {
- "curve" : "secp384r1",
- "keySize" : 384,
- "type" : "ECPublicKey",
- "wx" : "31fbb3c18dfaff249ed5b7ddcfb0282197fda8708cc4d2c49000939c413dcb907e275efccaec2a13ef98638ebb90c07",
- "wy" : "15df32d9c8cef5c0a3cbccff96d36d5738201b8430c231acde7c831bb5a270cec6d35f5427443a0b0242ff2289ba07c"
- },
- "tests" : [
- {
- "comment" : "Hash weaker than DL-group",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "f131a61e2bb3c8260b0f1b8fbbd57dfea3194fb9e4ea5eb1f343f67f013358e94f5b1a550bcccd6d6e40d065be590706bba3db852eef1c12d71f5e351c8d1790e8a11af575f13b0c992c4984e1e17d259e4e02917f480847e5c2b9430335ba94",
- "tcId" : 121
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b81040023038186000400f3762f3ceb3a7dbbad769c6733b665aec3a802f8069345173dfbabe93fa6624e2a65ade6b849e05c59b01c7b709d36933c50c6ffd89e85e959571f8f9a25c1603701fb8f0d50bdfb4dca4e25d746dde110524b00cd6c272b2f5e6db3c99382bcf0b8eec5034645dc139baac5dc23f43c1f91ff8ed086d33192ee2f534fd0ca7a840e85",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQA83YvPOs6fbutdpxnM7ZlrsOoAvgG\nk0UXPfur6T+mYk4qZa3muEngXFmwHHtwnTaTPFDG/9iehelZVx+PmiXBYDcB+48N\nUL37TcpOJddG3eEQUksAzWwnKy9ebbPJk4K88LjuxQNGRdwTm6rF3CP0PB+R/47Q\nhtMxku4vU0/QynqEDoU=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-384",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "APN2LzzrOn27rXacZzO2Za7DqAL4BpNFFz37q-k_pmJOKmWt5rhJ4FxZsBx7cJ02kzxQxv_YnoXpWVcfj5olwWA3",
- "y" : "AfuPDVC9-03KTiXXRt3hEFJLAM1sJysvXm2zyZOCvPC47sUDRkXcE5uqxdwj9Dwfkf-O0IbTMZLuL1NP0Mp6hA6F"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "0f3762f3ceb3a7dbbad769c6733b665aec3a802f8069345173dfbabe93fa6624e2a65ade6b849e05c59b01c7b709d36933c50c6ffd89e85e959571f8f9a25c16037",
- "wy" : "1fb8f0d50bdfb4dca4e25d746dde110524b00cd6c272b2f5e6db3c99382bcf0b8eec5034645dc139baac5dc23f43c1f91ff8ed086d33192ee2f534fd0ca7a840e85"
- },
- "tests" : [
- {
- "comment" : "Hash weaker than DL-group",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "016e9c9ec1320d9403f5b86df59158da27830857f77f58d5c4d34bad9af3f5a422be7f406c994ed865ed6555c326a8f1c7749212cd8dded24f943ff9655072d233bb0127b8318f719866ece8b0092e9c4cbdd212c99e644c1bde2b9c97ff82af6e2e40bbac92e0acd01a2d7a1fa10a7ee725c140b7418c1d5f56688ca0096726987e3aa2",
- "tcId" : 122
- }
- ]
- },
- {
- "keyDer" : "30819b301006072a8648ce3d020106052b810400230381860004016894136702a1ff2de14be80fa8ee832777d885caa90182281195187a8c24dfeb92bd33685a78dd348ae4042a02fa25524b7c111f04111df9fe3df830dabd8a8dcf00abe007cdd100461bec9a3dc0c51a6da36f9637aec3fee4c781cf016b190c67f87392a59e6afbba6ca89603dcb1ae07a6c695e6e1694ec440fae62214e016db01f5",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBaJQTZwKh/y3hS+gPqO6DJ3fYhcqp\nAYIoEZUYeowk3+uSvTNoWnjdNIrkBCoC+iVSS3wRHwQRHfn+Pfgw2r2Kjc8Aq+AH\nzdEARhvsmj3AxRpto2+WN67D/uTHgc8BaxkMZ/hzkqWeavu6bKiWA9yxrgemxpXm\n4WlOxED65iIU4BbbAfU=\n-----END PUBLIC KEY-----",
- "sha" : "SHA-256",
- "type" : "ECDSAVer",
- "jwk" : {
- "crv" : "P-521",
- "kid" : "none",
- "kty" : "EC",
- "x" : "AWiUE2cCof8t4UvoD6jugyd32IXKqQGCKBGVGHqMJN_rkr0zaFp43TSK5AQqAvolUkt8ER8EER35_j34MNq9io3P",
- "y" : "AKvgB83RAEYb7Jo9wMUabaNvljeuw_7kx4HPAWsZDGf4c5Klnmr7umyolgPcsa4HpsaV5uFpTsRA-uYiFOAW2wH1"
- },
- "key" : {
- "curve" : "secp521r1",
- "keySize" : 521,
- "type" : "ECPublicKey",
- "wx" : "16894136702a1ff2de14be80fa8ee832777d885caa90182281195187a8c24dfeb92bd33685a78dd348ae4042a02fa25524b7c111f04111df9fe3df830dabd8a8dcf",
- "wy" : "0abe007cdd100461bec9a3dc0c51a6da36f9637aec3fee4c781cf016b190c67f87392a59e6afbba6ca89603dcb1ae07a6c695e6e1694ec440fae62214e016db01f5"
- },
- "tests" : [
- {
- "comment" : "Hash weaker than DL-group",
- "message" : "48656c6c6f",
- "result" : "acceptable",
- "sig" : "0062ecd31c77761bc89143b044efcb514e9c6ef4b5a0999203e14aba19d3f7b484e20b3833ade5f5f49d30e1282a2b22a14ee8816709595edf8f42f5630f92d303450147d4a41d4ada8896a4462d925fcb7cfd95e57048b73de44f2e292ab3009e3877723b8d0641046b622c65d5c0bde0ff46789ca2c205c6117736c5f971fd208eae8f",
- "tcId" : 123
- }
- ]
- }
- ]
-}
diff --git a/testvectors/rsa_signature_test.json b/testvectors/rsa_signature_test.json
deleted file mode 100644
index fca44a1..0000000
--- a/testvectors/rsa_signature_test.json
+++ /dev/null
@@ -1,3289 +0,0 @@
-{
- "algorithm" : "RSASig",
- "generatorVersion" : "0.0a10",
- "numberOfTests" : 362,
- "testGroups" : [
- {
- "e" : "10001",
- "keyAsn" : "30818902818100ab9014dc47d44b6d260fc1fef9ab022042fd9566e9d7b60c54100cb6e1d4edc98590467d0502c17fce69d00ac5efb40b2cb167d8a44ab93d73c4d0f109fb5a26c2f8823236ff517cf84412e173679cfae42e043b6fec81f9d984b562517e6febe1f72295dbc3fdfc19d3240aa75515563f31dad83563f3a315acf9a0b351a23f0203010001",
- "keyDer" : "30819f300d06092a864886f70d010101050003818d0030818902818100ab9014dc47d44b6d260fc1fef9ab022042fd9566e9d7b60c54100cb6e1d4edc98590467d0502c17fce69d00ac5efb40b2cb167d8a44ab93d73c4d0f109fb5a26c2f8823236ff517cf84412e173679cfae42e043b6fec81f9d984b562517e6febe1f72295dbc3fdfc19d3240aa75515563f31dad83563f3a315acf9a0b351a23f0203010001",
- "keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrkBTcR9RLbSYPwf75qwIgQv2V\nZunXtgxUEAy24dTtyYWQRn0FAsF/zmnQCsXvtAsssWfYpEq5PXPE0PEJ+1omwviC\nMjb/UXz4RBLhc2ec+uQuBDtv7IH52YS1YlF+b+vh9yKV28P9/BnTJAqnVRVWPzHa\n2DVj86MVrPmgs1GiPwIDAQAB\n-----END PUBLIC KEY-----",
- "keysize" : 1024,
- "n" : "0ab9014dc47d44b6d260fc1fef9ab022042fd9566e9d7b60c54100cb6e1d4edc98590467d0502c17fce69d00ac5efb40b2cb167d8a44ab93d73c4d0f109fb5a26c2f8823236ff517cf84412e173679cfae42e043b6fec81f9d984b562517e6febe1f72295dbc3fdfc19d3240aa75515563f31dad83563f3a315acf9a0b351a23f",
- "sha" : "SHA-256",
- "type" : "RSASigVer",
- "tests" : [
- {
- "comment" : "valid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "valid",
- "sig" : "68ea71ee1911687eb54b3d19cedcfd44719d0b24accccc59bdafd84e4eba48ef0be7f115e7073f9f273286a7dcee3b94cdbe208e30ae496987479d3aa12ab0e12685ab592d7693a494e6ad27d526ed3ab5912c7f81e09983931794c2165c22fd859e0f9af1a93a4dfe144098c562731e6059d236b52cb865996c87a9baf7f103",
- "tcId" : 1
- },
- {
- "comment" : "Legacy:missing NULL",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "302f300b06096086480165030402010420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "acceptable",
- "sig" : "253e1d19bbe91064f2364c1e7db3ba8eb6dc5b19202e440eab6fbdf28c8c6ec05b812983713c338c72b6e99b8edf506a89ff9fc8e5c2c52362097a56dc228060eca01e1ff318c6c81617691438703411c1f953b21cd74331f87c9b8b189fdffdfe8550bd2bd1d47be915f8604a0f472199dd705e19b1b815f99b68d60bc257c7",
- "tcId" : 2
- },
- {
- "comment" : "long form encoding of length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "308131300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "52f46d508e31f030b17c537888585f919037562e15f1924543601a41f9b701ee416ad73d6576b4eaaa64e685289dc478751dfe2d7e588252bfe2d43f4b3a31c6c6c39a9df884a2fc2e45f09c2150a830974b1c9d26090830b37bf06f1d57be1da34ebb016e9db7ce2c34e94872c89567ff6f2ab35a1a9fb6632e100c7d7af834",
- "tcId" : 3
- },
- {
- "comment" : "long form encoding of length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303230810d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3f34017b3172aaeec72d208308e9b83150699f86634b948847eab56f0169fef51b5636a96866f4f0f4c649400489e047803a91f2b2f32ab715065e20770c4e2788946b85aca5c90efdd6a9458dd9b6f797f96a3de88d2e4896afe147d8c0389943828100061903a30eaff1dadd98d3e49dba56cdcfa5f215d9c615f974f4a0bc",
- "tcId" : 4
- },
- {
- "comment" : "long form encoding of length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3032300e06810960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "1478337676aa47ca72ea7557facff06f6c777f56063f4487d345e43dc56a6bc5f8a891085d53a32c9d1c3cf7f469e7f56847b0b1b9b5b784526078271f21d0550afc40f81e2b8e8dec851d87511cace965edceb83cb96c8d6616e1ee75bb22c54412fc942a6f71c9fc609a31a69d34b774a97c1ba4f85cca28d9993db8543f75",
- "tcId" : 5
- },
- {
- "comment" : "long form encoding of length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3032300e06096086480165030402010581000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "77ba423e600bdd761ed10e7c00698a87fe1322f5f42b2902a0be7a24b1cf44f613fa55edeb2ded0475f8e1a13e5368f9a2bfc4f2f926ef289a2207bf3689fc1c8ec3e5463064a7f51bbc993966cc4016319b7c95f282372f1ff848d7fca753a81d905b3341b0fbf60ba186e750f3171cfc84288eff8742bda432bd6c8dc04f9f",
- "tcId" : 6
- },
- {
- "comment" : "long form encoding of length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3032300d06096086480165030402010500048120532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "9460ee79bb990bc3fe28cfca92363e6ff6900e3b61b3a402f06024a72b7a65d62094b4419e93900995eb121327f72b26b139bab3e5e2bd0c82e0cf6357f3b16f1c1dd4407a9a820f20e3baaa2259614d9ee3e015e1c1778befa13aff1e545ea1758cba4713631d63180a91b52df394294441642964a024f45b2251c90e002ec0",
- "tcId" : 7
- },
- {
- "comment" : "length contains leading 0",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30820031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "96ac043d3cada45aed0dbdc4662dcf7855553a5effa1077048b51c7e9bfff7c2bb3486ea42894d4b4afb26a3b3bd32cb68d5c4d8ca2622f50d8c56fdc25baf83b9909ecb096419ddc13578dcc8121007f7204ee82c517ae03de70fa23ef2390602029a0cbc8a96c5b781d857dbf12802aa561f5f41ea35aa0babb91b9f891762",
- "tcId" : 8
- },
- {
- "comment" : "length contains leading 0",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30333082000d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "2a70643572a7cda975d9e2c0827837e60eaa78c297b1ff75b84f654a91fe33294ccbeda52676ece50fcc03018151e66c24940bd0574ab85a6599231d587f4a6e0ae841cb6696e7dcfd182cb75001304e36887bc4fe3b373828f8b0e62ac2300a626c9e6a2cd05bb7910e74da2978dae1948f855b3b455cd30367160e21581cab",
- "tcId" : 9
- },
- {
- "comment" : "length contains leading 0",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f0682000960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "27778e39b45dee1e7003f1d315d3466fc111791187ddc056784c158df92097e123021e11918b6df8d905304db732e83d904bc914271b03def4ee129c3fc8adcc4f81b690e09e70e46c8b920093f304e64ecb7358740e976d28538a9eecf09ec1e1cd47df9107968207b21538cabe076bcc07c3862c46a793fcf638c70a972885",
- "tcId" : 10
- },
- {
- "comment" : "length contains leading 0",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f0609608648016503040201058200000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3a879e9f883b158908014f3617cae3315d47afdadd30840494f68d91c04dfe81bd16a40c7d21238cd1816928d989a232a3492325ab0f95d4426e3fb7d58c9908191dc557d8779dabb282287b7860c30e0796283428e0276447235809882ee990deb0f4312c01e7ddf0690406eeacb660acc6957bb670904cfd8d04df5e3ebda2",
- "tcId" : 11
- },
- {
- "comment" : "length contains leading 0",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300d0609608648016503040201050004820020532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "2b82155f363a3b283ae455f59e41c29dec2fbd8c7438b0e347aec5b38c7c895cb7d326870e4fbdb935fcbb561f223bd926dbe8b95ef5eaab27920dbe30c641e99f526a9bc356af54198b459b59383135a82cd5b6edab7da0b1a51d939b2f9951e1432d637c4f04a3546ed9c890143ae364602b94eabdaa2a45e4bdf0b5bdfa71",
- "tcId" : 12
- },
- {
- "comment" : "wrong length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3032300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "1dda56dc953aeee7fd76ae7166d92ab9e3d1d9759e76f8f1d7634a73cbf69e39d8249153d7c2d83c9664db13552f0c78df34b8a67e7b6c10bcc61b5ead7ba62ce0ec7ba8ac78d146f7e4cadee6f6250e0bc3100660e7afbe3afa17fa288d97549b4c8cacc00ac5c942673485739f89c9e5e63ad2be97a8f2313f5c5b095e7542",
- "tcId" : 13
- },
- {
- "comment" : "wrong length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3030300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "692c143b82196a391a3546607336e6f3bc047412645cf0def0d62d1b42234c14da138bb7f451b45073bbda2aba23412e83bc40d4e7de3e0684f2cad7d059f2d6831aa3d2ece4964ca75cd41dce23c5ba495c15345b36947b4b5a051fe1b84e148b5ae21f112d2245b1acbaeef9dc4a0c408829b9d2b1b5ab1d3a40af0a27b99e",
- "tcId" : 14
- },
- {
- "comment" : "wrong length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300e060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "66c31a45b2287425a20f65c3eba9cc58c370882f5fc62921935491fbd516df9baf9b28304a21d9008b61a92779ecfb3b0c03f6d74354f5159956e3fc1d35bd7376289378f05d7a71e05ab32794f2566a54635e8dc64740acbe10a293ceddbebe8499b520f406023a134eb9927ebb788b92488f036d109ec0a40ac52372e847b3",
- "tcId" : 15
- },
- {
- "comment" : "wrong length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300c060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "7b85536bdcda4ad3fc40129f2ff9dc85d9ec049913784064e7358686640446278a2006d93fb33429407597e5d8c783e3f7aee8a7791d69139f3c802a6547f01bf987415eec2447b0e8c4f3aee7ae2085d141fa34ca6634bc109dede93285d5c40cfcd98bd47ceb9cc1890dfff53b7ebb8038533580c7a67fe14c0c422e20cd64",
- "tcId" : 16
- },
- {
- "comment" : "wrong length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060a60864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "5d77fba3cbb1905d83aa532fcc3227a95d7931bf0c2ab51f8118824de9dc029bd2470adf48b41c694ec7359d00a1336990c30ee368dd40bd681ba74794415d3997e7a756659397bf6abd44ca91c12a8580a3f5d1cdbc7f3be0c23c72334ce9b1419e6540dab73f5ff8ab57d0bbbe92b688bd3495f9344822b622042c2491bc41",
- "tcId" : 17
- },
- {
- "comment" : "wrong length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060860864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "7b5476fb78f389d1131764e7a13322f86008924c8c098f6d74f2df4dcc5a504cd786b3eaae33295cd1e87a2bbd1a06cb385674d465110a9a990d52de9a67f1c13ecaaa86383d489423c084fae9ecd2e9b109f4f04b8c013e3409128f3a079c068c1ad27bc2a20e76ad149325b7b0f0bd804a4e33949a98aac49076260702b0b0",
- "tcId" : 18
- },
- {
- "comment" : "wrong length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020105010420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "6034e1253e4860a29096e392076794cfcea166a30b340cc09f77baa5952c06d148bd89b750c3112930ef210a50a7d3f6569da89912b5e50e824116e73a15536958f75779506d07e67ec9c0cd8de4b51dfbb0fe56926feed18ffbd83b0cdd50d56326c54adf97e629378ae5f0f02fcda3da1aa98cb1d1990946edec711a85a0d8",
- "tcId" : 19
- },
- {
- "comment" : "wrong length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020105000421532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "a44cd265e1ecea83fc74e9eef746ef173277cc96f69a1798590ddee7ce5b5c34a82ad58a5c042db19005e04eec4159900ea764c0d008c52b94577d1c438661fb767902d9d1bbd6a90bdc4df685ec5951eac81d8b4dd36bceef7b6f919e85b6c994c7cf22a804f15cebe63b77f47b3bc2c2aaa68c6362c27a574b849efafe72e9",
- "tcId" : 20
- },
- {
- "comment" : "wrong length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d06096086480165030402010500041f532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "a160aa43f4873cada34bea5ccd2be9dce07940ee1c08eaad524a5019993bc753ce92cccada706b483f106ff20b327b35e7c83955ad3bbff3f26ced3489877d1b5bf285d61afcb30219c02a440da61030e301aadb901a525345d1a651a21c31a62ac9fb71738c3e215a8941ca9a3c4910679c5e774530c28788f6eddd7a31c024",
- "tcId" : 21
- },
- {
- "comment" : "uint32 overflow in length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30850100000031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "1369c78f816a9baf027e255de0c258125be90f35b8daafee87f2ffef2d465e0694af4401cc5cdc7ca78b08d5688ceefbddc02abc5495d47c6829d696f8370ea427e7e0225eaf22cda720bbb5881edd16b19bbf2ca86654c65b4ad481c13fb38af00d77922f46b311f936c51f4610f6bdb514b366aa05f029c1e63e3cfcf9763d",
- "tcId" : 22
- },
- {
- "comment" : "uint32 overflow in length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30363085010000000d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "41d4c1ea43cb207af8bfc1552e31da7ca5744b68c4e00c3bf55f4edd4c81e91c01f44fa05290dbaa1fdcdcc775f6032a049b4965345c16aac6994b06cda9e0387dbff96cdb115e014f69bb057faca2f618c70a31edd0beaef7acdcc0fb7c83b2f07a8b9de48aa04b7c973920af5b8dc20aac343251ddf4c2277985c3db1dac2f",
- "tcId" : 23
- },
- {
- "comment" : "uint32 overflow in length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303630120685010000000960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "76bae6c330b9ab33aa9f2abe8559c51fb95f953a75e48053ab99078069214b509dd1b5080ac6819e32912619372d71a9ff1a67449dd699e5bc6ec0e18d1893dfb5bd571d933926d05b0d9fd7036ba4556e209369d1c57ec49cd9075e583c257c6fd4899c2a8bbb157547812cc692f264bf54712c71ee090b974d99b4d1629696",
- "tcId" : 24
- },
- {
- "comment" : "uint32 overflow in length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303630120609608648016503040201058501000000000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3480a5c22f092f259b5bc4fdb9a33c044c24a645b57d61920effde1dc0bbfe53738023f16025841f9323b40f72c11091941bbdfaf7c2fbf77ad6626dbd6a3b7abb3ee916d96a922b11c86ce80ee67dec619bb98e9246d35a33b11b3a4e2a3a130e8b57ed4bcdd4b4e73aec3f9e3d50d3db5e29cffeb186846c72d09468d018ed",
- "tcId" : 25
- },
- {
- "comment" : "uint32 overflow in length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3036300d0609608648016503040201050004850100000020532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "5b3d3a198d4b36c6d9641db181fff59407a25bf1571f85e47bad1eaf138079872b93b9eb51aae09b48d6f4ef56badd96a6584277d8f3c6e4a4e11275f72021b50a1665ddaaa56a2a7caa7da6b4d502c5214e17042811154d411dd2197c250264bb69ba43adf668d4f7b81d932afa55e378214bb19ddeb431f702a91dd11e23bb",
- "tcId" : 26
- },
- {
- "comment" : "uint64 overflow in length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3089010000000000000031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "1cc5577d04e34550e7f3d136064547efa30b9413e2c423b5a320eaaaf11cbebb91e13bbe3874e4650e057a8e38c8a366c473f35e0de82b22f846721a09e3f279ebdf54c8df395a9041333f09cb7bed5291bc1842857c4ce6ad5a1c2c476c1efddd5fe42824c25e0581aa7bb8f621d3b53566637c6266bb1bd0a5b7fb79c72616",
- "tcId" : 27
- },
- {
- "comment" : "uint64 overflow in length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303a308901000000000000000d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "6e56d1746105344b34fb8299d173f4a5032cbce3556ca9d1eee35f8b31818efc121a1a9599c24fef8531243016dd6288d67b4bf9fdbf2c90fba5b1661be03531b5e15385ea465d1376010f0af761e8fb1afff7823dcef8dc100d97c192e9a7d03c82321d83fd8ecf67207c65cf182e1104ec5669536070cf1e3fe73c5e27edeb",
- "tcId" : 28
- },
- {
- "comment" : "uint64 overflow in length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303a3016068901000000000000000960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "37a413f9202591b8860cd9d68515ab522ae800e9a71793b479f1fb74ab8c9b07e72fe82dabe1189d028b813610e5e57c055af2d32837551fdb0cd93d7669a3c02a14c460f4c92136a4d11cfb7dcc76401bb5b699fbc64d302736d68c3591ecd59220107cd63f55c83edd38c4568e6f7749c0d9baebfb7c8ae1bf2179101745a9",
- "tcId" : 29
- },
- {
- "comment" : "uint64 overflow in length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303a3016060960864801650304020105890100000000000000000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "9fa8aac224bb50697103d457e7fc870853b23670ee5b8c7395d68ed82b30db18ae34a569abdcdf19238ffca8f5e435327dbe605bdc1a6dd3eaa3c2beb33f00642984a2034bf3b3e8de3ec7009e35069d5b27253c4aadcb4f163148e157252e3b9334abb6cf0299161c12908529f52de9416ec6218af7a6963fcc987c5024ea71",
- "tcId" : 30
- },
- {
- "comment" : "uint64 overflow in length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303a300d060960864801650304020105000489010000000000000020532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "0f50bc6b1b94aeb6805dee51c92860693de47c4925ab90b57a46e0485a9afeed45083eade73bee684cd07048e632d1dd24aa2efc42c1f85e4fd7b7058dbeafb53a3d5b1cb1e7dded3352c3c92ded891839263a501afaa78fedfd04546c43d16f7a52b800abc9ab1ef827ae0eb19d9b52def2435f1477a48dff61800b4db830e4",
- "tcId" : 31
- },
- {
- "comment" : "length = 2**31 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30847fffffff300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "9dcc651cc0a1b4d406112c0d1ebd7a9fb5a2c9d9f9cffbeab2d2821e5ed01efa9d191665794649bd1f588b729e8fba1eaa37a5a736a5863973c338a92b2665d6ead13b72a19d2da778febb94b150e8d750340a3b856fca8b3b6e3cbfecb9c397c23f46912ba546ab0f64ed88404ce317f8fb2278b68950e9712d6b11f5cdfcaa",
- "tcId" : 32
- },
- {
- "comment" : "length = 2**31 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303530847fffffff060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "0397d14205c2f52423ef69c874294dc2b37d5be5d5647f7e83f1dd6783cb41cce52e6de1dc8c9e93ca1ef887d4c0ea79cd8b26391d638bbd8080bce830bf1bd7fb1de31346f28d609874fafd4a34fb7bee900441f55589ec3c5e190106d8816cadfcfb445834739cafaaa3903ed93cedc41a76aa0ce18fb49a3a73b7b5928735",
- "tcId" : 33
- },
- {
- "comment" : "length = 2**31 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035301106847fffffff60864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "2c3ffd881c1c0ce2e4c98282d6011179a89b1e84b17072bcbbb64164e5e05410d0414a1fdbbc04564f3d80f3891f28c3f02e92bf97b4339b5bd4699614e236d4223cef0688c44b297eb9c0e22246b4cb28983b102a446dc76671206c3b77af6897f2f445512abda37bc9c37257dd4f1c6f0e6ec40929eb6b0058682b9d2f6c66",
- "tcId" : 34
- },
- {
- "comment" : "length = 2**31 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30353011060960864801650304020105847fffffff0420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "668bd06eafe953fca6a17b0da0f9006ceadb09ad904786b7530148df7eedc146d20a5472c39677d65e59934c00227fb662b3474596e6072f56d2c00c3d31e66f0da85f4670e75c3f2c910c0fec8c98bc31fb2eceff80350b78aec0d316e9bbb331544d8a3d0b1649291396c717e350bebba3d3c3a0b1d55f010879b8c7b7d4f9",
- "tcId" : 35
- },
- {
- "comment" : "length = 2**31 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035300d0609608648016503040201050004847fffffff532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "87482257ae1d18d0357428b756ae35a48549536a3439ca3c148eee64f4c096d896219097d55c14a25eb1490779f6b1471aed238cc0d6aaf265c12ac086d04de9b79a37518056dfacc12cb4916c17505fc7e2e6c1e0db720a286ea65bde4d3da1d2dcb8d0276e8ce73f3f923209149955285c602572cfd24c82e8d96d45f569e6",
- "tcId" : 36
- },
- {
- "comment" : "length = 2**32 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3084ffffffff300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "03aadd447f36952dfe73ae89e5c656b7d37ec92535e547cca62a7747f3831f2f613c7dc094f3d5c4c6b9e02b21ed4626930ef3948b42ed41f4cf468d2474acadf1c75599c5619e4872e6d3dfd93abe92234165135ed265e0c0f64fddf23e50c1f9fdcede8778a8ca008ab00f8afa887da3f4699df9f1140953232f36d035b03f",
- "tcId" : 37
- },
- {
- "comment" : "length = 2**32 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30353084ffffffff060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "31afd9a0d827755352b16de04de42e98a8c72f08919ed475530a00c762b8a03bde22634dd856a7eede4b4947d780cb3efe55775e16d7f46f209dbcb5569b2d9469cc271aa850f74960f7c741928055925349821e32e1e0fe5a040010a39a4b6a343f7f35c204106b3617e528a99dcaea8a93766adcfe7be31cdb98f7f7f14669",
- "tcId" : 38
- },
- {
- "comment" : "length = 2**32 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303530110684ffffffff60864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "16ac0aa2d727ef5fbf0305259ee6fa40827c92419f819673fd64cc2dc2dbfe7ce1cfcf06e26d45f59cb3d9afd30d7a6265863fe856e0a0b1b9508b1e7a2dfb0f87f5ebfc444bbdae504abde7daa33bffb991551940df682c8e2c45edef0563b34d4f11e1955e83c2145ee321165517d1532abd64dc613a280fc30670bba1f898",
- "tcId" : 39
- },
- {
- "comment" : "length = 2**32 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035301106096086480165030402010584ffffffff0420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "0fe0c75dae62462e66e7277b03c9113727419f7d4db7b2a567c0c189fb6328e1f73d5d44e2196b436f4c2f0f12950d419774c8a51c55f9b2217f904c4f03d5f5754174719dfb85f62795ef75e6d54e703bf231fd8472250f529f85294f29f6c5653ef585079c3b3d8f931da80a46c8afeef37696fb0e7986d413bb1996b8ad57",
- "tcId" : 40
- },
- {
- "comment" : "length = 2**32 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035300d060960864801650304020105000484ffffffff532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "9ef993e6ccf015b0b0de75b51213a1c3efcaf66bf83655287484ef28d984806226a7af1704fa6a7fc02984b44449f83ae24761021e49ba6117505c1e609406b002215de27d696643c3354fb48e6c64e7300944edaeb96e4872275f75532f5aab94358d4954522fc7903439e99223d8124e79a3f519050b6b576b77d5abe7c3e3",
- "tcId" : 41
- },
- {
- "comment" : "length = 2**40 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3085ffffffffff300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "0fbc20d18ef2dce383ef9640232e44fc287cd97bdb1a18614a77a6d72da5db05df264fff4964b3395445a5b75f4098be8c923ec613efa49e87877c08ce52e9e8b491eaab77ed2336179f1e447bc53e0d9fb9cbd2f2c5e180acdc946df4cdb0a878f27dc010adb1d080330e0bed852181bf97dc4372049ac6ab5802c0d650ffa9",
- "tcId" : 42
- },
- {
- "comment" : "length = 2**40 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30363085ffffffffff060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3df42c382b86647a466ffc743dc4713259bd7dfdc909939738e59e3d1eb11d104537762c50eb55d4677a005f7f925ffc7ef0751ffe0c4320a6cf0733e738a404b2672f3dd11fa97bf9d84b786a47c63bbc962d52873765a6de3a57590c2cec68118af81d7dac4f7ce6c101811f2fa364a34fe704d674be5a28531d6e8c4fe120",
- "tcId" : 43
- },
- {
- "comment" : "length = 2**40 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303630120685ffffffffff60864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "a66d9848a3db7e49d8053c4a3869415c0bb58fd265276c99a66ed1df84e162cfe8f0820229d2ac2f99d9753eed39af46649409cf559ca6edc8c47e550b7a4cf24fac756389e365ad73ddfa67e72d042ec494644c5f277f60864dc90d6cbfdf556396c795192077f51f173477b934871e2a960f7ac3e6e8c8039956a5061bccf2",
- "tcId" : 44
- },
- {
- "comment" : "length = 2**40 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3036301206096086480165030402010585ffffffffff0420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "7561668d5b2f8fd3190be8244d4d0550043dc0a7e80dfac83eb6f6ddbf448d424082fafc332e473d434b37ce7605352594ce632f4d5de30951581af907fff6c01814022c31a31b3d130673a56b4ef7763bad595053af0174df395b802722f5046e408c978e2b5a9a63f8ea80e932f76513928253f432c8bdc7ee51872d315b7a",
- "tcId" : 45
- },
- {
- "comment" : "length = 2**40 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3036300d060960864801650304020105000485ffffffffff532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "5a836168587968425c4e103bae20603e0ae6f714ccdc603a865bb3541b65eee9dd0d9ee21cc66c7a83403fce2413b97f1c1239947e94614f6f2eb731387c8b9d956242bd9fb0545eb2c874ca1a167222034649894b41fd0fa935cf52e583a5e9a4b503cf9f2b238c025bf2e22ed78e7a64bcac1d38302cc2361c71b854e79123",
- "tcId" : 46
- },
- {
- "comment" : "length = 2**64 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3088ffffffffffffffff300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "97c602416f2131d34f2a57acecf26365a30c12f77e5beac095533848ce227302092c6f44b47f011d6eb0a91f8024d1935d8bb274c42b57875115a94281fd3cb198f9334758d3200c1c721f6babef332c02a89968a7089f7783993bdd54f809f8372437798d2364040c1faabfb00faabf28cd6ae4ffea29ae2c08a6a7e6074700",
- "tcId" : 47
- },
- {
- "comment" : "length = 2**64 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30393088ffffffffffffffff060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "2a970dc291a1dc935cca6985dda703bcc1ece2e40817ce8fa79b6e8fe84e113686e6e65570d46bf22147bcbc389cb5f86f92dc185f556d15e7614cef119fcd7305a31fd2f8710812f35f9f0bd8a1a6e5be3163de644370c67181b7575635dfb9f717f78631d62db714b2a19cea7079ff13c8926ae0c601e4befb6541b02a7e20",
- "tcId" : 48
- },
- {
- "comment" : "length = 2**64 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303930150688ffffffffffffffff60864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "6e16d110235cd11e32b114ca9dac0cd6a1b041a6d2c61941d49bb458241281f62a4e2b1bf3cebc3e67e8c062ec67a51a599a553b09732e23e1d09fb2b20be7fd311a7122414d535651718a1421d4239276c227b96506729a09e3ff2779dd1c79de4d402623039b826e2bb4d26d1b56775fce14ed0203a9ebd8f042d981705a77",
- "tcId" : 49
- },
- {
- "comment" : "length = 2**64 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3039301506096086480165030402010588ffffffffffffffff0420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "0716d252488e08f10a25cec94714e6105bd4e13ff019431190864cb0f4378d315f4bd0fdf186e1f2d45a6e97eb04fb2013273e178ce4f82a0b67bf9d021b1d8ab73d753adf2073ee1ad6190b2163139db63778a3670b7cce23f45efb601bd59644a431cbe534ecdf4c4c58ed02ed03863ee32d296b5736c010305fec655b1a44",
- "tcId" : 50
- },
- {
- "comment" : "length = 2**64 - 1",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3039300d060960864801650304020105000488ffffffffffffffff532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "03e52a2ed638bfb9184a0ee3698502af3a19bb959a984957de5101e6f7a62cccc2ec2a6293fa9d76fabf3ce7e4bf35c65a5f864bc003686a1e05b57c5af6ad588e05a5225479422d7b78c5bedddaec7f4b8c1e9ab7478c1ee253847324e025434b76a01b82a40123ab31ec9862c6016885dc6cbfe97801503369fd3688bdaaf8",
- "tcId" : 51
- },
- {
- "comment" : "incorrect length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30ff300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "9c4217830da16424a6c80a62e1e1cc0c589e3324267b4498e89af96998f83524b67c703e46860ca55631f1e659096366b60557dbbc8aa8a3a7ff6a887f1afcc55d336458ae25b015061adc391b8a449a7546e48d7e1d783e5684730333b0e2a32c13d36e342e31a9c1c447c0585545e08ce4f6340529413aaba6872280bbd7a7",
- "tcId" : 52
- },
- {
- "comment" : "incorrect length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303130ff060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "5aa35d19b312de94d0123619500c15ec79fd838f6f18e75e79a11e50d0eca9406ecb38de68e11cf107f80ce2d62573bd1e4062fe78f30cf4bdfe9bb571488887d9dfaa2d6031f3b7efdd0dd78f04d980abfe641f490faee10e86dcc9b729bda0b127b448d33b1e1b76373794c284d1aecb5b813a2defdae3723eafaaf3606eac",
- "tcId" : 53
- },
- {
- "comment" : "incorrect length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d06ff60864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "971daa114a33b412a3aa1c3a93d5e1cb9810210019fe4e6dd0c70361a99f1a0676563bca2a05915df2ef2e38cab387ea16405d371d1a382ac286f1f97d4fdcf84464413986d54d6e2c7aeb8d5afffdc6de31684ecc7df721957d331bfa588a5f2a65c52f29ba5e4585bc69539e1945f1c4306f8d664d9cedde6684254ac704e0",
- "tcId" : 54
- },
- {
- "comment" : "incorrect length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020105ff0420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "1f5bf49483eb6f33a5575ec2a8d49388523ee41223210f05e1f9f73bcb5a8973dfaa0093247460885f034e4ed7cd888c63f9f0f74dba7065f00cbfe5d9cc0dc7aebd7893acc3f32d5cc03763b59a0a846554ef58569f153301dd6080d428c8330718e733b92e76367f4eb75213de1495bdb1a5743deb55a77919adb45bb6bc4a",
- "tcId" : 55
- },
- {
- "comment" : "incorrect length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d0609608648016503040201050004ff532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "7bffc77cda9ff6bfbbd5a92fa6d4cf5a9f48a083c37a9437e5d82c0ad9f625aac8917c8df8bb4db5ef879431bacf360399c6607711082d6bfc5264f40631f2a742a3494c039146c3f41c7b53aa754afd35410a0a26c6957dfec86797268861036bacb5dc8fa6ca2893b26a3e4b186d4ae774a3822aa1e99ba4bf6bc3d53b2c99",
- "tcId" : 56
- },
- {
- "comment" : "indefinte length without termination",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3080300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3e461f3131735907cec3208f19a7ecfaa8f3bedf587d1c586773899f3fed55cf669ba736c9478b93ff058fc063e62433bb0da4d6da8254a00a6b1e1527dba86d89ca412cb952a988009d8874163683e729c7544b9c83e07b77467b4329e04bdee552ab0513f92dcc7376ed59718b645b50bd50661c783d559eaceb12f7bf5d10",
- "tcId" : 57
- },
- {
- "comment" : "indefinte length without termination",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30313080060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "81312384fb68fc608aa019df2a251d5a77dbff379c99d2804bc5ea766f051a80dcab2f63ec0b60d2b26391b35a83a5b75c7449fb0b32bd28d78f1138dde33b223d141e293bf007c5d028b34cd6055a4ed7aa31881c8514a2a091690405f8a708da65b34730233168dc08cd81733d2717db133f5d54ada593184bd008e5a7f016",
- "tcId" : 58
- },
- {
- "comment" : "indefinte length without termination",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d068060864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "1d1150ce975992c50b3cbe98f2373621929c7a90f8dc5a9434a06159fb614acdfbd09851b297505db51aea8132a8f082fe72ea23099aea18494d2a73aaa6b9b6b04ca6d20a88c5dcea917f92c5df7943254fa9c3b1e7eca05a2ae2f796726d9296c880cf0872b8c32082a3a42b9cd099d286b586b0efce95908c8ffd27835572",
- "tcId" : 59
- },
- {
- "comment" : "indefinte length without termination",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020105800420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "7c64ae50883b449f68f941c9892dc1e1f446bc3a779ce9906bf5f6751dd110162ee03a99d1b556ff380f176263846e76aea5e7078927ec6c076a79c64450f6ce8e7a9faab4040a31c145564107120cb524451e4fec4b1ae3702d0b063c660031b61fb6c2d0cb46d17c5f4605124057d5ce3a0ded2019a14718de1374e0e87124",
- "tcId" : 60
- },
- {
- "comment" : "indefinte length without termination",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020105000480532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "65e61f63db5ef3a5de4a11aa39e3f4a6d3d952336c19f0fd60255b376d459d318fe4234a3a6c883090617306f98659577f7670054fc4f2d4c82bf7fde24bd1a231c71644d487d65beead86828e48a3e081fa6d4666b86b899ea57c99a67c0ae75947f2a4e5dbce3025421b3213224e29a55faf0cab8d9411b629baabf7c9ba6a",
- "tcId" : 61
- },
- {
- "comment" : "removing sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "",
- "result" : "invalid",
- "sig" : "5df1c4a701c6fc1f2daf6f4538f29c3452667424c05edcbdaba4a1678c8b5bc0e89656a0e48aef46642e0bb597813688904e9d74cbd377a3d9d2c965bd3ed06f136f10367ea3eecf89a97508389448a31ae0e79ed3725d0c4e99a516daa4116479bc53da5d7c2f26c7ec6310d4cb4174bb781405630a9b1c147b0e1da3a7faf9",
- "tcId" : 62
- },
- {
- "comment" : "removing sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30220420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3e43837b92ebe4df08586fced3dce46aeb2fdb6ec2bd0c58e823f6e6363b9b676786929d13ede60a8d8d0daaf71f0de8880ed0fdac8706eb2f324394145818b641d1049cc7552bc6273d86e901099c78297381faec5c518fb6de429700f3bbfef76cdecbb60088b9f2a77d75b8ff86f06cf23850e3183a267c0ea34f4f839015",
- "tcId" : 63
- },
- {
- "comment" : "appending 0's to sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250000",
- "result" : "invalid",
- "sig" : "26d20fecdcf0b7d6a0472754aecbe115c39d580ce9d78b67d1a6395aa6ce6689bf6d0d96545341fbf04956a48c47f7d30bda017acb1d8e24ce596aacd3e05b1afa571d19f5316142557f765e4c5d080bc5336b79e2c02d8833d076ac9d7794ffbe85c66d0db97e1f5bd2ecb46afb15c19a8fe083fa593420e996a483c2a3a766",
- "tcId" : 64
- },
- {
- "comment" : "appending 0's to sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f0609608648016503040201050000000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "1163082ba8d48352df7eab96a0067539faff24374a630aa4393461a0aac716606625d706699dfc22cf3aff89fcc278f83a0adac87aa0bf192dd86a97031515de1933a23849478ebed20e4203abfb47345bc18f38da5d45e829997b10107c536999b2ce10b2781e1db03e10cc2bdbc2e0ff4c3db5d271ce83c1e7e267e7c1e107",
- "tcId" : 65
- },
- {
- "comment" : "prepending 0's to sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30330000300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "0ded592bef1fa809841e0d7365e66af12f4239be0928656e7c49a043b9f2b18b9bd2dfe93a810c6e6c8ae6cb8a5c9d6e9d39a96a10b3bbdb92a7b8f575c2db4841c1b628160f956f54e0c58d3b6fd4d640b0a06d39476daba7be04b63a75f38bbf7517d9751d2b12d2dc00e44de7263275dce6b0c0af65d3c04878d6fc1be2ac",
- "tcId" : 66
- },
- {
- "comment" : "prepending 0's to sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f0000060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "95a42e5d9bd9ad5a8579444e8167bdecec16116a7900117b298c82d5560f1d16e9fbe963764727fef9111f2465e66177b576bdb8c70a58e3df6ff69edd2d6827c97d626b09c24cc49f223cd5d2db2916c54fd8f2ac7301723449b1823f2ff48c56849f7d608312d4bb7a97f90ba218f99cb773fba0a34909618f5d25854d7687",
- "tcId" : 67
- },
- {
- "comment" : "appending unused 0's",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250000",
- "result" : "invalid",
- "sig" : "2344c598a8905b350f20de5cf0cee60253729a54be45b0b19acc109ac15862efab2e7c96e92bc990ed6959a40d725c24c25c8d223a46f490905c1448d8dbf7c9c427bc2e896bdce6d2c1daabdc93ce177f9525ac69d899bded12443338834a16d885456057461740c5140cb9a89a017851f9e99e38c1727fe5ccad9a7a8709d6",
- "tcId" : 68
- },
- {
- "comment" : "appending unused 0's",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300d0609608648016503040201050000000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "a08cbe4009080f73cef03116ea949d1dbacce7025f7f61040fb4e052754d5b2d74c2dd06c0dfe1d09b97aa5739c809bec6d8cb27e852e9fef353bfa32964b99495a6dc63d6ce77460ac280c74c0cabdef794f74930f7f8827af1c6690d22ec2df3af497837bbe900a890e3feeaca2c0d16b0017155390ff0396a35ecb62b5992",
- "tcId" : 69
- },
- {
- "comment" : "appending unused 0's",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f0609608648016503040201000005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "500df36bd7d0b56642e2d5dab6e4ec0b148e7b8673cfab40e45c5dad5efc469b3321ce027a3a7ff5689366a18a32267d161a1266491b055f11557c35bd0d4f43df11b8a26f7b13c54be423b87b30b1dca956151c3ec3df03b30918a413179b0e064bf434736b323408e3f1330743c8bdbbb9d466dc1e21710c12e2e3b638b172",
- "tcId" : 70
- },
- {
- "comment" : "appending null value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250500",
- "result" : "invalid",
- "sig" : "11a382fe570e0cfeb515955b70ec89a9353cda0c5a5d3cfa3e16e41340eccaa18ba21ad87c4a54a7131c4a7cf9afed68b1c1645568bab9b0fe7dfe0437abbe1fb6cf06bb690f46aa2eca034093ded661c38954341f3f35abe484015150307ecafd06d4309836771dfe29bfe56350d68725e0cd02b1479c6f99eeba2d59f40626",
- "tcId" : 71
- },
- {
- "comment" : "appending null value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f0609608648016503040201050005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "110f3f188df46da58cdd46b5d460ba3d2f8d00d907289634d52a3ce693eb232cd6db738c48c8aa22d923d4f81d55925b3d4ff29ad9869f97a244d37b860cbd4646c6318c041729a7aaf473b61a93cccd62fe223d1be00364f03d722f43c7beff98c3fde573e7e6a0ce7d4a2a4bcf279765e29769bd4f884ce41fb808ac3d541a",
- "tcId" : 72
- },
- {
- "comment" : "appending null value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f060b608648016503040201050005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "470416ee76f0bbdbd2812b533813e4463b799f4036e6955f3e174f6287e3c73d57c32875607e2eaf06d612cc85170ba5df31286edb645ae9ceb9e62064050f3e7f6b36fe8fdae7a3bd89b6acc523c923b9d3f3e5f57d80c9100b39dde75caf46adcae56668149ce0b80762bc459ac598241dd79c6b4fe0220ad53e3c591243fe",
- "tcId" : 73
- },
- {
- "comment" : "appending null value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f0609608648016503040201050205000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "100714ee0d38c541c2632e96885a7ce0afcb22f0cbd84c556f19d1b44bce75a8fdf141e975dda1812b4465050d4615a51c3b9816606c7ac88d6b684df938e7a8852835dcf5bf0ee45f2e413290691832095af77eef0e7a86f72167dbb03758e68561f7f06afc6e902ba19fad57e00cb43c0fb2a5ead689a146c79c9e6188bd85",
- "tcId" : 74
- },
- {
- "comment" : "appending null value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300d060960864801650304020105000422532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250500",
- "result" : "invalid",
- "sig" : "44eaf5ded57ac5c25c17eb31c2e071400b46b9022641347b2edb0b14efbd4eac5f71e4bfbe791e164c003667387e57ae22c6b00e69971d7245e381f6459e5f88d9dc0fdb385b777fe99e5e4d79aec057e41a1e457fe2b91a5f4a8878d2eaa1c3ad8393d281eca07ebd287364a19045029fa7ed0e62a21e5e42a88a52ea4abc8b",
- "tcId" : 75
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30364981773031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3b8b17b4c7b66b2fa3be8eb404e32b6fc0b9e56bbe678bddc8f7ef7c042c12ae5290b9c4201b35d10e409f3b7eb7760f5dee7fef09c30ea858b78bc9637dab245b8f83ee83c75a7aa3d5234b0b6dcdec385f8cd305dfef92aa83cc0ecde8f20f08af78b600c1f802695c243502397dd161b6151a72ac20596a7d7efd8e321298",
- "tcId" : 76
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303525003031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "762d30b302cd76b021e237f28017e48488ff3bb30ff9e92db5b1e76eec2ee91c9af03e1c5038afc22591b1cd8cfae648a33ab77901f9f3736e50eea83f7c7a4546dc55c0265fb17dfdd30250fa3881e34e51b4f2e54554ad098eee952ec888e911a0ea5df42c0560bcb4bdd718c88d834b534917e555c38fd1ec3593b2f25b39",
- "tcId" : 77
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30333031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250004deadbeef",
- "result" : "invalid",
- "sig" : "8cbf9d425abef67ff0a7fb648e70b82b1556ac80e46dcff37145b9041bee2bbbfa56817e04994c9cf1123c6df2aeeb1637595eb1e20adef51d657943fd67826ac5d5dfba106ae9cd243f12746917a446ce955034b46ceb0f4d542b7bcd06ad3e6e10899d5338e6d8caf3d4de3cbf45d45a58d946a64d0bc13e97a4ab4e6b6016",
- "tcId" : 78
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30363012498177300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "2f4944e5191dde165950a381eee6cce3fd40214e6a9851919f5441b4efb7ae5724db46e92a747937c3c8f9329facb7a71ad5f380e44dad0436cd05fc312bf3cbf05c4873ab2125d605848cf97ef976f7ba8ab6949bdac5152bf1a66945caeddbd89346965a33a8fe0a0ba63b59beb05a44b6d84e1fd93506edcc48da12d488a6",
- "tcId" : 79
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303530112500300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "975d07b7295268a8662aedbd2b65b5eb10bb496077f41b90d12d34ebc7e492f0c7f3a41d4164a279f06ea616f91968628be4ceecd4a554477bc76cc6b2e6bda4042dc253327c4b8fc40e9242cbc8b835114a7379a3081bae4b2803a99deb4a540f8c149ca5db3a61c7bc9f61cd7e55521660a06603849896c791a18d1c7360e1",
- "tcId" : 80
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3039300f300d060960864801650304020105000004deadbeef0420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "37352cd11eb5ff7380bfb7c0d3e8d9979ae7cb489a71c31a077d59496547b0c95a760387ed50eefde0b762222f05a6033740f6e010693edf3ef8ab5f9c57f4eb1f6ccd83287dcc2e90857defe5ba4109bf79ad84ab069c85a25758d22536c6882919245fa2d7e7921b3635d984deeb6555cabdfc46a42c75875d55924c8bac62",
- "tcId" : 81
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30363012260e498177060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "05df1fa9290a68415b86468a57394c052f00abdd6c65eb4fbbd834cc117cee4bba99764906fdc46e78bd9d554d15cf0284a64dd0c19877115c425a1ba70c1a4339a54ba7fd60ec809b9b789dc06997c2f25e890d8bdb1bc945c0daa8c61feab5bca471bd520126b6db3d6077f55428e0e7374da961dc5cba5397604303eec6d5",
- "tcId" : 82
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30353011260d2500060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "1fb1960934683292a4c92cf3d582cd5fe68888a5b0f6c2e64538289da7f96a9efcc36bdbf1fdc0cc0b3b36c6af608309de58c6151112f3a78599ade4a718b359547a4cac9a020e5e7e7117d1bfeb3ec21bfe9732825e624b27ddf8a946eb858b30461706f769a54b0478e0753388951d98129383590186b80836608f7e06c72f",
- "tcId" : 83
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30393015260b06096086480165030402010004deadbeef05000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "7e4f953b288c20fd5bec56a00745db9be03590efcb637e2ce2119a0a1846e9f38c0ebc5f2498ebde6217d81c9939b6d6a6f35ba54ee50d6313d3f2579751e7ae8d31ef4b0e99ca2e96c80459a7e5ff51f6f31e9c965be19097de13017c90037aa482d197c986f50bf2d5e1acb3f3024605e46d963410a4a623c898d0d773a78e",
- "tcId" : 84
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303630120609608648016503040201250549817705000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "53b8fdeb2d8aee9796a56afe4934221610ad028ae6f9478c90d4e865f3f78b3d27b383f87086d50fc4d96c5004d8a22a0c5d32afad45fd68fcc3e9115bdfddab605c81f31d0a8ccffcfd5fdbfa0f0a4386649198b11c10f33ec5bd73c713a6af706e617a3a1e967f6ac025e7f283e49bb9ea1fe3a4f27d9f6caaf1bf4981ba06",
- "tcId" : 85
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035301106096086480165030402012504250005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "90a5d10e2e19f7e016d5126a3d3eb91432611ebfd411b07a4be15aa48c39df33f3a2855f1e150ad34c7f83973bd73eca6575dcbac4086aa0a38db3d6e6ee2e9f419768493fb4829f1f6d67f80359f82d95483d6057de17fd388ae46687c429dea4d9f7a286c95fb1b9df0f1ba40a4263307789952b1bd07cdcb3b5cef10d9d2e",
- "tcId" : 86
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303930150609608648016503040201250205000004deadbeef0420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "a88d38e8c765b7e439f42294e71c1689a318ed5414efdf474196989829d4989fce8910798f4d7873fb43d3a501fa15c8019813104e4699597246db66f96c838e45aa3596a1d26cbe9f6ee91c077422953b402f7e11f8768a2f132295bff79a0d10ab843cbcf2c921113992336638f4052446f52815328ba4946510a6b701d448",
- "tcId" : 87
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3036300d0609608648016503040201050024254981770420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "a34e59121976568352ea031232f6da386623a1c6866e36d6c6c07168de977faf6e008f14fe22a27d42664925f756f4b57f5258ceaa8197c3c172068dabf3c6cd46b3cf0262931bea731249781f28361c25cba9b64f678c0b2692056469624d0204bf2bf9c4e87407372838926e6b34e68cfb31e2870bfb5b0fdfa2ec1e177149",
- "tcId" : 88
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035300d06096086480165030402010500242425000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "7f642b5702c331dd76b7ff66578a2c0547d91c556b7b9751443d911729fb5ce8426515ba068e2839cfdc956eb813c25d65a2d5213b59302c0ed5e6fb95c49002edb1605f8f622912fdc309d92e6e3f188ba19e991fab0a7018ae4f6e70927d91cffec51b2dcc8113908faa1173ec9ed72350aa93a8cadef8bfa7305bae22bdf9",
- "tcId" : 89
- },
- {
- "comment" : "including garbage",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3039300d0609608648016503040201050024220420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250004deadbeef",
- "result" : "invalid",
- "sig" : "0abb75f2fac084da0b99bc823c021c4872e23302a6a25e400b6f25d60f7c903899a69dc548676106b44f37c1e6d2604eb995a16880a2a8e2cc9e0ccb2b984ae482036f69a6ad31a2b5836e73e0d30c3e10f8b93c7587d7c0f2371183edc3b8cd0fd7bc325b1cf75e1079f8d6df53fe495722cc1ce707cca49bc6f4ed2ca6c4f9",
- "tcId" : 90
- },
- {
- "comment" : "including undefined tags",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3039aa00bb00cd003031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "9f2234b108a45abaed850e19d2f9576f59bb83dbc6165da61c4798638f9c98587c7eb92a8c901dc4430e4a47dc05681ae811ffcad6f7a604c43551cd0f5d123549435d622f7efec578301efd49dc6b139abbc3c7d6a26858f6d18f09b863a145d6483c9efc6c322fec1341b6362dc1d752c714efcdfb09097a0ce6df7dbe88a9",
- "tcId" : 91
- },
- {
- "comment" : "including undefined tags",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3037aa02aabb3031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "24ba137a293599ab7e50a0a4f8c7a5cd02dda6a4568c93f84d00ff47296564563c9051b334db2fd2c081b23d322d4870a61b2435d651d7efb4e1b0920e759f7fd81a937bbc85ff43dbe2b702dec3acf4db68d5fd7b8a2f6d32cc49a7300dd659623b391927a2442d69c6c3c29e59eb80b1d0a95bec6d18a6223cf4357eb7cc96",
- "tcId" : 92
- },
- {
- "comment" : "including undefined tags",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30393015aa00bb00cd00300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "04023dd35fa479f8156794d02935f8669c023c774b95c5a0e02837e32ccaf7a4ba5195835a15de6a21796eb96bdaed868f9e8b7f0a5a21c1a3058f53aadb62d6ee74cd70b2c38f17e42a1f7ffd88955731b4e15368211ad53f617aacbb54a7e7078740ba6daaca81c1b321b748ea1d13f7aece490226636ecac41bdc275175d6",
- "tcId" : 93
- },
- {
- "comment" : "including undefined tags",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30373013aa02aabb300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "253bed76e4b8465ebfffd1b7214ce586294d3bea290517ca2bfc417ba9d8e72d286570c348dc6084fd379c2bf4dae424189964639533e17c409ae18e445210ed4dc98de4ad7336554740d1532d5010a1bd7ebbc33ba48a3365d50669e4f4522d0e5ff7a3bdb1c42c42dee647a8a3ce16633eb33bbc0a869e12cf99f9481dcf85",
- "tcId" : 94
- },
- {
- "comment" : "including undefined tags",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303930152611aa00bb00cd00060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "0775598491297eb9004eed66234ded82e047ea2f06837425e6bd27f33b1373667f3ff4961d60f85edede88ec2bba2680151da3763f0df9785b31771da7e643862ff9ba944ab54bb1356ee113e420002a873f1eb381660f3eb84b1d6b25ccb8b82ad12ad0a449c4de205144873329e80ae8a84d1d3c1660b3303cbef28b48a553",
- "tcId" : 95
- },
- {
- "comment" : "including undefined tags",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30373013260faa02aabb060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "a73df043d06ae53a37773016a4e21d3f1093c50e079b189c4bd7db3e2e9875b14e5374cb8e7394a9f1b45c7e4e9dd516198bf5055b30ea4d205f39fddaab3da0cec63524bdae2ae166a3874c59057d93855d6e6314fc5da8111ff58666a73c00a105311859f27d2fb92f507531b9d681e219861e4f0b2b979c185af2690eb4f7",
- "tcId" : 96
- },
- {
- "comment" : "including undefined tags",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3039301506096086480165030402012508aa00bb00cd0005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "17e5a889b8139593e192f7af684c918f2751f157214863f88984ff3d8c9e381d1bee5ee788fc82869f4c3d8483e3c17c873a850a7a5c85e4518cbd8531b331a308a0368a868bb7995ce0f8a7ac5ba53b88c31c958dfabb36ed461472505b598418185b864f381342c29dc80e55ca7c2095e7788e7e8d385d61de605f74e431b9",
- "tcId" : 97
- },
- {
- "comment" : "including undefined tags",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3037301306096086480165030402012506aa02aabb05000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "a659f7c44e4589e9f6658b0b57e82e65d5ee9fbe2376894f558a7ca4b6e3c5032f953d1dccfb9b76bbc53dd5d1a52cfc092c6ca279b37c0a43c99ec0553d7ef4d9bf9361a1c4a3fb7496aa58c0af518312e18819fffdafd1a230a38440a6fbb0e69babaa977b8b5fe08ed7c6d59c0391ccd80b42a0c0102264b0ed6af8524e9e",
- "tcId" : 98
- },
- {
- "comment" : "including undefined tags",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3039300d060960864801650304020105002428aa00bb00cd000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "83fd4599a47bc0852ee1a12b2d97fceae6d8442fd089df1d21ecc252a410982410bbd2cc6bbca219502c2934ac593a09beefdeb54b0692b3e5724b79b0f5c53541b62b0c4bf80a658af71d5964fc6a1fd7823370d00e24dcead4bdc86bcd883fe3f48dc7f8468ce99b7580306007021b68b48ace274e3c09a1b5e21fc7542ef0",
- "tcId" : 99
- },
- {
- "comment" : "including undefined tags",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3037300d060960864801650304020105002426aa02aabb0420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "4bab6fc6948143f8ec7c8ad86a0c5cda5bd8151c24ca7916857778729c882581603363fde0ae2a28b6f8f2c8ce8d5f6b6e731bf8ef735bd31318069544295b54b04ff2abd1e11900373931164586d7c830bae704f7314eebf1d32b3a171274ed456e335d2a0b998ac441053ef096a037bfa6e5cdf3835c45ede383f0ee8feeec",
- "tcId" : 100
- },
- {
- "comment" : "using composition with indefinite length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30803031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250000",
- "result" : "invalid",
- "sig" : "2d9940c172e83a1ce38ce52741e694c7b62c77a63c0523ef68ffde402b0cdf7102afa7005a731d399757b69d313c2970a61f785c12fe79aad5398a956a2c004faec802691b00246cb759b0db432739febfef9abece7bd95e6ad980eb9d8b53886f739035b71fecd5e5ef0f0c0990a9f8fc0aa5d18089471dbd53488c23630415",
- "tcId" : 101
- },
- {
- "comment" : "using composition with indefinite length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30353080300d0609608648016503040201050000000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "69fd1dfca1b436593840f946e6113a79018c6cbc4e2b4562b12d06c03c7cfc1e724841ec59aeb0371c67a76a089a3f83f837255719bd648bc0888339c54223c25a238e717d1a90691fcf9690a3fef132f034cc03926ba8ae21dbb68467669cd19837907ca58237b6619be08a92ccf8e5756e3caec34a3c2a4622d7154a72256f",
- "tcId" : 102
- },
- {
- "comment" : "using composition with indefinite length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035301126800609608648016503040201000005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "58c64866f9c1b6cd94c33fd708375ee8462f89efb1c72322174a1c5ed9117885bfa4a02ef0acc16d6a078800b84e9fbdb7f8f4f232091326811e71639fc1321b31c15c9fccb68f77c79b2e39b817478539636966c0adb23407401a4c68e6cf5589104a5557650ac389e4fb2a64191014c4e8f9af48f8a28f555d5cc32d7a87aa",
- "tcId" : 103
- },
- {
- "comment" : "using composition with indefinite length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035301106096086480165030402012580050000000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "0ba4e7900332ef20ad600bd4b8c0bab55c1030138c6131c1cf14a45fa98e10ea297ff6c2b8de3d92bcab6f1d303f4f8168848b2fee58ca40fb1f1c7eeb808c212b413f6f302d2e3904c2be2fa77fac21d04352a0abb07aae028e54d9e08ce37a6c210ae47095890d668cc1c296c9db1b5ddec30b722790260dc26c85e35f6692",
- "tcId" : 104
- },
- {
- "comment" : "using composition with indefinite length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035300d0609608648016503040201050024800420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250000",
- "result" : "invalid",
- "sig" : "6f7b739d7e604a1123a232be4d0909a890eb3ad115f822b91592563a55fa59711f7ad17d1370abd4a6af6dac7ba08b6ae111291b0c8fd0626bc068022a8eff5ea5b797cc7fd35a81130a9394f051d2bb6bdf6190c11b964dbe2e4021a71ee8b405d0baf91ad5897d9ce22c8c1dd0e7dfee0e6abd979f5a1cd9443116c212b806",
- "tcId" : 105
- },
- {
- "comment" : "using composition with wrong tag",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30803131300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250000",
- "result" : "invalid",
- "sig" : "53e00d738939553ca6f742ccc3671c88fd2319dc438d046f06011e088b57df8703813a53fa9c68a8b2de333445fb739726ac2b6ce3b2800e3082f48b823a06d0b2a83fc4c0b2e6a40fc2d86b73030e974f101dc6fd6a24abcc6cb347eeed08a4c8086d1fc5fd68b0b36fce0c79e5187c38c8a4cd35973b1755643aa28496fbd4",
- "tcId" : 106
- },
- {
- "comment" : "using composition with wrong tag",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30353080310d0609608648016503040201050000000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "9382e341df276efda17aaa4410801a3ba0e4ccd5f0b61cde2416c7a8345cab1bb1fcc4a4a1d7c4a03a9d9ef68c83f2b3e08fc5893324159cd3dbae159bab67b109e55db550b540aa6142531528281732f63235785e145ea0defac4e67e825b30fbe9ff19687436d600ca412053e2430a1d1b637d4db255f1616713f3a2ad135b",
- "tcId" : 107
- },
- {
- "comment" : "using composition with wrong tag",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035301126800709608648016503040201000005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "01ed4d8d4a342729f18182bc4f7645ca0a5216b57d4d26b874832983d19741673aa7c0e01705ada27ab779b9b84f431e83c621a2dd7ae5f501ec369273d297144b76477f4408bca5ef6a59053c1ffde80bc228f99dcaaffb4c520c507b3a941399042f0c535015d86b2b5a95696b71ed61ff2bb585442b85fa2477268b71f77e",
- "tcId" : 108
- },
- {
- "comment" : "using composition with wrong tag",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035301106096086480165030402012580040000000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "21782ca777e07848b600c37bb0a881707e580fe822d5dbb78f4809251a5cd74cb6f3636194cec8bab9040339da6531c730060ff5ac39ac9ad56a2371fe21e02ce08da18778d2256276c47ef0261d9c453360fbc4a2cc1dc7a8965ac2ccc17b460b0fe359ae4fa53f75efc68e96762cff5d98be46fbeacce2edf1d1bf5e158653",
- "tcId" : 109
- },
- {
- "comment" : "using composition with wrong tag",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035300d0609608648016503040201050024800520532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250000",
- "result" : "invalid",
- "sig" : "1eb6de862a77d435e62635b620be37fc8be499500c19b4d87b3f993b9710f55476d3f3ac27d5ab2c1ec36dded088bc50ba5c0540934fdbb5ed3309babd766726ae833aec211a526caa82bf08f1704b66128f24c912c8c3719170090fe1a2738b0da32f91d35546a9a499618428d368b326203aeafce635668d3d5fde15762d84",
- "tcId" : 110
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "2e31300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "5770bbbb883f93f7c29bdab32e496f2e9063110fe648705fd0b1dc927052fc9ace9b36d898d19cd4f862b777b7c790d767b8313f735ff567c34cfb31f29644540645beea182cabdf789ff9ac3f68cc20444af0b9d4ec0bc8992945063fdb733cccef7590a10bdf491bc21c38f25ff65a581b40343e30529c3dbb71f62189ba3f",
- "tcId" : 111
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3231300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "359dfbf40d3c2383f58bef1d518abe9852ca80d797393e4e1a9380ef08aa851d585213e8897c6f701ab680b0f63ccf5ea4216331918ca9a984fb6ba549f4bd066ec1fc4f1ed053fa5658b01df674a21322ba7e21fba6cbb3a8eb5565fb7bc269f99c65981efa650dde613ccd6d3927cdae45922d94dcf7ca5188bf5acf84035f",
- "tcId" : 112
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "ff31300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "24a61067121e9b4363b816b7c5750584c23f3c3200ca929fdedbe95d7504c56ea7dffd762074e44e96e22147943f2b704003967270b2be1bd1baadc3861c4cae91bd41530c67220349db4481d324d9927d52fe85618ddab2598996c5813f3299e1afb020b24003fa94f94a0c6c02b3183295e0de79eda021dccc5539cd7874ce",
- "tcId" : 113
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30312e0d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "11b8d1dc2fa2afbc32f048d7454ba032b432a2ecd438506aa72c697a5c118e9e231a0c6b6340b5564402b7e837c59dd36f726fd626621b8f543964198484087eded70e7bb1dd63df2cea33198b9d02dd28e3b8bd006ba991a8b3bf06ac928bef45cba2362f2e11a5fbfb0310e84e8b7ba1e17c315adc1f34519134c36689619d",
- "tcId" : 114
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031320d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "8748f029d5294dc917cf4fb347e0046f903c088fd976ca97b1322738549df7c56cd67349d66596338fe418b29de9e8af8872fcdbb55e1a6f74e9965fe7a365b846b667d0ae50df23083be73cceb59db545a3e1a560f6ce0e9eaee57b5f95b8487a3987c00f364d0f148ead6d7e6a37b05456b913b7a79c0547b80da2a2893881",
- "tcId" : 115
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031ff0d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "2bfc087003f3b98f0c8c5273de34f5e4d5047e909cd80e222072f6a7926ced5ae169131342640f2be11bde2f7565c3c63d0335614dd278915514de8421f4521f0138109a5c9778f86647b8a42815b6b861f173f5a6df893873f99c5e62bc3c086150e3b7d7abb943ecbe5806068abc433e9052d9bdfa19a58d19da463dbf3b23",
- "tcId" : 116
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d040960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "0fe03eea6c50ab664bebc7d64346762aa29b08b61f2877973cd543c9533c9d0451db8d836eb46e8d64283306efd7ef6387cdc3c794f7474f2e7d51b9df078095adc85fb810cae52434c9cee5048fbff72610778397fd83204f44bb87f7637373d111dd16e18287bd9ffe816683bc3663f586082fe0811ff6a06c0264b67f7716",
- "tcId" : 117
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d080960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "748b9e64195314003ca31f726bb3d3294abd8eb376365acc5b1cd36934bbe1a9bae99ceb7c1a40c910bca6007ced7961ecc9ac74c7a6424cc87b6b9610320ab9c5b527d986c6e8ed21e677bbe2ee7752e2dbcfceecc2dd6da3f6c6b9c81435e9e060dcd67ba834729761dfc9570b79bb1b8ead7bc1325c2233e445eeed12dcad",
- "tcId" : 118
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300dff0960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "7379bc96dd40d37a7f8e58f87c10fb94f250a964a55b2abead479b368e60e442e6eb864952308eb45eef1d318b6a5ffce634fcb886dbfa062060b9809cf89a09a26fd334ca22a1917fd219900ec0c68164c308cb9cbca3fb2b89ed8637c5540f7a5886ab1e52c503e20edd6316e41c746e53917e107ef5308590800ad378ac97",
- "tcId" : 119
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020103000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "4a2478918565be6b46fe61e5f66cd1befb7a3026b5a1502e9a42636b0b924a02e85d7ffdfd8671b1d6d3e604e3ac6a5302db4e0ae0975d0661efa018d6ba0c632a6381368dcb75926542c74823a8c6d8732619764d5a61062fb3b17ae243bd691c97c8f9821af9526abcb522ec8e9dca32de1989e576e336af9dddc3e766541b",
- "tcId" : 120
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020107000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "5ec392c91cc165ae59013337e7f7d5f2f9b3a6d45b6f6beee6dbf93e7b9607900f4672555a57de6e9e1aee1fc9b7adfc0dc00e122e84b0233c0d615dd0d79764fdc9d1b0e541f2de0083ab479f313a07f55f51390d1c2274858b219b1ec0601b82a2f7648ae95ec17099067a173e3e83959b6c06f149af0e4610761aab5be1a5",
- "tcId" : 121
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d0609608648016503040201ff000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "6173aef07a7057c3e97f6b7d4d7266918876f9fad86000b4c8ec7f83ee491563115b0cb5d580df8c97feb0d95866eabb79147926f5395c5189554749f4a2c75c0d96325971635be029062e1f27536c5041bb42f42e1fa10e21bb8e9a2e2502f2a7299dfe3bd8720ecb8a57238056ab0eb546de8dc0e56b317c73ab1e19772596",
- "tcId" : 122
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020105000220532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3b80c72f3b7ada8b38b30527bca41180b4a89b066f44a17b9df5963dca46517d9160326afee7a34b650b9e7746e764958ce6a0a6268481a8df40e0a95a81ab0f0bd20c050becfc0c4b03ebda19749a4a1dd3ce925fafd9a4006a835eedf221a6ceab6aac6bc74f743fe171ef8c01935f8901e1ec9ff6e33ae8311851fa14a65e",
- "tcId" : 123
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020105000620532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "4b0eaf3ae1c7a3322dcfabee0569aaafba51e0f34fa6afc325bacc853ccd2daa3dca56c918325bf553af02ddd19fb597c368dd18892d52d9e935dc51d38347ebae2a7f90c78504355f6899ab4452d5f51d2025381d81042a08582dc50bc1078246ee69652043bb747969a7450659e333193990f34a8ce3f036221193e700489c",
- "tcId" : 124
- },
- {
- "comment" : "changing tag value",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d06096086480165030402010500ff20532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "1fe7b390bcbd5bc1904e676111653e14e581e7817b45294bb790e4e62f3010aaaa77e246b29729f2b7da65a2f437b8d9c4fe3b26baad367a19fd7b1758d04c2f788c45e5309a833522b46d7255dd5ef70ed006ef966aa7c648bd0b893b8e1566961c16e9554fb729ec81819f1b3da890d413a153f487c030c7581da9531bf134",
- "tcId" : 125
- },
- {
- "comment" : "dropping value of sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3000",
- "result" : "invalid",
- "sig" : "317379f37cb7f21fd03259a27db3575d491a248df82e67b39d4956a1c619094fcde001544f0fa70c64dc0d0440fb21d2860a20a911cbb397792bf3eafa5cc050e78b1e7bb29d041cfa0287bdf54a90a7a8bff5c870e898fe34bb522477daf8e003bc22891b789ff215869cceb92610c4b03210d19506058d941e6fce7a3cd786",
- "tcId" : 126
- },
- {
- "comment" : "dropping value of sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "302430000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "2de802ddacb7e47e27875943d5098419bca3b170bf74f1c4b4a8ac420d4469d9aea97592fbeaaa1dcb5fd20bb97afc5f7abae17a9bb85c5490db97010c5217c88f9f52b5e209cf5fba5f0594f4e4450114dd0348ece336870a1333f7660caf959056ba13b77d35239eea164ddbc8808f8e7e1beb070f551b6e95f90d5bdbd925",
- "tcId" : 127
- },
- {
- "comment" : "using composition",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303530013030300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "09342a8fb8402b5e50fbf8c5d1cae415ce02c0a803adfed88188982129e8480918dc21616bb5f8381e8dfe13f63234090c32e542a005df70df5e8e00dd2a478d10fff1b61efbdcf0e410236f7c031c9a5f7cd0db9098f8a32a6a49f408e72c4a29b7d27e8041ba605bf089bbdb9777e19b31ecca0d49b90d54701721af79cf3a",
- "tcId" : 128
- },
- {
- "comment" : "using composition",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30353011300106300c0960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3ef90c414a64601c538c286f2c35f32445039799b8c266eed605027578edda796a409d905a751bf5c1cdea97840437fa82733d8f27efbbc05da732887078a8f547bbfb54607a54f893df7dde0c35c45f9c2402bed0405c72e98175e5b9d6f90224e07d12e8c1bbad2fc8b1a14c42dd5fb7e554db5edae89d335705c672cd7b55",
- "tcId" : 129
- },
- {
- "comment" : "using composition",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30353011260d0601600608864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3ad3e4ec3636b5eb8aac2161c04d228491ca0d9da2abd69d8904054373940b39b5c025c011c9b9508a25ec25b24a0837cdd6a27cb5c8ba3683d90ba5912ede9a21f2f7e851dc49dfebea8807576be703a6a87ca44c370db76812b9929a54fb8e2259453ccaf47da1b8ddc5b7322c20197604b9e028ec00bd7eb48012274d5b81",
- "tcId" : 130
- },
- {
- "comment" : "using composition",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3035300d060960864801650304020105002424040153041f2eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "778d93be708d56defbb6dedcfec2a917a3772b2810e26143db1f9d0f26c4fbb8de8db5818aa32ebb2cdcd7960e593ace2c3c3eb682c930cbffcfa6b34438ee2a786a9707d5d10902f7f4d8fc677106275fcb6cb08f56f341e0f52af590e0bdfa2f2bf95693265e87f5046bcf3e6de34810e8eaa479f3afa2b0a98b175007c209",
- "tcId" : 131
- },
- {
- "comment" : "truncate sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3030300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e",
- "result" : "invalid",
- "sig" : "a3e0e0cb9f7cdf8a2b95139f7c475f274bb63252385f62e66f82158f429e74d83df9ab1040717d34b6a5e009b6ac95960826ee83bb298ecf900425ff03a8f156053b57eac6086d61dd3a8085b84c83bebbe3270164e3147ddee8966a026796401fa48da70f5d949386eccad26b0016543f3f90c8ac2874100dce13f03845509c",
- "tcId" : 132
- },
- {
- "comment" : "truncate sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "84345c9d3de7b5da2156d3669a731c4baf6726c4c231bc8bcaef950d7ac37ca8d86e9c9558404f313de3fdf09024d25491b0a933cc3958033210b1c4f90070ddd083005873762566ff2cd7f6915b4cb430f5e7e1bca8c2ec32b4ddee48aba667f9d614a27c3bb40c6cb7f0cd77d3d17257f197974d1871cc09c9583cc6af8e15",
- "tcId" : 133
- },
- {
- "comment" : "truncate sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3030300c0609608648016503040201050420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "227aaebca262d2189c479ab46d8715a34100bc1975c2d3991a4ade27376f068756cc9d89e903713bc28394d202d81b32126d7eb09154261841227cba6ea0a60d0ed9302f816fb4dd241dcd2d746d5c1b068c42c0b2bd567ef799cbfd0a83e8a30c4fa2f7296dceca38c36ab597ba992f658ef7955d32d38847870afbca35d836",
- "tcId" : 134
- },
- {
- "comment" : "truncate sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3030300c0960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "a4316d438c7091b3bd5ec09aeea9095cb5046d8f08642b087c34985c34377bdafe74285d00862fba20572ce7a06dfe62b4fc08704d1cfb161cd88478e7e1c5451e0bdcce0fdd83c0e37fba5168ae03fcf4ccf60fa12c9b0acb39fe99b06933b9e0774f41151e0564ef805144c0cb76101672c287912197155d91bf036e84d1ce",
- "tcId" : 135
- },
- {
- "comment" : "indefinite length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3080300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250000",
- "result" : "invalid",
- "sig" : "447904593d2796cb9851fc38f6494697af3eff1997568a320a0e6a50d62b484d7254c99cad3897f7383da73ee48ee824f7f6819c7dfce18021e7cb43b48cd77532c6af28e9adbe8005c576415c379bb7bd164a49010f0b243f60064f1986d1923146be8e8a4eceb9263445f32e49e5cef3e500467f3cfa9102b51b2772df803a",
- "tcId" : 136
- },
- {
- "comment" : "indefinite length",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303330800609608648016503040201050000000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "01ce4a92bfbefd1de73607085c875704ff40751537bbce8ae2df9b10db01443154f415a936b38f937f7514763e20de0c55a1b441c5b10a09c7e09a7070cbc88becfaa8d39ab1cb93f4e2d1dfbc973715b04bf5d21f2cbab061ce36c81642fea43d0b11317961886d8783c628947b8f14be0864674e84c4af5f9dbb1f95b327a1",
- "tcId" : 137
- },
- {
- "comment" : "prepend empty sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30333000300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "361f80a57ddb48796e50b3e6467cb00a9e1e193330ecd2cd6a31f649b49eac27e295450efe03e09e59f1829cc661d36b0fe904602c644aad7ec8cb2ca3099078b6d4f7b9233dc159fd1a6189451fedbd176e436f6605f2b889fc7197ebb520accd7f90e543da44453c7ba1948e83e31f5907d1989d982acbb348ca2216fe050d",
- "tcId" : 138
- },
- {
- "comment" : "prepend empty sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f3000060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "674c01596bf71fccd36aa81b000be007f6cff713e5f6ffe58b25e790f9a1f6542ba3f68e1eeaf1bb1ac6c3d55aeaf08140f6cc3d0474f6bd87ee442568346553ceb34efb5301a4d3a5b3f28a5fb038ccfe8444524d18adfa042aa1685fc3a5f9005da5688853b8660ba74f0e32c5be38c743b0048ca9b9fc19a35a5ff4e2c48f",
- "tcId" : 139
- },
- {
- "comment" : "append empty sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e253000",
- "result" : "invalid",
- "sig" : "07ba2b5d519b1f60dc455d6ad90b4135cb45c5da5a2a2c9b8cb954165394a0f40145ebf2b1a3ff1d47f5031d542d25041fe9b6d78aab623c40eedcd8467618168ad02af8a696573c5c63cae0b2c26583b0240848d663fdd0195322bc2c8dbf9b5db2ff9cc3e75e70480e51da0d6dd402fa87772ddef5256467205cf41a42d18a",
- "tcId" : 140
- },
- {
- "comment" : "append empty sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f0609608648016503040201050030000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "9fd302307455d4e946c1ccee65b0941c3550c823279cc52c4f29ecff72a12ac40ef6b7e37b7dd774b7735bbae89b0792908bafc47f0b0a11637042fc8541b346151bdadc3990e64b6d1807dd0e7f9266ceb3f686a9813341f835562d3c8c84868a1f98db97d3e695ce4a25fce80b828d010d6323120362ac48700abff8a7116e",
- "tcId" : 141
- },
- {
- "comment" : "sequence of sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30333031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "247aa1cb69ccb72795c93809d7c3a5e52de98ec5285196058a6ab18ec2f5d9fef5545ab5df923f63bd58f5f247b3d824bf161bcb56d325d4e2fc7eb3765dd81b5580422abf2a3bca8d8af94cf6a9a3133b1494f66d5cbe938d30b9308b5ce2cc6d3df37d3299b6a7616d40afcc7935d80225e1a89a7a63ebff13a66e21280a6a",
- "tcId" : 142
- },
- {
- "comment" : "sequence of sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "6d6248f823020a9604bbafe5acc103d9bd020624585c95805533de22afa3b6b1b511f8805296ee4d3e96d707c91e55df8959464ddb6d6a3d62b1cb248754302b2833406300f4975d913f1b90f95e3673e2c57d6181d73a360e8c818b8a9dd1e7a4fdcd68683f11dd47c2d395f20b0ce9c59eede6ae6aa58a707c4ea8d1a73a9a",
- "tcId" : 143
- },
- {
- "comment" : "truncated sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "300f300d06096086480165030402010500",
- "result" : "invalid",
- "sig" : "941d41c39aa8bf3879d16cb78c5486589e7b97e56a0249c4f613060d26b786598fd2d34bc4e99cc8888137975937307d6a328059a09f3b994bf955c7de4a2841a0d10bbbebb2db3b332656f258c66c8d50cf9155ba94e1cb21a78e6147af76958ddd997665b6d8f67ea8f5e1fdbebd7df635f20494489c895d33ae4c7f248bad",
- "tcId" : 144
- },
- {
- "comment" : "repeat element in sequence",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3053300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "a32afeafa2c3b58bef55776ef6daaac6647485dde100d968e0449d1a2d5a121807ca2fdd70e2e9cf524cae4f263e11837000df85f0886b718ff45cd316c8d031b746dabfb956dd6118a37e0dabcda1ce9c728afd9a5f2448f5b15d27982218888d457752485119f53219315bf63141c9c0802327226a096403ece022cb27c0df",
- "tcId" : 145
- },
- {
- "comment" : "removing oid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3026300205000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "6098a732419cd71887548ccf4fbf3edeaf9fe7b220bd747ae1b995b746de1f4d7b48c73ddb71903f50ccf7c93be9c8219de5a75ecc302ab50356069dfaf642f32ec580a283519fbcf04784860b0660174dfb7e1e527bb320960bde8f6c605bc3c1055b878d2adbb44e1b6c41add15cb603345c4fe2d1c0158fa03f21b4c015e0",
- "tcId" : 146
- },
- {
- "comment" : "appending 0's to oid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f060b608648016503040201000005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "2f08cdca4d621007acd15b1f4e3c39882a8aef706878e8f101e7fb250798a3528dcbf4d3327ceb0754a2ca0850794094dde8a875cb947d624d386ddb9593259c53ef2311260ac3c9cd1277050ec98d105188f590f198ba908ddcf3f9ed18f5a96cc6b353fadde007658f87ff4c201db7621d69c8278305f3e9f2041a2dddfad0",
- "tcId" : 147
- },
- {
- "comment" : "prepending 0's to oid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f060b000060864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "10078ea73abb9bbb879c9d8139b1758170fb73b34f39cdc83e6a725439e315a5cba4421fe15e8c80d8fda0a9aba9a12c23aab41f7328d4191e6c7c3a53a505ab518dce078439347945671ab06a2cd5375457b3bf181c40a1a4be1ea8305c9a401488532c7cdc1150fb9c46a2e846ce4a2fd9ee863d0b0b8af7f10360acc47f10",
- "tcId" : 148
- },
- {
- "comment" : "dropping value of oid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30283004060005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "69a74665f61787b54b522937c534e95e91917f5dd4fa9e3472add6e21dc033a275408f35c71ff6cc029e25986fe6dced8ed053a9040aac32fc444e9252d2bd4081fe3e51ace15a0f694c0b8953dd6afa7f8cac67f4d8e17513b415c14b439a634274893885907e2ea428a6e242154a58a031fedae31c73df7cd4e2f5591496cb",
- "tcId" : 149
- },
- {
- "comment" : "modify first byte of oid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060961864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "8f3b544724810d462cc9b19f356e61efe7c192dd63511a9f1f63286ca81f89477c2b464f8e51a97ee138dcf8c6709d79a78591081384af7cb5e182c9867b826013e6191efddddcc39909d3ffbb18944503b69d774c959831a8092f4790a4933521100c3e9741c3b58e1d24b75425ee28fde4e40c249b4dccd726cb06cb9ad2e3",
- "tcId" : 150
- },
- {
- "comment" : "modify last byte of oid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3933d6937e977caac37a07a5c4ae503565af57e6c4e830004147f8bbf6784f79666d89cb4cac60e3f0aff2d5ed6a182921e490c958bfa49c86fcf0270914c102275b0878f01795c7a2f44a8a6f5306aa67a81f9294089876801503989e749d152c3e34906291f1f54bb6232fdd3d51e807f70927bf38ef70bd2ba45f0323acf2",
- "tcId" : 151
- },
- {
- "comment" : "truncate oid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3030300c0608608648016503040205000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "7b2f6581fb0b4f913ed38c0ea20dff2bd60723f2bc3f1022ceb946e48adb75b1e0be031dd8b706d82967f93c6b6ba496d8c4b49aea9970e139b18fefdce30a4ec04f77625eaca4c7d1265cebbbcf53b63a113cf06bc50e4a416a771cd28785a0075631a3ef60c9212e224aaa063e7d8109c27e248e6422b26acd02ec012b7bf3",
- "tcId" : 152
- },
- {
- "comment" : "truncate oid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3030300c0608864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "4dc9e86e076a395b530868d9fec9f858bd6e8c10cc1e32cae7653abb3f23991c677e970ee468c7f35022f3241f5d35673a8cf4ce9134b1e63a994dc7abc8cf4b9dbbb126b314312539931a0163c911f0234f5c3f683c9376f2ecaa3294d71a1274f6c63b84ea8faf826eacb05e4fa5459b787ff384b2cfe0f1f4c755f32b5c50",
- "tcId" : 153
- },
- {
- "comment" : "wrong oid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "302d300906052b0e03021a05000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "8bbc9167821885a728260bf9831120ecc42c14b2b07854169c86421146367d1bec66d8c3daadd115f16a29754e7fa8fb70a63966f7838484615d4364311b6c3f6e73ecd8ced0adb52db2c374297119f5fe571bd5396529d13b7225e87db5b5b0df38e4c56f2349071b09ff5c1ded919b398d4aff38c6ae29af6f6ff99d3e8836",
- "tcId" : 154
- },
- {
- "comment" : "longer oid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3032300e060a6086480165030402010105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "2054d402bf6a148b52972b830c8c8a16a6aeddbcd5c2ae3fd83de67c666e712fa98650308658837a67ab87b2c444bedc7cf995c19af433da9343f260049b1bcb436ebe27d8a502728dfb0daac5d2710e2c39fa000b909aede07ad7a0d27629e0ac27ed9fcd41a39e09f7acdec4c2df77f38c535f46e3b96f2772a81e65e74bb8",
- "tcId" : 155
- },
- {
- "comment" : "oid with modified node",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304021105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "3a94d241563a2ad97574ec82baefccd9dd114e21fa9169d0f54c4d0f57826224804ddc9b29c1905c59f39bd6aa3366705a85f5e6e18c0eb0f67986b5265e7371865b618e90e5c5313f0b6fce2343aa12d4ed44d6770fa08d4f1342608a4fb627a273f3a1f1340d1f5c55957ce51048e3690a845851009cbfe38d3c96e96d4172",
- "tcId" : 156
- },
- {
- "comment" : "oid with modified node",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "30353011060d6086480165030402888080800105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "079cb62831dbeb40a638402865cc92cb49913dae214babc3f4f8d69d64cf14362c23c8dd6ebcee9c44633dd54a62bb2f0042c20033728fc2f8ff482cf0be3ee103bacf757b50319495d9a838844ea1064f4bd1f1ebdc1b71a318c3c8f7d76ebd79ef2f3991d4d87e110d60e5fc655adfa4a8e792e46c1c7aa96156b884e2f7a9",
- "tcId" : 157
- },
- {
- "comment" : "large integer in oid",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "303a3016061260864801650304028280808080808080800105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "2c9083459ba6504dc10e0e63edf8ede8bdb4a9728673306908ad4e8f25656d4865f0748b9fd2cf7b51db0a2c659e0ce021fef3d2d3d0cf7c45343729c2001a19d37e29398a9a7e92d7f62693252261f1f7406b54af5447db6e846f981722059b7bb09ba95268c321c156ff659e0ce8e709d2819d5ce15f5dcfa54c55114a611a",
- "tcId" : 158
- },
- {
- "comment" : "oid with invalid node",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3032300e060a608648016503040201e005000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "9a76669c75f0f11399699f76e7bfbefc0d29feb5a8d86de1f751eedbb5c9e7b81ecbc224534db67cfe1b611951a6ff499d86e11cac4a1725e2ff707085a81a76c73d5b53d1b0b2c4fab2d2eebe57eca83242a261cfca768abcd8e1f42e3841d698bef3d4f16ac2dfab0fd42ef0abb0463474367dff7ec99d665a9838f2cfc24c",
- "tcId" : 159
- },
- {
- "comment" : "oid with invalid node",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3032300e060a6080864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "6674ec2352f0d3e90f4b72086f39815db11b056babc57644c8a703014f439baa46e8ed961714d5c7b5f0ec97ba3fe5ab867c16b7e1de089868dcb195fc20cc42fa1b3d3060f50cca77281bb6be18d65a1ee8e5a381e21e7f02e819752b71327a28719c7284f6425bc9241abb08d000faf58d48848d7f4b8d68b28266e663f36b",
- "tcId" : 160
- },
- {
- "comment" : "appending 0's to null",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300f0609608648016503040201050200000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "8d18a5e0a81522b56eb9e4f43bee15475cdfc7881006150cc230e76028283375a13425fe5a106f2626346a65817010a5510b157b234a16fcb9426909a524a288161537be91ab13033ed296f5f8c1e5c3bdb963f12d7b5eded46106f7c2dc1ae9c451415303cb7e6a3f59809b922183b9638197909d5730e5b1e89705fbbe8464",
- "tcId" : 161
- },
- {
- "comment" : "composed null",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3037301306096086480165030402012580aa00bb0000000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "80c9add3930a98b726fe543b4350c593d28e77f9f53f1ea04c2bfca30f157309eeb41e5a675bc0045823df8e99f2e55d2567f4b78e36eb8af1b45c50e33e6634dcfdc4094407b760d8b60f76995edd05920a6a89e22168a788557bfc7cf01d47d21448a65f9766bb217bcac1124020b6b062fd0e7bbe3e142ec88652eb617513",
- "tcId" : 162
- },
- {
- "comment" : "appending 0's to digest",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300d060960864801650304020105000422532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e250000",
- "result" : "invalid",
- "sig" : "51640e26e8764936a7d9d709b3e0f52a5f1843453f2c6107a8e7fd6dad8b1c02ecc71659cd4134be952c03ee83c190bea4ea7260e5472c3cdf87b6ad45b5c974957ee9b4bf6f30152c2d939f722cff32e5482db96f3e283532b96716d3624daf16767e0ecdad16c97e56e4e076d64b92af329d2d6a2f8d14b59d1b84853659ab",
- "tcId" : 163
- },
- {
- "comment" : "prepending 0's to digest",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3033300d0609608648016503040201050004220000532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "9080bd4ac03b7ecedd45f8165360d4848bdfe1c9212ee1a4debc1aa92886cd7947a2df5435789bbb0b3e8f78815aac80e2cff14e1939e9ec32f42e7c29ed4029c88cafb64e8523dc85217c40d1bba900468a69c5bd4d12ac67401698fbffaa5159907ad459d3843e12487b3b2315c585881bc42e45543f7cf25110ab7e0a19f4",
- "tcId" : 164
- },
- {
- "comment" : "dropping value of digest",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3011300d060960864801650304020105000400",
- "result" : "invalid",
- "sig" : "5f66f645307346216d3ba9c3d8b29e96270cb3b2e686a676fe975c10b8c26fda8d8eb172628bb3dcd726160c13ab8c5afb1d6ae943ea4c18d00465d97c0d2bcc27a63c18457ff8d6e3f5ba373b4be7b6f4c610f83578613f4fe41a40d86230afce0bb8d4496425a5bf0a80c6b1b1e2a981cd44c31a9aa603748c3d2fd2b85478",
- "tcId" : 165
- },
- {
- "comment" : "modify first byte of digest",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020105000420522eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "8ccff4ab4fd8534b6b50593f775bf6684391225adc37745e7ff25a4c4baff78a252aa1177ea3f3f09d2791da50ba19cef40ab8915379f128bba3271069cc2c02725e09f0b2cdfa0d313eba3f5a7e231588fd617b7d90b285e88a944d7d0a7fe9cc558dfe8103391ab2e6fbf762d829a55ed4486b5d888957078ffcf49e8ec352",
- "tcId" : 166
- },
- {
- "comment" : "modify last byte of digest",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020105000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e24",
- "result" : "invalid",
- "sig" : "694b90d259b8dbe290f5851ede2ebf3bb718c1674ab1d3b7b6418e8ef7ea0760bf3ce69d98a7a3baae5aee488cddfb877972fa88ad05996879d0ce15aca53591423bf1b1b3ff02f823cdbb26bb80e3f7b83c3b7ac01ad7806335f871cd7b7e9e64708c200a9cd092589131aeb7db15655174000cf7db782bd54325ea956a1a15",
- "tcId" : 167
- },
- {
- "comment" : "truncate digest",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3030300d06096086480165030402010500041f532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e",
- "result" : "invalid",
- "sig" : "888cd9bdece5ceeef0fea92727ef1a1d996960f3f551bf108682f8103590323669ba1ab48becd14a49b87a900434d0ca7670d094b08b2f851834757bef580d2d3278d85b88036ea90d4c2a673dfafeb0c3701332c2b77493110d9b28dade7e985ec27240c90498372fc00ac8e0e5547e4d59cdd19022b8d961f3b63630b5448d",
- "tcId" : 168
- },
- {
- "comment" : "truncate digest",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3030300d06096086480165030402010500041f2eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "762c745262627d0df634d6cce41fb8af3cb855fc2d974b8093b035e9d11e510b9b7e7d61581b8f262fc1c4b8a6da3f6d609512e32f16416c7449c623c1773417032ddf2a559d7eb3af129fd02f83b5e35f5b5c065b1e0bc6481f38b6361f0b018b5e7166e8e67dddcf1550222f125efde241a27b0e7f670d15346dde082a8c4e",
- "tcId" : 169
- },
- {
- "comment" : "wrong hash in padding",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3030300c06082a864886f70d020505000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "27830ed405bc9d34009ec6258b766100273b4dcf2a9b3cf6ae31029837c6e24cf6e819734c1fd10c2c23db34d227d98d3498850f083ecd78b648baccfd4647a572607dedbc2b8ab7a595c0594ece904380e7f395ba4840a81367e99275cde1064fc6f7fbd564c5f26ddd0103991ae8262eaf16623685b43f77ea7a05d080166a",
- "tcId" : 170
- },
- {
- "comment" : "wrong hash in padding",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020205000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "4cdfa8cd615bcdefa253d75212e4ed0a1fd60841656c6a749690cb0c6c3cd723b518560c3b11a734010acf6e38f0526338351d9b58351826b360c851d3c86429f38eb689e8555aa2a23157e197faebdd29bc49f84c10dacca655cd5fa50fdec86a72f0ff1c7f8feeec31fee188fbfa72776a7b5cdae1c1506830bd3a00181b13",
- "tcId" : 171
- },
- {
- "comment" : "wrong hash in padding",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3031300d060960864801650304020305000420532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25",
- "result" : "invalid",
- "sig" : "024746d8dd71ecfe33cf0ad7ab8ddab9dfeb5740ec47b8ddd668f07b8f7610f726692404ac14c3a1947ff4246fe0a9e216131489125e71df68d60930fac06a20e948a3e4948aff5e3f9772155f8bd6772b1cefd8180ae719afc061e2f0d68a69769930b8d90ca4ecd6c7b20d04f0cc939502e698ad1c500403763c0205f6870d",
- "tcId" : 172
- },
- {
- "comment" : "wrong hash in signature",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3020300c06082a864886f70d0205050004100cbc6611f5540bd0809a388dc95a615b",
- "result" : "invalid",
- "sig" : "3a152ced8b5e0efa33cd57d4afe67f31ed3b9fb22e7b0ff32795cd9510374fa09fc63a3366465f83ba4d44e36418a5c1d171b6ca05d8c74a242983d5e5912cd05bdbd75fcfd5b4eda7cadab21e6dcefca8e2ab7303871ef360beff45564a01bdc887d9e849e407c6aa5b12055647f6c9df49758d1272f7cb476f51088e21f246",
- "tcId" : 173
- },
- {
- "comment" : "wrong hash in signature",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3021300906052b0e03021a05000414640ab2bae07bedc4c163f679a746f7ab7fb5d1fa",
- "result" : "invalid",
- "sig" : "3765b8800e6ccf29544d834034e39f8fe7a2e6dfd7e6b4a8f81df091bbfd7aa17edfa6005024fe04d35c340a2215fd3f1cf4b4dfdd3c8ad09e6df2c2256c7541e19c2e80051d1ef5df5c384bfb6be88c4415eb2740db2d9fb3214890a8a0f19146dfb7897bacc02700a89139dc8fb21b2a7bbfbd43604d7f384cc00aecefb4ef",
- "tcId" : 174
- },
- {
- "comment" : "wrong hash in signature",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3041300d0609608648016503040202050004307b8f4654076b80eb963911f19cfad1aaf4285ed48e826f6cde1b01a79aa73fadb5446e667fc4f90417782c91270540f3",
- "result" : "invalid",
- "sig" : "5c5b097c21ac2eb156de39d1eaebe3b96082f54b0171469a94edf7d2027ebfdebc0837f766cfefec577e7b797c7a082df2ecc826e55d39927b01c2da26f8f6814ec993e3b93ee87a3418322b65ac652b3bba6d34373a13fd40b66be489938fadf67bbda762f6ee09a1ddc41382051d4a9a946e0df832bc65b7d5dd58cc5a402b",
- "tcId" : 175
- },
- {
- "comment" : "wrong hash in signature",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "3051300d060960864801650304020305000440c6ee9e33cf5c6715a1d148fd73f7318884b41adcb916021e2bc0e800a5c5dd97f5142178f6ae88c8fdd98e1afb0ce4c8d2c54b5f37b30b7da1997bb33b0b8a31",
- "result" : "invalid",
- "sig" : "0ede4ac9ffcb6d3d42c75cf73303a28ba6089941f68dcf392a75b071f6c149a109cab95b80a679ca3b29ae44e51c18a2db4c72211ae6b959c7f22e854c45f20f5560446f33be4819f08d981d2fb176d48039ac4acd28127d593f9e219ad40e2a5ee911b334b3b8bb290f2327524e3faae2c028745e03d58882bfe503c4ff04b2",
- "tcId" : 176
- },
- {
- "comment" : "using PKCS#1 encryption padding",
- "message" : "54657374",
- "name" : "RsaSignatureTestVector",
- "padding" : "0002ff...00