diff options
Diffstat (limited to 'vendor/pasetors')
40 files changed, 16965 insertions, 0 deletions
diff --git a/vendor/pasetors/.cargo-checksum.json b/vendor/pasetors/.cargo-checksum.json new file mode 100644 index 000000000..3a135984c --- /dev/null +++ b/vendor/pasetors/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{"CHANGELOG.md":"a6cea3ef0332f362792b9218a6e4d19262de710569902c49110c28f796b70c7c","Cargo.toml":"5cefa5ac33d3579c408a2c4a17c7e3fc929bf672ec037008ebf5c5abc5c805bc","LICENSE":"27752522f6d229c9fa38ab123506bc04819dcf865244afc6588235dc99d239ab","README.md":"eee26e26f1b42a78766ec5f3f9e7373824340e3d95c690ec27de008799d8eb27","src/claims.rs":"2086f5f55bd89a48bddf8aa35ccc9818a4411e79903787cb7f473a620fdcc4e8","src/common.rs":"1fcf08b5f0a035559484f152b6d7f9be5c69976a6d9107ecf26e4b68719fc1e9","src/errors.rs":"8e2c5f5e85d726ac0e664d09c0b5117dd8e40b940d2f4b2fff5112f277129b81","src/footer.rs":"32d0a8db1f62c11ee78363c9b175215c8b2c33c761ab7832e3c10d12473a945d","src/keys.rs":"3e0f249a2de6909d35bdc88dbe1e0bd591e552a10f19b36d8f2cedd633da1671","src/lib.rs":"824d562ad99be64baed49b78a8c3dd21bb8b3c94f0ad9212db3ab8a9006856f8","src/pae.rs":"80d5269fb2f9ca311e4930b217a8b01074f864bacba2cc8f51cc3cc8c8becc2d","src/paserk.rs":"8fab1ac06a4bb5666e651fc3794f9a59ea76c6aa5c4f710a57a01d1fa381438a","src/serde.rs":"3359a60a1fd46ea9140ee7adcf6f92a48fbdda80e87a33f9144864878a71a7ee","src/token.rs":"2b2016664cd0e4e3164ab5dd4bc009c36fd9a750090dc78b407119f4cf33dc2d","src/version.rs":"d340261226d6592ac48f3648a8242dc61d7e7a8e7a59f4a4d87de2d87b74d05e","src/version2.rs":"87b84cb64e66ee83bd4ca0439faadd9bfefc47f34bf178e4d887cadb6ffacdf6","src/version3.rs":"f8b097c2edccc687a73430edeb636a1e1c4778f76fa629ad944e607c6692a432","src/version4.rs":"c28ebd71acc681ef7b16912d579bff768b38068a83e5912a0c0f63aeea3d5e99","test_vectors/PASERK/k2.lid.json":"c5f5b1bf3449ab9c58abf983270578027d03f41bce00cd8c49d4086745aeca7e","test_vectors/PASERK/k2.local.json":"335f3f1aa056f98ceb7ea691e26f3837ae33d566006d35530cfdc4940b676cdc","test_vectors/PASERK/k2.pid.json":"2b700fa931d3d6e9f0cb693d6d64bec0fb2a290f7059b78ea6eabff14aadadb8","test_vectors/PASERK/k2.public.json":"5fc4c039258046936a3b26dca2d8581a5831a7279186f6a629114ff2c70b1354","test_vectors/PASERK/k2.secret.json":"fda27580d0dc2931033bf9e3660b2d37cc3d6f1272f966dfdfb88e936cd7f660","test_vectors/PASERK/k2.sid.json":"aea692b0bfcc971eacc437869160b0988b21a5138c4109544acef0d6c8150df2","test_vectors/PASERK/k3.pid.json":"d257888dfe3aa5803bb71e3a2886bbf2761de9f7cff0737c553d8639eac0ff3b","test_vectors/PASERK/k3.public.json":"a5d1e05238fead0afa860b5037c973ad9e3a62ab26fb8675889393442d18cd35","test_vectors/PASERK/k3.secret.json":"d7c37094f0365c6afe6bba3ea28c164c21c54c769bf925ab2fac7c9ed5c1ae65","test_vectors/PASERK/k3.sid.json":"f77a2a8b97cf787579a82581b4be167d8d1906ab3c1e4ea16a299c2a8d2dc10a","test_vectors/PASERK/k4.lid.json":"893dc77e6b2a82a6e98ed683293a541fae50fd5447713ce89a2e9c7efd54529b","test_vectors/PASERK/k4.local.json":"71c76cafab9cbeb5223425105f08900b245048a9a2a7d573b9a3f1f3d4633ebc","test_vectors/PASERK/k4.pid.json":"b5735e8734e17afe2da884b7ce76aa79e2d34b6be27834c7f1d6b7c1304d911d","test_vectors/PASERK/k4.public.json":"f8d86e8b05baf2bd67fcf77f1451fe49fb6232ce1358032f8fa5070d8e3bcc55","test_vectors/PASERK/k4.secret.json":"87a2e6880df94c80f5a645f24c4c9100b12b678a236fb80c2232d62d4cbcc22c","test_vectors/PASERK/k4.sid.json":"ca500b86c33fad8145466379c4e0ba727d92803abd27fe97b7ea6886459792f0","test_vectors/v2.json":"b58b11047f26596acdbcad7cfd4e270bc3e917f86e2be85b22f0d6be06ae79d0","test_vectors/v3.json":"79cfd384762a6df3c6ce08ff04d9fb24f128943c2e38e3333f3e440a8546d8a4","test_vectors/v4.json":"0b72948b65d1f73f574c9ad2aa3481ec27bf8c632f5f6e1596cd41f5b9703387","test_vectors/wycheproof/ecdsa_secp384r1_sha384_test.json":"40f75fd0ae931c110cf5a4a4977e6cea40e4877f922289ac8685fa6c4b70c572","test_vectors/wycheproof/ecdsa_secp384r1_sha3_384_test.json":"5b00927809ac9809c9b58a51771a53d4ce06327f5269b6e08912244958a3ec06"},"package":"ed20c4c21d893414f42e0cbfebe8a8036b5ae9b0264611fb6504e395eda6ceec"}
\ No newline at end of file diff --git a/vendor/pasetors/CHANGELOG.md b/vendor/pasetors/CHANGELOG.md new file mode 100644 index 000000000..72aaa879a --- /dev/null +++ b/vendor/pasetors/CHANGELOG.md @@ -0,0 +1,130 @@ +### 0.6.5 + +__Date:__ December 14, 2022. + +__Changelog:__ +- `SymmetricKey`, `AsymmetricSecretKey` and `AsymmetricKeyPair` now implement `Clone`. + +### 0.6.4 + +__Date:__ November 17, 2022. + +__Changelog:__ +- `AsymmetricSecretKey` now re-computes the public key from the secret seed to check if they match. If they don't an error is returned. Because we use `ed25519-compact` crate for Ed25519, if an all-zero seed is used, the creation of `AsymmetricSecretKey` will panic. + +### 0.6.3 + +__Date:__ October 15, 2022. + +__Changelog:__ +- Add optional `serde` support for keys + PASERK ID, to be de/serialized from/to PASERK strings. Also introducing a new optional feature `serde` (see [#26](https://github.com/brycx/pasetors/issues/26), by [@SanchithHegde](https://github.com/SanchithHegde)) +- Clippy improvements to tests (see [#69](https://github.com/brycx/pasetors/pull/69), by [@SanchithHegde](https://github.com/SanchithHegde)) +- Update `ed25519-compact` to `2.0.2` (see [#72](https://github.com/brycx/pasetors/pull/72)) + +### 0.6.2 + +__Date:__ September 23, 2022. + +__Changelog:__ +- Fix `ed25519-compact` imports that broke build after the crate bumped to `1.0.13+` + +### 0.6.1 + +__Date:__ September 20, 2022. + +__Changelog:__ +- Bump MSRV to `1.59.0` +- `clippy` fixes +- Add `rust-version` field to `Cargo.toml` +- Update copyright year to 2022 + + +### 0.6.0 + +__Date:__ June 20, 2022. + +__Changelog:__ +- PASERK operations are now implemented for `AsymmetricSecretKey<V2>` and `AsymmetricSecretKey<V4>` instead of `AsymmetricKeyPair<V2>` and `AsymmetricKeyPair<V4>`, respectively +- All `sign()` operations with public tokens now take only the secret key +- `V2` and `V4` token's `AsymmetricSecretKey<>` are now defined to contain both the Ed25519 secret seed and the public key (see https://github.com/MystenLabs/ed25519-unsafe-libs) +- `TryFrom<AsymmetricSecretKey<>> for AsymmetricPublicKey<>` is now provided for `V2` and `V4` as well + + +### 0.5.0 + +__Date:__ June 4, 2022. + +__Changelog:__ +- Bump MSRV to `1.57.0` +- Implement `v3.public` tokens ([#40](https://github.com/brycx/pasetors/issues/40)) +- Introduce separate crate-features for each version and one for PASERK: `v2`, `v3`, `v4` and `paserk`. `std`, `v4` and `paserk` are enabled by default +- Add support for the PASERK [ID operation](https://github.com/paseto-standard/paserk/blob/master/operations/ID.md) ([#40](https://github.com/brycx/pasetors/issues/40)) +- Stricter permissions for GH Actions workflows ([#43](https://github.com/brycx/pasetors/pull/43)) +- Add `Generate` trait and implement this for all key-types, removing also `SymmetricKey::gen()` ([#45](https://github.com/brycx/pasetors/issues/45)) +- Switch from `ed25519-dalek` to `ed25519-compact` ([#48](https://github.com/brycx/pasetors/issues/48)) +- Add new types `token::UntrustedToken` and `token::TrustedToken` which are now used by `verify()`/`decrypt()` operations. +These allow extracting parts of tokens before and after verification ([#47](https://github.com/brycx/pasetors/issues/47)) +- Version structs previously available in `keys::` have been moved to a new `version::` module +- Add `Footer` type that makes it easier to create JSON-encoded footers ([#52](https://github.com/brycx/pasetors/pull/52)) +- PASERK deserialization of keys now takes `&str` instead of `String` ([#53](https://github.com/brycx/pasetors/issues/53)) +- Rename `Error::Base64Decoding` -> `Error::Base64` + +### 0.4.2 + +__Date:__ November 27, 2021. + +__Changelog:__ +- Update Orion to `0.17` ([#39](https://github.com/brycx/pasetors/pull/39)) +- Bump MSRV to `1.52` + +### 0.4.1 + +__Date:__ November 11, 2021. + +__Changelog:__ +- Enable `getrandom/js` feature and test `wasm32-unknown-unknown` in CI ([#37](https://github.com/brycx/pasetors/pull/37)) + +### 0.4.0 + +__Date:__ October 25, 2021. + +__Changelog:__ +- [Security fix]: Switched from `chrono` to `time` crate ([#30](https://github.com/brycx/pasetors/pull/30)) +- `Error` now implements `std::error::Error` ([#27](https://github.com/brycx/pasetors/pull/27)) (by [@not-my-profile](https://github.com/not-my-profile)) +- `Errors` enum has be renamed to `Error` and "error" postfixes have been trimmed from variants ([#33](https://github.com/brycx/pasetors/pull/33)) +- `SymmetricKey`, `AsymmetricPublicKey` and `AsymmetricSecretKey` have been made generic over their versions ([#31](https://github.com/brycx/pasetors/pull/31)) (by [@not-my-profile](https://github.com/not-my-profile)) +- Add support for `local`, `public` and `secret` PASERK types for keys ([#24](https://github.com/brycx/pasetors/pull/24)) + +### 0.3.0 + +__Date:__ September 22, 2021. + +__Changelog:__ +- Implement version 4 of the PASETO specification +- New `SymmetricKey`, `AsymmetricPublicKey` and `AsymmetricSecretKey` now used throughout the API of both version 2 and 4 ([#14](https://github.com/brycx/pasetors/issues/14)) +- Use new test vectors from https://github.com/paseto-standard/test-vectors +- Empty payloads are no longer allowed (see https://github.com/paseto-standard/paseto-spec/issues/17) and `Errors::EmptyPayloadError` has been added +- New `Claims` type to easily define claims for tokens and `ClaimsValidationRules` to validate such claims. +- New `std` feature which is enabled by default. This means, that to be `no_std`, `pasetors` has to be declared without default features. +- New `local`/`public` API which uses the latest version, and automatically handles validation of `Claims`. + +### 0.2.0 + +__Date:__ June 2, 2021. + +__Changelog:__ +- Remove `Csprng` trait from public API and use `getrandom` instead +- Update Orion to `0.16` + + +### 0.1.1 + +__Date:__ March 21, 2021. + +__Changelog:__ +- Switch from `base64` to `ct-codecs` to provide constant-time Base64 encoding/decoding + + +### 0.1.0 - Initial release + +__Date:__ October 12, 2020. diff --git a/vendor/pasetors/Cargo.toml b/vendor/pasetors/Cargo.toml new file mode 100644 index 000000000..bb0215299 --- /dev/null +++ b/vendor/pasetors/Cargo.toml @@ -0,0 +1,137 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies. +# +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. + +[package] +edition = "2018" +rust-version = "1.59.0" +name = "pasetors" +version = "0.6.5" +authors = ["brycx <brycx@protonmail.com>"] +description = "PASETO: Platform-Agnostic Security Tokens (in Rust)" +documentation = "https://docs.rs/pasetors" +readme = "README.md" +keywords = [ + "cryptography", + "crypto", + "token", + "paseto", + "authentication", +] +categories = [ + "cryptography", + "authentication", +] +license = "MIT" +repository = "https://github.com/brycx/pasetors" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = [ + "--cfg", + "docsrs", +] + +[dependencies.ct-codecs] +version = "1.1.1" +default-features = false + +[dependencies.ed25519-compact] +version = "2.0.2" +features = ["random"] +optional = true +default-features = false + +[dependencies.getrandom] +version = "0.2" +features = ["js"] + +[dependencies.orion] +version = "0.17.0" +optional = true +default-features = false + +[dependencies.p384] +version = "0.11.0" +optional = true + +[dependencies.rand_core] +version = "0.6.3" +features = ["getrandom"] +optional = true +default-features = false + +[dependencies.regex] +version = "1.5.5" +optional = true + +[dependencies.serde] +version = "1.0.145" +optional = true + +[dependencies.serde_json] +version = "1.0.41" +optional = true + +[dependencies.sha2] +version = "0.10.2" +optional = true + +[dependencies.subtle] +version = "2.4.1" +default-features = false + +[dependencies.time] +version = "0.3" +features = [ + "parsing", + "formatting", +] +optional = true + +[dependencies.zeroize] +version = "1.4.1" +default-features = false + +[dev-dependencies.hex] +version = "0.4.2" + +[dev-dependencies.serde] +version = "1.0" +features = ["derive"] + +[dev-dependencies.serde_json] +version = "1.0.41" + +[features] +default = [ + "std", + "v4", + "paserk", +] +paserk = ["orion"] +std = [ + "serde_json", + "time", + "regex", +] +v2 = [ + "orion", + "ed25519-compact", +] +v3 = [ + "rand_core", + "p384", + "sha2", +] +v4 = [ + "orion", + "ed25519-compact", +] diff --git a/vendor/pasetors/LICENSE b/vendor/pasetors/LICENSE new file mode 100644 index 000000000..554262182 --- /dev/null +++ b/vendor/pasetors/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020-2022 brycx + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/pasetors/README.md b/vendor/pasetors/README.md new file mode 100644 index 000000000..2b0069246 --- /dev/null +++ b/vendor/pasetors/README.md @@ -0,0 +1,37 @@ +![Tests](https://github.com/brycx/pasetors/workflows/Tests/badge.svg) [![Documentation](https://docs.rs/pasetors/badge.svg)](https://docs.rs/pasetors/) [![Crates.io](https://img.shields.io/crates/v/pasetors.svg)](https://crates.io/crates/pasetors) [![Safety Dance](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/) [![MSRV](https://img.shields.io/badge/MSRV-1.59.0-informational.svg)](https://img.shields.io/badge/MSRV-1.59.0-informational) [![codecov](https://codecov.io/gh/brycx/pasetors/branch/master/graph/badge.svg)](https://codecov.io/gh/brycx/pasetors) + +### PASETOrs + +> "Paseto is everything you love about JOSE (JWT, JWE, JWS) without any of the many design deficits that plague the JOSE standards." + +PASETO (Platform-Agnostic SEcurity TOkens) are secure stateless tokens. Read more [here](https://github.com/paragonie/paseto) and at [PASETO.io](https://paseto.io/). + +This library includes: +- [x] Pure-Rust implementation of the Version 4, 3† and 2 protocol +- [x] PASERK support (limited amount of PASERK-types) with optional `serde` support as well +- [x] `#![no_std]` (with default-features disabled) and `#![forbid(unsafe_code)]` +- [x] WASM-friendly (`wasm32-unknown-unknown` using `#![no_std]`) +- [x] Fuzzing targets +- [x] Test vectors +- [x] Usage examples + +† _Only the public variant (`v3.public`) of version 3 is currently supported._ + +### Usage + +[See usage examples here](https://docs.rs/pasetors/). + +### Security + +This library has **not undergone any third-party security audit**. Usage is at **own risk**. + +### Minimum Supported Rust Version +Rust 1.59.0 or later is supported however, the majority of testing happens with latest stable Rust. + +MSRV may be changed at any point and will not be considered a SemVer breaking change. + +### Changelog +Please refer to the [CHANGELOG.md](https://github.com/brycx/pasetors/blob/master/CHANGELOG.md) list. + +### License +pasetors is licensed under the MIT license. See the `LICENSE` file for more information.
\ No newline at end of file diff --git a/vendor/pasetors/src/claims.rs b/vendor/pasetors/src/claims.rs new file mode 100644 index 000000000..b6d97580a --- /dev/null +++ b/vendor/pasetors/src/claims.rs @@ -0,0 +1,734 @@ +#![cfg_attr(docsrs, doc(cfg(feature = "std")))] + +use crate::errors::Error; +use serde_json::Value; +use std::collections::HashMap; +use time::format_description::well_known::Rfc3339; +use time::{Duration, OffsetDateTime}; + +#[derive(Debug, PartialEq, Eq, Clone)] +/// A collection of claims that are passed as payload for a PASETO token. +pub struct Claims { + list_of: HashMap<String, Value>, +} + +impl Claims { + /// Keys for registered claims, that are reserved for usage by PASETO in top-level. + pub const REGISTERED_CLAIMS: [&'static str; 7] = + ["iss", "sub", "aud", "exp", "nbf", "iat", "jti"]; + + /// Create a new `Claims` instance, setting: + /// - `iat`, `nbf` to current UTC time + /// - `exp` to one hour + /// + /// Errors: + /// - If adding current time with one hour would overflow + pub fn new() -> Result<Self, Error> { + let iat = OffsetDateTime::now_utc(); + let nbf = iat; + let mut exp = iat; + exp += Duration::hours(1); + + let mut claims = Self { + list_of: HashMap::new(), + }; + + claims.issued_at(&iat.format(&Rfc3339).map_err(|_| Error::InvalidClaim)?)?; + claims.not_before(&nbf.format(&Rfc3339).map_err(|_| Error::InvalidClaim)?)?; + claims.expiration(&exp.format(&Rfc3339).map_err(|_| Error::InvalidClaim)?)?; + + Ok(claims) + } + + /// Removes the `exp` claim, indicating a token that never expires. + pub fn non_expiring(&mut self) { + if self.contains_claim("exp") { + self.list_of.remove_entry("exp").unwrap(); + } + } + + /// Add additional claims. If `claim` already exists, it is replaced with the new. + /// + /// Errors: + /// - `claim` is a reserved claim (see [`Self::REGISTERED_CLAIMS`]) + pub fn add_additional(&mut self, claim: &str, value: impl Into<Value>) -> Result<(), Error> { + if !Self::REGISTERED_CLAIMS.contains(&claim) { + self.list_of.insert(claim.into(), value.into()); + Ok(()) + } else { + Err(Error::InvalidClaim) + } + } + + /// Checks whether a specific claim has been added to the list. + /// + /// E.g `contains_claim("iss") == true` if `iss` has been added before. + pub fn contains_claim(&self, claim: &str) -> bool { + self.list_of.contains_key(claim) + } + + /// Return Some(claim value) if claims list contains the `claim`. + /// None otherwise. + pub fn get_claim(&self, claim: &str) -> Option<&Value> { + self.list_of.get(claim) + } + + /// Set the `iss` claim. If it already exists, replace it with the new. + /// + /// Errors: + /// - `iss` is empty + pub fn issuer(&mut self, iss: &str) -> Result<(), Error> { + if !iss.is_empty() { + self.list_of.insert("iss".into(), iss.into()); + Ok(()) + } else { + Err(Error::InvalidClaim) + } + } + + /// Set the `sub` claim. If it already exists, replace it with the new. + /// + /// Errors: + /// - `sub` is empty + pub fn subject(&mut self, sub: &str) -> Result<(), Error> { + if !sub.is_empty() { + self.list_of.insert("sub".into(), sub.into()); + Ok(()) + } else { + Err(Error::InvalidClaim) + } + } + + /// Set the `aud` claim. If it already exists, replace it with the new. + /// + /// Errors: + /// - `aud` is empty + pub fn audience(&mut self, aud: &str) -> Result<(), Error> { + if !aud.is_empty() { + self.list_of.insert("aud".into(), aud.into()); + Ok(()) + } else { + Err(Error::InvalidClaim) + } + } + + /// Set the `exp` claim. If it already exists, replace it with the new. + /// + /// Errors: + /// - `exp` is empty + /// - `exp` cannot be parsed as a ISO 8601 compliant DateTime string. + pub fn expiration(&mut self, exp: &str) -> Result<(), Error> { + if let Ok(_exp_str) = OffsetDateTime::parse(exp, &Rfc3339) { + self.list_of.insert("exp".into(), exp.into()); + Ok(()) + } else { + Err(Error::InvalidClaim) + } + } + + /// Set the `nbf` claim. If it already exists, replace it with the new. + /// + /// Errors: + /// - `nbf` is empty + /// - `nbf` cannot be parsed as a ISO 8601 compliant DateTime string. + pub fn not_before(&mut self, nbf: &str) -> Result<(), Error> { + if let Ok(_nbf_str) = OffsetDateTime::parse(nbf, &Rfc3339) { + self.list_of.insert("nbf".into(), nbf.into()); + Ok(()) + } else { + Err(Error::InvalidClaim) + } + } + + /// Set the `iat` claim. If it already exists, replace it with the new. + /// + /// Errors: + /// - `iat` is empty + /// - `iat` cannot be parsed as a ISO 8601 compliant DateTime string. + pub fn issued_at(&mut self, iat: &str) -> Result<(), Error> { + if let Ok(_iat_str) = OffsetDateTime::parse(iat, &Rfc3339) { + self.list_of.insert("iat".into(), iat.into()); + Ok(()) + } else { + Err(Error::InvalidClaim) + } + } + + /// Set the `jti` claim. If it already exists, replace it with the new. + /// + /// Errors: + /// - `jti` is empty + pub fn token_identifier(&mut self, jti: &str) -> Result<(), Error> { + if !jti.is_empty() { + self.list_of.insert("jti".into(), jti.into()); + Ok(()) + } else { + Err(Error::InvalidClaim) + } + } + + /// Attempt to create `Claims` from a sequence of bytes. + /// + /// Errors: + /// - `bytes` contains non-UTF-8 sequences + /// - `bytes` does not decode as valid JSON + /// - `bytes` top-most JSON object does not decode to a map + /// - if any registered claims exist and they are not a `String` + /// - if `exp`, `nbf` or `iat` exist and they cannot be parsed as `DateTime` + pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error> { + let input = bytes.to_vec(); + + Self::from_string(&String::from_utf8(input).map_err(|_| Error::ClaimInvalidUtf8)?) + } + + /// Attempt to create `Claims` from a string. + /// + /// Errors: + /// - `string` does not decode as valid JSON + /// - `string` top-most JSON object does not decode to a map + /// - if any registered claims exist and they are not a `String` + /// - if `exp`, `nbf` or `iat` exist and they cannot be parsed as `DateTime` + pub fn from_string(string: &str) -> Result<Self, Error> { + let list_of: HashMap<String, Value> = + serde_json::from_str(string).map_err(|_| Error::ClaimInvalidJson)?; + + // Validate any possible registered claims for their type + for registered_claim in Self::REGISTERED_CLAIMS { + if let Some(claim) = list_of.get(registered_claim) { + if let Some(claim_value) = claim.as_str() { + if registered_claim == "exp" + || registered_claim == "nbf" + || registered_claim == "iat" + { + OffsetDateTime::parse(claim_value, &Rfc3339) + .map_err(|_| Error::InvalidClaim)?; + } + } else { + return Err(Error::InvalidClaim); + } + } + } + + Ok(Self { list_of }) + } + + /// Return the JSON serialized representation of `Self`. + /// + /// Errors: + /// - `self` cannot be serialized as JSON + pub fn to_string(&self) -> Result<String, Error> { + match serde_json::to_string(&self.list_of) { + Ok(ret) => Ok(ret), + Err(_) => Err(Error::ClaimInvalidJson), + } + } +} + +#[derive(Debug, PartialEq, Eq, Clone)] +/// The validation rules that are used to validate a set of [`Claims`]. +pub struct ClaimsValidationRules { + validate_currently_valid: bool, + allow_non_expiring: bool, + validate_issuer: Option<String>, + validate_subject: Option<String>, + validate_audience: Option<String>, + validate_token_identifier: Option<String>, +} + +impl Default for ClaimsValidationRules { + fn default() -> Self { + Self::new() + } +} + +impl ClaimsValidationRules { + /// Create a new `ClaimsValidationRules` instance, setting: + /// - validation of `iat`, `nbf`, `exp` true + pub fn new() -> Self { + Self { + validate_currently_valid: true, + allow_non_expiring: false, + validate_issuer: None, + validate_subject: None, + validate_audience: None, + validate_token_identifier: None, + } + } + + /// Explicitly allow non-expiring tokens (i.e. the `exp` claim is missing). + pub fn allow_non_expiring(&mut self) { + self.allow_non_expiring = true; + } + + /// Set the `valid_issuer` the claims should be validated against. + pub fn validate_issuer_with(&mut self, valid_issuer: &str) { + self.validate_issuer = Some(valid_issuer.to_string()); + } + + /// Set the `valid_subject` the claims should be validated against. + pub fn validate_subject_with(&mut self, valid_subject: &str) { + self.validate_subject = Some(valid_subject.to_string()); + } + + /// Set the `valid_audience` the claims should be validated against. + pub fn validate_audience_with(&mut self, valid_audience: &str) { + self.validate_audience = Some(valid_audience.to_string()); + } + + /// Set the `valid_token_identifier` the claims should be validated against. + pub fn validate_token_identifier_with(&mut self, valid_token_identifier: &str) { + self.validate_token_identifier = Some(valid_token_identifier.to_string()); + } + + /// Validate the set of registered `claims` against the currently defined validation rules. + /// + /// If `claims` has defined the `exp` claim, this is validated regardless of whether the rules + /// have allowed for non-expiring. Non-expiring means that there should be no `exp` in `claims`. + /// + /// Errors: + /// - Token is expired + /// - Token is not yet valid + /// - Token was issued in the future + /// - Token has no `exp` claim but the validation rules do not allow non-expiring tokens + /// - The claims values cannot be converted to `str` + /// - `iat`, `nbf` and `exp` fail `str -> DateTime` conversion + /// - Claim `iss`, `sub`, `aud`, `jti` does not match the expected + /// - `claims` has no `nbf` or `iat` + /// - a claim was registered for validation in the rules but is missing from the actual `claims` + /// + /// NOTE: This __does not__ validate any non-registered claims (see [`Claims::REGISTERED_CLAIMS`]). They must be validated + /// separately. + pub fn validate_claims(&self, claims: &Claims) -> Result<(), Error> { + if self.validate_currently_valid { + match (claims.list_of.get("iat"), claims.list_of.get("nbf")) { + (Some(iat), Some(nbf)) => match (iat.as_str(), nbf.as_str()) { + (Some(iat), Some(nbf)) => { + let iat = OffsetDateTime::parse(iat, &Rfc3339) + .map_err(|_| Error::ClaimValidation)?; + let nbf = OffsetDateTime::parse(nbf, &Rfc3339) + .map_err(|_| Error::ClaimValidation)?; + let current_time = OffsetDateTime::now_utc(); + + if current_time < nbf || current_time < iat { + return Err(Error::ClaimValidation); + } + } + _ => return Err(Error::ClaimValidation), + }, + _ => return Err(Error::ClaimValidation), + } + } + + if let Some(exp) = claims.list_of.get("exp") { + if let Some(exp) = exp.as_str() { + let exp = + OffsetDateTime::parse(exp, &Rfc3339).map_err(|_| Error::ClaimValidation)?; + let current_time = OffsetDateTime::now_utc(); + + if current_time > exp { + return Err(Error::ClaimValidation); + } + } else { + return Err(Error::ClaimValidation); + } + } else if !self.allow_non_expiring { + // We didn't explicitly allow non-expiring tokens so we expect `exp` claim. + return Err(Error::ClaimValidation); + } + + if let Some(expected_issuer) = &self.validate_issuer { + if let Some(actual_issuer) = claims.list_of.get("iss") { + if expected_issuer != actual_issuer { + return Err(Error::ClaimValidation); + } + } else { + return Err(Error::ClaimValidation); + } + } + + if let Some(expected_subject) = &self.validate_subject { + if let Some(actual_subject) = claims.list_of.get("sub") { + if expected_subject != actual_subject { + return Err(Error::ClaimValidation); + } + } else { + return Err(Error::ClaimValidation); + } + } + + if let Some(expected_audience) = &self.validate_audience { + if let Some(actual_audience) = claims.list_of.get("aud") { + if expected_audience != actual_audience { + return Err(Error::ClaimValidation); + } + } else { + return Err(Error::ClaimValidation); + } + } + + if let Some(expected_token_identifier) = &self.validate_token_identifier { + if let Some(actual_token_identifier) = claims.list_of.get("jti") { + if expected_token_identifier != actual_token_identifier { + return Err(Error::ClaimValidation); + } + } else { + return Err(Error::ClaimValidation); + } + } + + Ok(()) + } +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_empty_claim_value() { + let mut claims = Claims::new().unwrap(); + + assert!(claims.issuer("").is_err()); + assert!(claims.subject("").is_err()); + assert!(claims.audience("").is_err()); + assert!(claims.expiration("").is_err()); + assert!(claims.not_before("").is_err()); + assert!(claims.issued_at("").is_err()); + assert!(claims.token_identifier("").is_err()); + } + + #[test] + fn test_error_on_arbitrary_registered() { + let mut claims = Claims::new().unwrap(); + + assert!(claims.add_additional("iss", "test").is_err()); + assert!(claims.add_additional("sub", "test").is_err()); + assert!(claims.add_additional("aud", "test").is_err()); + assert!(claims + .add_additional("exp", "2014-11-28T21:00:09+09:00") + .is_err()); + assert!(claims + .add_additional("nbf", "2014-11-28T21:00:09+09:00") + .is_err()); + assert!(claims + .add_additional("iat", "2014-11-28T21:00:09+09:00") + .is_err()); + assert!(claims.add_additional("jti", "test").is_err()); + + assert!(claims.add_additional("not_reserved", "test").is_ok()); + } + + #[test] + fn test_failed_datetime_parsing() { + let mut claims = Claims::new().unwrap(); + + assert!(claims + .expiration("this is not a ISO 8601 DateTime string") + .is_err()); + assert!(claims + .not_before("this is not a ISO 8601 DateTime string") + .is_err()); + assert!(claims + .issued_at("this is not a ISO 8601 DateTime string") + .is_err()); + + claims.list_of.insert( + "iat".to_string(), + "this is not a ISO 8601 DateTime string".into(), + ); + claims.list_of.insert( + "nbf".to_string(), + "this is not a ISO 8601 DateTime string".into(), + ); + + let validation_rules = ClaimsValidationRules::default(); + assert!(validation_rules.validate_claims(&claims).is_err()); + } + + #[test] + fn test_contains_claim() { + let mut claims = Claims::new().unwrap(); + + // Default claims + assert!(claims.contains_claim("iat")); + assert!(claims.contains_claim("nbf")); + assert!(claims.contains_claim("exp")); + + assert!(!claims.contains_claim("iss")); + claims.issuer("testIssuer").unwrap(); + assert!(claims.contains_claim("iss")); + + assert!(!claims.contains_claim("aud")); + claims.audience("testAudience").unwrap(); + assert!(claims.contains_claim("aud")); + } + + #[test] + fn test_basic_claims_validation() { + // Set all claims plus a custom one + let mut claims = Claims::new().unwrap(); + claims.issuer("testIssuer").unwrap(); + claims.audience("testAudience").unwrap(); + claims.subject("testSubject").unwrap(); + claims.token_identifier("testIdentifier").unwrap(); + claims.add_additional("testClaim", "testValue").unwrap(); + + let mut claims_validation = ClaimsValidationRules::new(); + claims_validation.validate_issuer_with("testIssuer"); + claims_validation.validate_audience_with("testAudience"); + claims_validation.validate_subject_with("testSubject"); + claims_validation.validate_token_identifier_with("testIdentifier"); + + assert!(&claims_validation.validate_claims(&claims).is_ok()); + + // Mismatch between Claims `iss` and ClaimValidationRules `iss` + claims_validation.validate_issuer_with("testIssuerFalse"); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims_validation.validate_issuer_with("testIssuer"); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + claims + .list_of + .insert("iss".to_string(), "testIssuerFalse".into()) + .unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims + .list_of + .insert("iss".to_string(), "testIssuer".into()) + .unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + claims.list_of.remove_entry("iss").unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims + .list_of + .insert("iss".to_string(), "testIssuer".into()); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + + // Mismatch between Claims `aud` and ClaimValidationRules `aud` + claims_validation.validate_audience_with("testAudienceFalse"); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims_validation.validate_audience_with("testAudience"); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + claims + .list_of + .insert("aud".to_string(), "testAudienceFalse".into()) + .unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims + .list_of + .insert("aud".to_string(), "testAudience".into()) + .unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + claims.list_of.remove_entry("aud").unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims + .list_of + .insert("aud".to_string(), "testAudience".into()); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + + // Mismatch between Claims `sub` and ClaimValidationRules `sub` + claims_validation.validate_subject_with("testSubjectFalse"); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims_validation.validate_subject_with("testSubject"); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + claims + .list_of + .insert("sub".to_string(), "testSubjectFalse".into()) + .unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims + .list_of + .insert("sub".to_string(), "testSubject".into()) + .unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + claims.list_of.remove_entry("sub").unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims + .list_of + .insert("sub".to_string(), "testSubject".into()); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + + // Mismatch between Claims `jti` and ClaimValidationRules `jti` + claims_validation.validate_token_identifier_with("testIdentifierFalse"); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims_validation.validate_token_identifier_with("testIdentifier"); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + claims + .list_of + .insert("jti".to_string(), "testIdentifierFalse".into()) + .unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims + .list_of + .insert("jti".to_string(), "testIdentifier".into()) + .unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + claims.list_of.remove_entry("jti").unwrap(); + assert!(&claims_validation.validate_claims(&claims).is_err()); + claims + .list_of + .insert("jti".to_string(), "testIdentifier".into()); + assert!(&claims_validation.validate_claims(&claims).is_ok()); + } + + #[test] + fn test_invalid_token_at_time() { + let claims = Claims::new().unwrap(); + let claims_validation = ClaimsValidationRules::new(); + + assert!(claims_validation.validate_claims(&claims).is_ok()); + + // Outdated + let mut outdated_claims = claims.clone(); + outdated_claims + .list_of + .insert("iat".to_string(), "2019-01-01T00:00:00+00:00".into()) + .unwrap(); + assert!(claims_validation.validate_claims(&outdated_claims).is_ok()); + outdated_claims + .list_of + .insert("nbf".to_string(), "2019-01-01T00:00:00+00:00".into()) + .unwrap(); + assert!(claims_validation.validate_claims(&outdated_claims).is_ok()); + outdated_claims + .list_of + .insert("exp".to_string(), "2019-01-01T00:00:00+00:00".into()) + .unwrap(); + // Expired + assert_eq!( + claims_validation + .validate_claims(&outdated_claims) + .unwrap_err(), + Error::ClaimValidation + ); + outdated_claims.non_expiring(); + let mut claims_validation_allow_expiry = claims_validation.clone(); + // Rules not yet defined to allow non-expiring + assert!(claims_validation_allow_expiry + .validate_claims(&outdated_claims) + .is_err()); + claims_validation_allow_expiry.allow_non_expiring(); + // Test if claim has `exp` but rules dictate allowing non-expiring (which is ignored + // as long as `exp` is present in the claims) so it's still expired + outdated_claims + .expiration("2019-01-01T00:00:00+00:00") + .unwrap(); + assert!(claims_validation_allow_expiry + .validate_claims(&outdated_claims) + .is_err()); + // Missing `exp` and allow in rules match + outdated_claims.non_expiring(); + assert!(claims_validation_allow_expiry + .validate_claims(&outdated_claims) + .is_ok()); + + // In-future + let mut future_claims = claims.clone(); + let old_iat = future_claims + .list_of + .insert("iat".to_string(), "2028-01-01T00:00:00+00:00".into()) + .unwrap(); + // Issued in future + assert_eq!( + claims_validation + .validate_claims(&future_claims) + .unwrap_err(), + Error::ClaimValidation + ); + future_claims.issued_at(old_iat.as_str().unwrap()).unwrap(); + assert!(claims_validation.validate_claims(&future_claims).is_ok()); + // Not yet valid + let old_nbf = future_claims + .list_of + .insert("nbf".to_string(), "2028-01-01T00:00:00+00:00".into()) + .unwrap(); + assert_eq!( + claims_validation + .validate_claims(&future_claims) + .unwrap_err(), + Error::ClaimValidation + ); + future_claims.not_before(old_nbf.as_str().unwrap()).unwrap(); + assert!(claims_validation.validate_claims(&future_claims).is_ok()); + + // We expect `iat`, `exp` and `nbf` if we validate time + let mut incomplete_claims = claims.clone(); + incomplete_claims.list_of.remove_entry("iat").unwrap(); + assert_eq!( + claims_validation + .validate_claims(&incomplete_claims) + .unwrap_err(), + Error::ClaimValidation + ); + + let mut incomplete_claims = claims.clone(); + incomplete_claims.list_of.remove_entry("exp").unwrap(); + assert_eq!( + claims_validation + .validate_claims(&incomplete_claims) + .unwrap_err(), + Error::ClaimValidation + ); + + let mut incomplete_claims = claims; + incomplete_claims.list_of.remove_entry("nbf").unwrap(); + assert_eq!( + claims_validation + .validate_claims(&incomplete_claims) + .unwrap_err(), + Error::ClaimValidation + ); + } + + #[test] + fn test_add_non_string_additional_claims() { + // Set all claims plus a custom one + let mut claims = Claims::new().unwrap(); + + let add_claims_one = vec!["a", "b", "b"]; + let add_claims_two = 32; + let add_claims_three = true; + + claims.add_additional("one", add_claims_one).unwrap(); + claims.add_additional("two", add_claims_two).unwrap(); + claims.add_additional("three", add_claims_three).unwrap(); + + let as_string = claims.to_string().unwrap(); + let from_converted = Claims::from_string(&as_string).unwrap(); + assert_eq!(from_converted, claims); + + assert!(claims.contains_claim("one")); + assert!(claims.contains_claim("two")); + assert!(claims.contains_claim("three")); + } + + #[test] + fn test_token_no_expiration() { + let mut claims = Claims::new().unwrap(); + let mut claims_validation = ClaimsValidationRules::new(); + + claims.non_expiring(); + // Claims validation is not explicitly set to allow non-expiring, so we get error here + // because claims is missing exp + assert!(claims_validation.validate_claims(&claims).is_err()); + claims_validation.allow_non_expiring(); + assert!(claims_validation.validate_claims(&claims).is_ok()); + } + + #[test] + fn test_token_missing_iat_nbf_exp() { + let claims_validation = ClaimsValidationRules::new(); + + // Default validation rules validate these times but error if they're missing + let mut claims = Claims::new().unwrap(); + claims.list_of.remove("iat"); + assert!(claims_validation.validate_claims(&claims).is_err()); + + let mut claims = Claims::new().unwrap(); + claims.list_of.remove("nbf"); + assert!(claims_validation.validate_claims(&claims).is_err()); + + let mut claims = Claims::new().unwrap(); + claims.list_of.remove("exp"); + assert!(claims_validation.validate_claims(&claims).is_err()); + } +} diff --git a/vendor/pasetors/src/common.rs b/vendor/pasetors/src/common.rs new file mode 100644 index 000000000..b95583f62 --- /dev/null +++ b/vendor/pasetors/src/common.rs @@ -0,0 +1,97 @@ +use crate::errors::Error; +use crate::token::private::Purpose; +use crate::token::UntrustedToken; +use crate::version::private::Version; +use alloc::string::String; +use alloc::vec::Vec; +use ct_codecs::{Base64UrlSafeNoPadding, Decoder, Encoder}; +use subtle::ConstantTimeEq; + +/// Encode bytes with Base64 URL-safe and no padding. +pub(crate) fn encode_b64<T: AsRef<[u8]>>(bytes: T) -> Result<String, Error> { + let inlen = bytes.as_ref().len(); + let mut buf = vec![0u8; Base64UrlSafeNoPadding::encoded_len(inlen)?]; + + let ret: String = Base64UrlSafeNoPadding::encode_to_str(&mut buf, bytes)?.into(); + + Ok(ret) +} + +/// Decode string with Base64 URL-safe and no padding. +pub(crate) fn decode_b64<T: AsRef<[u8]>>(encoded: T) -> Result<Vec<u8>, Error> { + let inlen = encoded.as_ref().len(); + // We can use encoded len here, even if it returns more than needed, + // because ct-codecs allows this. + let mut buf = vec![0u8; Base64UrlSafeNoPadding::encoded_len(inlen)?]; + + let ret: Vec<u8> = Base64UrlSafeNoPadding::decode(&mut buf, encoded, None)?.into(); + + Ok(ret) +} + +/// If a footer is present, this is validated against the supplied. +pub(crate) fn validate_footer_untrusted_token<T: Purpose<V>, V: Version>( + token: &UntrustedToken<T, V>, + footer: Option<&[u8]>, +) -> Result<(), Error> { + // A known footer was supplied for comparison. + if let Some(known_footer) = footer { + if token.untrusted_footer().is_empty() { + // If one was supplied, one must exist in the untrusted. + return Err(Error::TokenValidation); + } + + if !bool::from(known_footer.ct_eq(token.untrusted_footer())) { + return Err(Error::TokenValidation); + } + } + + Ok(()) +} + +#[cfg(test)] +pub(crate) mod tests { + use alloc::string::String; + use alloc::vec::Vec; + use serde::{Deserialize, Serialize}; + use serde_json::Value; + + #[allow(non_snake_case)] + #[derive(Serialize, Deserialize, Debug)] + pub(crate) struct TestFile { + pub(crate) name: String, + pub(crate) tests: Vec<PasetoTest>, + } + + #[allow(non_snake_case)] + #[derive(Serialize, Deserialize, Debug)] + pub(crate) struct PasetoTest { + pub(crate) name: String, + #[serde(rename(deserialize = "expect-fail"))] + pub(crate) expect_fail: bool, + pub(crate) key: Option<String>, + pub(crate) nonce: Option<String>, + #[serde(rename(deserialize = "public-key"))] + pub(crate) public_key: Option<String>, + #[serde(rename(deserialize = "secret-key"))] + pub(crate) secret_key: Option<String>, + #[serde(rename(deserialize = "secret-key-seed"))] + pub(crate) secret_key_seed: Option<String>, + #[serde(rename(deserialize = "public-key-pem"))] + pub(crate) public_key_pem: Option<String>, + #[serde(rename(deserialize = "secret-key-pem"))] + pub(crate) secret_key_pem: Option<String>, + pub(crate) token: String, + pub(crate) payload: Option<Value>, + pub(crate) footer: String, + #[serde(rename(deserialize = "implicit-assertion"))] + pub(crate) implicit_assertion: String, + } + + #[allow(non_snake_case)] + #[derive(Serialize, Deserialize, Debug)] + pub(crate) struct Payload { + pub(crate) data: String, + pub(crate) exp: String, + } +} diff --git a/vendor/pasetors/src/errors.rs b/vendor/pasetors/src/errors.rs new file mode 100644 index 000000000..f970ff334 --- /dev/null +++ b/vendor/pasetors/src/errors.rs @@ -0,0 +1,76 @@ +#[derive(Debug, PartialEq, Eq)] +/// Errors for token operations. +pub enum Error { + /// Error for a token with an invalid format. + TokenFormat, + /// Error for a failed Base64 (URL-safe without padding) encoding/decoding. + Base64, + /// Error for a failed token validation. + TokenValidation, + /// Error for an invalid key. + Key, + /// Error for a failed encryption operation. + Encryption, + /// Error for a failed attempt to generate bytes using a CSPRNG. + Csprng, + /// Error for a conversion that would be lossy. + LossyConversion, + /// Error for attempting to create a token with an empty payload. + EmptyPayload, + /// Error for attempting to create an invalid claim. + InvalidClaim, + /// Claim validation error. See [`crate::claims::ClaimsValidationRules::validate_claims`]. + ClaimValidation, + /// Error for attempting to parse a Claim but found invalid UTF-8 sequence. + ClaimInvalidUtf8, + /// Error for attempting to parse a Claim but found invalid JSON sequence. + ClaimInvalidJson, + /// Error during (de)serialization of PASERK types. + PaserkParsing, + /// Error during signing of a message. + Signing, + /// Error during conversion between uncompressed<->compressed public keys. + PublicKeyConversion, + /// Error during key generation. + KeyGeneration, + /// The payload was not valid UTF-8. + PayloadInvalidUtf8, + /// Error during parsing of a `Footer`. + FooterParsing, +} + +#[cfg(feature = "std")] +impl std::error::Error for Error {} + +#[cfg(feature = "std")] +impl std::fmt::Display for Error { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_fmt(format_args!("{:?}", self)) + } +} + +impl From<ct_codecs::Error> for Error { + fn from(_: ct_codecs::Error) -> Self { + Error::Base64 + } +} + +impl From<getrandom::Error> for Error { + fn from(_: getrandom::Error) -> Self { + Error::Csprng + } +} + +impl From<core::num::TryFromIntError> for Error { + fn from(_: core::num::TryFromIntError) -> Self { + Error::LossyConversion + } +} + +#[test] +fn test_error_from_impls() { + let _ = format!("{:?}", Error::TokenFormat); + let _ = format!("{}", Error::TokenFormat); + assert_eq!(Error::from(ct_codecs::Error::InvalidInput), Error::Base64); + assert_eq!(Error::from(getrandom::Error::FAILED_RDRAND), Error::Csprng); +} diff --git a/vendor/pasetors/src/footer.rs b/vendor/pasetors/src/footer.rs new file mode 100644 index 000000000..cff1998df --- /dev/null +++ b/vendor/pasetors/src/footer.rs @@ -0,0 +1,396 @@ +#![cfg_attr(docsrs, doc(cfg(feature = "std")))] + +use crate::errors::Error; +#[cfg(feature = "paserk")] +use crate::paserk::{FormatAsPaserk, Id}; +use regex::Regex; +use serde_json::Value; +use std::collections::HashMap; + +#[derive(Debug, PartialEq, Eq, Clone)] +/// A footer with optional claims that are JSON-encoded. +pub struct Footer { + list_of: HashMap<String, Value>, + max_keys: usize, + max_len: usize, +} + +impl Default for Footer { + fn default() -> Self { + Self::new() + } +} + +impl Footer { + /// Keys for registered claims in the footer, that are reserved for usage by PASETO in top-level. + pub const REGISTERED_CLAIMS: [&'static str; 2] = ["kid", "wpk"]; + + /// All PASERK types that are (implemented in this library) unsafe in the footer. + pub const DISALLOWED_FOOTER: [&'static str; 8] = [ + "k2.local.", + "k4.local.", + "k2.secret.", + "k3.secret.", + "k4.secret.", + "k2.public.", + "k3.public.", + "k4.public.", + ]; + + /// See [PASETO docs] for the reason behind this limit. + /// + /// Maximum number of named keys within an object. + /// + /// [PASETO docs]: https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/01-Payload-Processing.md#enforcing-maximum-depth-without-parsing-the-json-string + pub const DEFAULT_MAX_KEYS: usize = 512; + + /// See [PASETO docs] for the reason behind this limit. + /// + /// Maximum length of the JSON-encoded string. + /// + /// [PASETO docs]: https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/01-Payload-Processing.md#enforcing-maximum-depth-without-parsing-the-json-string + pub const DEFAULT_MAX_LEN: usize = 8192; + + /// See [PASETO docs] for the reason behind this limit. + /// + /// This value has been set by `serde_json` and cannot be changed. + /// + /// [PASETO docs]: https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/01-Payload-Processing.md#enforcing-maximum-depth-without-parsing-the-json-string + pub const MAX_RECURSION_DEPTH: usize = 128; + + /// Create a new `Footer` instance. + pub fn new() -> Self { + Self { + list_of: HashMap::new(), + max_keys: Self::DEFAULT_MAX_KEYS, + max_len: Self::DEFAULT_MAX_LEN, + } + } + + /// Change the default (512) amount of maximum number of named keys within an object. + /// + /// __NOTE__: There should be no need to change this if you don't know this is a specific problem for you. + pub fn max_keys(&mut self, max_keys: usize) { + self.max_keys = max_keys; + } + + /// Change the default (8192) amount of maximum number of named keys within an object. + /// + /// __NOTE__: There should be no need to change this if you don't know this is a specific problem for you. + pub fn max_len(&mut self, max_len: usize) { + self.max_len = max_len; + } + + /// Add additional claims. If `claim` already exists, it is replaced with the new. + /// + /// Errors: + /// - `claim` is a reserved claim (see [`Self::REGISTERED_CLAIMS`]) + /// - `value` is any of (starts with) the disallowed PASERK types (see [`Self::DISALLOWED_FOOTER`]). + pub fn add_additional(&mut self, claim: &str, value: &str) -> Result<(), Error> { + for unsafe_value in Self::DISALLOWED_FOOTER { + if value.starts_with(unsafe_value) { + return Err(Error::InvalidClaim); + } + } + + if !Self::REGISTERED_CLAIMS.contains(&claim) { + self.list_of.insert(claim.into(), value.into()); + Ok(()) + } else { + Err(Error::InvalidClaim) + } + } + + /// Checks whether a specific claim has been added to the list. + /// + /// E.g `contains_claim("kid") == true` if `kid` has been added before. + pub fn contains_claim(&self, claim: &str) -> bool { + self.list_of.contains_key(claim) + } + + /// Return Some(claim value) if claims list contains the `claim`. + /// None otherwise. + pub fn get_claim(&self, claim: &str) -> Option<&Value> { + self.list_of.get(claim) + } + + #[cfg(feature = "paserk")] + /// Set the `kid` claim. If it already exists, replace it with the new. + pub fn key_id(&mut self, id: &Id) { + let mut paserk_kid = String::new(); + id.fmt(&mut paserk_kid).unwrap(); + + self.list_of.insert("kid".into(), paserk_kid.into()); + } + + /// Attempt to create `Footer` from a sequence of bytes. + /// + /// Errors: + /// - `bytes` contains non-UTF-8 sequences + /// - `bytes` does not decode as valid JSON + /// - `bytes` top-most JSON object does not decode to a map + /// - if any registered claims exist and they are not a `String` + /// - Parsing JSON maps and arrays that are more than 128 layers deep + /// - Maximum number of named keys is exceeded + /// - Maximum JSON-encoded string length is exceeded + pub fn parse_bytes(&mut self, bytes: &[u8]) -> Result<(), Error> { + let input = bytes.to_vec(); + + self.parse_string(&String::from_utf8(input).map_err(|_| Error::FooterParsing)?) + } + + /// Attempt to parse a `Footer` from a string. + /// + /// Errors: + /// - `string` does not decode as valid JSON + /// - `string` top-most JSON object does not decode to a map + /// - if any registered claims exist and they are not a `String` + /// - Parsing JSON maps and arrays that are more than 128 layers deep + /// - Maximum number of named keys is exceeded + /// - Maximum JSON-encoded string length is exceeded + pub fn parse_string(&mut self, string: &str) -> Result<(), Error> { + if string.len() > self.max_len { + return Err(Error::FooterParsing); + } + if Regex::new(r#"[^\\]":"#).unwrap().find_iter(string).count() > self.max_keys { + return Err(Error::FooterParsing); + } + + self.list_of = serde_json::from_str(string).map_err(|_| Error::FooterParsing)?; + + Ok(()) + } + + /// Return the JSON serialized representation of `Self`. + /// + /// Errors: + /// - `self` cannot be serialized as JSON + pub fn to_string(&self) -> Result<String, Error> { + match serde_json::to_string(&self.list_of) { + Ok(ret) => Ok(ret), + Err(_) => Err(Error::FooterParsing), + } + } +} + +#[cfg(test)] +mod tests { + use crate::footer::Footer; + use regex::Regex; + + #[test] + fn test_count_keys() { + // https://www.rustescaper.com/ + let string = r#""name": "3-S-2", + "expect-fail": false, + "public-key": "02fbcb7c69ee1c60579be7a334134878d9c5c5bf35d552dab63c0140397ed14cef637d7720925c44699ea30e72874c72fb", + "secret-key": "20347609607477aca8fbfbc5e6218455f3199669792ef8b466faa87bdc67798144c848dd03661eed5ac62461340cea96", + "secret-key-pem": "-----BEGIN EC PRIVATE KEY-----nMIGkAgEBBDAgNHYJYHR3rKj7+8XmIYRV8xmWaXku+LRm+qh73Gd5gUTISN0DZh7tnWsYkYTQM6pagBwYFK4EEACKhZANiAAT7y3xp7hxgV5vnozQTSHjZxcW/NdVS2rY8nAUA5ftFM72N9dyCSXERpnqMOcodMcvt8kgcrB8KcKee0HU23E79/s4CvEs8hBfnjnSUd/gcAm08EjSIz06iWjrNy4NakxR3I=n-----END EC PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+8t8ae4cYFeb56M0E0h42cXFvzXVUtq2nPAFAOX7RTO9jfXcgklxEaZ6jDnKHTHL7fJIHKwfCnCnntB1NtxO/f7OArxLPIQX5n40lHf4HAJtPBI0iM9Oolo6zcuDWpMUdyn-----END PUBLIC KEY-----", + "token": "v3.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9ZWrbGZ6L0MDK72skosUaS0Dz7wJ_2bMcM6tOxFuCasO9GhwHrvvchqgXQNLQQyWzGC2wkr-VKII71AvkLpC8tJOrzJV1cap9NRwoFzbcXjzMZyxQ0wkshxZxx8ImmNWP.eyJraWQiOiJkWWtJU3lseFFlZWNFY0hFTGZ6Rjg4VVpyd2JMb2xOaUNkcHpVSEd3OVVxbiJ9", + "payload": "{"data":"this is a signed message","exp":"2022-01-01T00:00:00+00:00"}", + "footer": "{"kid":"dYkISylxQeecEcHELfzF88UZrwbLolNiCdpzUHGw9Uqn"}", + "implicit-assertion": """#; + + assert_eq!( + Regex::new(r#"[^\\]":"#).unwrap().find_iter(string).count(), + 13 + ); + } + + #[test] + fn err_on_max_keys() { + let mut footer = Footer::default(); + for n in 1..=11 { + footer + .add_additional(format!("{}", n).as_str(), "test") + .unwrap(); + } + + let mut footer_parse = Footer::default(); + footer_parse.max_keys(10); + assert!(footer_parse + .parse_bytes(footer.to_string().unwrap().as_bytes()) + .is_err()); + } + + #[test] + fn err_on_max_len() { + let mut footer = Footer::new(); + for n in 1..=11 { + footer + .add_additional(format!("{}", n).as_str(), "test") + .unwrap(); + } + let ser_footer = footer.to_string().unwrap(); + + let mut footer_parse = Footer::new(); + footer_parse.max_len(ser_footer.len() - 1); + assert!(footer_parse.parse_bytes(ser_footer.as_bytes()).is_err()); + } + + #[test] + fn err_on_custom_with_registered() { + let mut footer = Footer::new(); + + assert!(footer.add_additional("wpk", "test").is_err()); + assert!(footer.add_additional("kid", "test").is_err()); + assert!(footer.add_additional("custom", "test").is_ok()); + } + + #[test] + #[cfg(all(feature = "paserk", feature = "v2", feature = "v3", feature = "v4"))] + fn err_on_disallowed_in_footer() { + use crate::keys::{AsymmetricKeyPair, Generate, SymmetricKey}; + use crate::paserk::FormatAsPaserk; + use crate::version2::V2; + use crate::version3::V3; + use crate::version4::V4; + + let mut footer = Footer::new(); + + let kpv2 = AsymmetricKeyPair::<V2>::generate().unwrap(); + let kpv3 = AsymmetricKeyPair::<V3>::generate().unwrap(); + let kpv4 = AsymmetricKeyPair::<V4>::generate().unwrap(); + let skv2 = SymmetricKey::<V2>::generate().unwrap(); + let skv4 = SymmetricKey::<V4>::generate().unwrap(); + + let mut buf = String::new(); + kpv2.secret.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("wpk", &buf).is_err()); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_err()); + + let mut buf = String::new(); + kpv2.public.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("wpk", &buf).is_err()); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_err()); + + let mut buf = String::new(); + kpv3.secret.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("wpk", &buf).is_err()); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_err()); + + let mut buf = String::new(); + kpv3.public.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("wpk", &buf).is_err()); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_err()); + + let mut buf = String::new(); + kpv4.secret.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("wpk", &buf).is_err()); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_err()); + + let mut buf = String::new(); + kpv4.public.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("wpk", &buf).is_err()); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_err()); + + let mut buf = String::new(); + skv2.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("wpk", &buf).is_err()); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_err()); + + let mut buf = String::new(); + skv4.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("wpk", &buf).is_err()); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_err()); + } + + #[test] + #[cfg(all(feature = "paserk", feature = "v2", feature = "v3", feature = "v4"))] + fn kid_in_footer() { + use crate::keys::{AsymmetricKeyPair, Generate, SymmetricKey}; + use crate::paserk::{FormatAsPaserk, Id}; + use crate::version2::V2; + use crate::version3::V3; + use crate::version4::V4; + + let mut footer = Footer::new(); + + let kpv2 = AsymmetricKeyPair::<V2>::generate().unwrap(); + let kpv3 = AsymmetricKeyPair::<V3>::generate().unwrap(); + let kpv4 = AsymmetricKeyPair::<V4>::generate().unwrap(); + let skv2 = SymmetricKey::<V2>::generate().unwrap(); + let skv4 = SymmetricKey::<V4>::generate().unwrap(); + + let mut buf = String::new(); + let paserk_id = Id::from(&kpv2.secret); + paserk_id.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_ok()); + footer.key_id(&paserk_id); + assert!(footer.contains_claim("kid")); + assert_eq!(footer.get_claim("kid").unwrap().as_str().unwrap(), buf); + + let mut buf = String::new(); + let paserk_id = Id::from(&kpv2.public); + paserk_id.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_ok()); + footer.key_id(&paserk_id); + assert!(footer.contains_claim("kid")); + assert_eq!(footer.get_claim("kid").unwrap().as_str().unwrap(), buf); + + let mut buf = String::new(); + let paserk_id = Id::from(&kpv3.secret); + paserk_id.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_ok()); + footer.key_id(&paserk_id); + assert!(footer.contains_claim("kid")); + assert_eq!(footer.get_claim("kid").unwrap().as_str().unwrap(), buf); + + let mut buf = String::new(); + let paserk_id = Id::from(&kpv3.public); + paserk_id.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_ok()); + footer.key_id(&paserk_id); + assert!(footer.contains_claim("kid")); + assert_eq!(footer.get_claim("kid").unwrap().as_str().unwrap(), buf); + + let mut buf = String::new(); + let paserk_id = Id::from(&kpv4.secret); + paserk_id.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_ok()); + footer.key_id(&paserk_id); + assert!(footer.contains_claim("kid")); + assert_eq!(footer.get_claim("kid").unwrap().as_str().unwrap(), buf); + + let mut buf = String::new(); + let paserk_id = Id::from(&kpv4.public); + paserk_id.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_ok()); + footer.key_id(&paserk_id); + assert!(footer.contains_claim("kid")); + assert_eq!(footer.get_claim("kid").unwrap().as_str().unwrap(), buf); + + let mut buf = String::new(); + let paserk_id = Id::from(&skv2); + paserk_id.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_ok()); + footer.key_id(&paserk_id); + assert!(footer.contains_claim("kid")); + assert_eq!(footer.get_claim("kid").unwrap().as_str().unwrap(), buf); + + let mut buf = String::new(); + let paserk_id = Id::from(&skv4); + paserk_id.fmt(&mut buf).unwrap(); + assert!(footer.add_additional("kid", &buf).is_err()); + assert!(footer.add_additional("custom", &buf).is_ok()); + footer.key_id(&paserk_id); + assert!(footer.contains_claim("kid")); + assert_eq!(footer.get_claim("kid").unwrap().as_str().unwrap(), buf); + } +} diff --git a/vendor/pasetors/src/keys.rs b/vendor/pasetors/src/keys.rs new file mode 100644 index 000000000..3c5c9bb58 --- /dev/null +++ b/vendor/pasetors/src/keys.rs @@ -0,0 +1,144 @@ +use crate::errors::Error; +use crate::version::private::Version; +use alloc::vec::Vec; +use core::fmt::Debug; +use core::marker::PhantomData; + +/// A type `T` that can be generated for a given version `V`. +pub trait Generate<T, V: Version> { + /// Generate `T`. + fn generate() -> Result<T, Error>; +} + +#[derive(Clone)] +/// A symmetric key used for `.local` tokens, given a version `V`. +pub struct SymmetricKey<V> { + pub(crate) bytes: Vec<u8>, + pub(crate) phantom: PhantomData<V>, +} + +impl<V: Version> SymmetricKey<V> { + /// Create a `SymmetricKey` from `bytes`. + pub fn from(bytes: &[u8]) -> Result<Self, Error> { + V::validate_local_key(bytes)?; + + Ok(Self { + bytes: bytes.to_vec(), + phantom: PhantomData, + }) + } + + /// Return this as a byte-slice. + pub fn as_bytes(&self) -> &[u8] { + self.bytes.as_slice() + } +} + +impl<V> Drop for SymmetricKey<V> { + fn drop(&mut self) { + use zeroize::Zeroize; + self.bytes.iter_mut().zeroize(); + } +} + +impl<V> Debug for SymmetricKey<V> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "SymmetricKey {{***OMITTED***}}") + } +} + +impl<V: Version> PartialEq<SymmetricKey<V>> for SymmetricKey<V> { + fn eq(&self, other: &SymmetricKey<V>) -> bool { + use subtle::ConstantTimeEq; + self.as_bytes().ct_eq(other.as_bytes()).into() + } +} + +#[derive(Clone)] +/// An asymmetric secret key used for `.public` tokens, given a version `V`. +/// +/// In case of Ed25519, which is used in V2 and V4, this is the seed concatenated with the public key. +pub struct AsymmetricSecretKey<V> { + pub(crate) bytes: Vec<u8>, + pub(crate) phantom: PhantomData<V>, +} + +impl<V: Version> AsymmetricSecretKey<V> { + /// Create a `AsymmetricSecretKey` from `bytes`. + /// + /// __PANIC__: If the version is V2 or V4, a panic will occur if an all-zero + /// secret seed is used. + pub fn from(bytes: &[u8]) -> Result<Self, Error> { + V::validate_secret_key(bytes)?; + + Ok(Self { + bytes: bytes.to_vec(), + phantom: PhantomData, + }) + } + + /// Return this as a byte-slice. + pub fn as_bytes(&self) -> &[u8] { + self.bytes.as_slice() + } +} + +impl<V> Drop for AsymmetricSecretKey<V> { + fn drop(&mut self) { + use zeroize::Zeroize; + self.bytes.iter_mut().zeroize(); + } +} + +impl<V> Debug for AsymmetricSecretKey<V> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "AsymmetricSecretKey {{***OMITTED***}}") + } +} + +impl<V: Version> PartialEq<AsymmetricSecretKey<V>> for AsymmetricSecretKey<V> { + fn eq(&self, other: &AsymmetricSecretKey<V>) -> bool { + use subtle::ConstantTimeEq; + self.as_bytes().ct_eq(other.as_bytes()).into() + } +} + +#[derive(Debug, Clone)] +/// An asymmetric public key used for `.public` tokens, given a version `V`. +pub struct AsymmetricPublicKey<V> { + pub(crate) bytes: Vec<u8>, + pub(crate) phantom: PhantomData<V>, +} + +impl<V: Version> AsymmetricPublicKey<V> { + /// Create a `AsymmetricPublicKey` from `bytes`. + pub fn from(bytes: &[u8]) -> Result<Self, Error> { + V::validate_public_key(bytes)?; + + Ok(Self { + bytes: bytes.to_vec(), + phantom: PhantomData, + }) + } + + /// Return this as a byte-slice. + pub fn as_bytes(&self) -> &[u8] { + self.bytes.as_slice() + } +} + +impl<V: Version> PartialEq<AsymmetricPublicKey<V>> for AsymmetricPublicKey<V> { + fn eq(&self, other: &AsymmetricPublicKey<V>) -> bool { + use subtle::ConstantTimeEq; + self.as_bytes().ct_eq(other.as_bytes()).into() + } +} + +#[derive(Debug, Clone)] +/// A keypair of an [`AsymmetricSecretKey`] and its corresponding [`AsymmetricPublicKey`]. +pub struct AsymmetricKeyPair<V> { + /// The [`AsymmetricSecretKey`]. + pub public: AsymmetricPublicKey<V>, + /// The [`AsymmetricPublicKey`]. + pub secret: AsymmetricSecretKey<V>, +} diff --git a/vendor/pasetors/src/lib.rs b/vendor/pasetors/src/lib.rs new file mode 100644 index 000000000..a921e9272 --- /dev/null +++ b/vendor/pasetors/src/lib.rs @@ -0,0 +1,360 @@ +//! # Getting started +//! This library has two ways of working with tokens. The first is the [`local`] and [`public`] module, +//! which the below examples make use of. These use the latest version of PASETO for tokens, +//! along with [`claims::Claims`], to enable a straightforward way of defining common claims. +//! [`claims::ClaimsValidationRules`] lets you define validation rules, that are covered when using +//! the [`local`] and [`public`] module. Using these modules means that validation of registered +//! claims is handled automatically. +//! +//! If more control over the input is needed, and validation is handled manually, the [`version4`]/[`version2`] +//! module provide a lower-level interface, where payloads are be provided as byte-slices. +//! +//! NOTE: [`claims`], [`local`] and [`public`] modules are __only available with default-features enabled__. +//! ## Creating and verifying public tokens +//! ```rust +//! use pasetors::claims::{Claims, ClaimsValidationRules}; +//! use pasetors::keys::{Generate, AsymmetricKeyPair, AsymmetricSecretKey, AsymmetricPublicKey}; +//! use pasetors::{public, Public, version4::V4}; +//! use pasetors::token::{UntrustedToken, TrustedToken}; +//! use core::convert::TryFrom; +//! +//! // Setup the default claims, which include `iat` and `nbf` as the current time and `exp` of one hour. +//! // Add a custom `data` claim as well. +//! let mut claims = Claims::new()?; +//! claims.add_additional("data", "A public, signed message")?; +//! +//! // Generate the keys and sign the claims. +//! let kp = AsymmetricKeyPair::<V4>::generate()?; +//! let pub_token = public::sign(&kp.secret, &claims, None, Some(b"implicit assertion"))?; +//! +//! // Decide how we want to validate the claims after verifying the token itself. +//! // The default verifies the `nbf`, `iat` and `exp` claims. `nbf` and `iat` are always +//! // expected to be present. +//! // NOTE: Custom claims, defined through `add_additional()`, are not validated. This must be done +//! // manually. +//! let validation_rules = ClaimsValidationRules::new(); +//! let untrusted_token = UntrustedToken::<Public, V4>::try_from(&pub_token)?; +//! let trusted_token = public::verify(&kp.public, &untrusted_token, &validation_rules, None, Some(b"implicit assertion"))?; +//! assert_eq!(&claims, trusted_token.payload_claims().unwrap()); +//! +//! let claims = trusted_token.payload_claims().unwrap(); +//! +//! println!("{:?}", claims.get_claim("data")); +//! println!("{:?}", claims.get_claim("iat")); +//! +//! # Ok::<(), pasetors::errors::Error>(()) +//! ``` + +//! ## Creating and verifying local tokens +//! ```rust +//! use pasetors::claims::{Claims, ClaimsValidationRules}; +//! use pasetors::keys::{Generate, SymmetricKey}; +//! use pasetors::{local, Local, version4::V4}; +//! use pasetors::token::UntrustedToken; +//! use core::convert::TryFrom; +//! +//! // Setup the default claims, which include `iat` and `nbf` as the current time and `exp` of one hour. +//! // Add a custom `data` claim as well. +//! let mut claims = Claims::new()?; +//! claims.add_additional("data", "A secret, encrypted message")?; +//! +//! // Generate the key and encrypt the claims. +//! let sk = SymmetricKey::<V4>::generate()?; +//! let token = local::encrypt(&sk, &claims, None, Some(b"implicit assertion"))?; +//! +//! // Decide how we want to validate the claims after verifying the token itself. +//! // The default verifies the `nbf`, `iat` and `exp` claims. `nbf` and `iat` are always +//! // expected to be present. +//! // NOTE: Custom claims, defined through `add_additional()`, are not validated. This must be done +//! // manually. +//! let validation_rules = ClaimsValidationRules::new(); +//! let untrusted_token = UntrustedToken::<Local, V4>::try_from(&token)?; +//! let trusted_token = local::decrypt(&sk, &untrusted_token, &validation_rules, None, Some(b"implicit assertion"))?; +//! assert_eq!(&claims, trusted_token.payload_claims().unwrap()); +//! +//! let claims = trusted_token.payload_claims().unwrap(); +//! +//! println!("{:?}", claims.get_claim("data")); +//! println!("{:?}", claims.get_claim("iat")); +//! +//! # Ok::<(), pasetors::errors::Error>(()) +//! ``` + +//! ## Additional claims and their validation +//! +//! ### Setting registered claims and how to validate them +//! ```rust +//! use pasetors::claims::{Claims, ClaimsValidationRules}; +//! +//! // `iat`, `nbf` and `exp` have been set automatically, but could also be overridden. +//! let mut claims = Claims::new()?; +//! claims.issuer("paragonie.com")?; +//! claims.subject("test")?; +//! claims.audience("pie-hosted.com")?; +//! claims.expiration("2039-01-01T00:00:00+00:00")?; +//! claims.not_before("2038-04-01T00:00:00+00:00")?; +//! claims.issued_at("2038-03-17T00:00:00+00:00")?; +//! claims.token_identifier("87IFSGFgPNtQNNuw0AtuLttPYFfYwOkjhqdWcLoYQHvL")?; +//! +//! let mut validation_rules = ClaimsValidationRules::new(); +//! validation_rules.validate_issuer_with("paragonie.com"); +//! validation_rules.validate_subject_with("test"); +//! validation_rules.validate_audience_with("pie-hosted.com"); +//! validation_rules.validate_token_identifier_with("87IFSGFgPNtQNNuw0AtuLttPYFfYwOkjhqdWcLoYQHvL"); +//! +//! // The token has been set to be issued in the future and not valid yet, so validation fails. +//! assert!(validation_rules.validate_claims(&claims).is_err()); +//! # Ok::<(), pasetors::errors::Error>(()) +//! ``` +//! ### Non-expiring tokens +//! ```rust +//! use pasetors::claims::{Claims, ClaimsValidationRules}; +//! +//! // Non-expiring tokens +//! let mut claims = Claims::new()?; +//! claims.add_additional("data", "A public, signed message")?; +//! claims.non_expiring(); +//! // Now claims can be validated as non-expiring when we define the validation rule as: +//! let mut validation_rules = ClaimsValidationRules::new(); +//! validation_rules.allow_non_expiring(); +//! +//! # Ok::<(), pasetors::errors::Error>(()) +//! ``` + +//! ## Footer with registered and custom claims +//! ```rust +//! use pasetors::paserk::{FormatAsPaserk, Id}; +//! use pasetors::claims::{Claims, ClaimsValidationRules}; +//! use pasetors::footer::Footer; +//! use pasetors::keys::{Generate, AsymmetricKeyPair}; +//! use pasetors::{public, Public, version4::V4}; +//! use pasetors::token::UntrustedToken; +//! use core::convert::TryFrom; +//! +//! // Generate the key used to later sign a token. +//! let kp = AsymmetricKeyPair::<V4>::generate()?; +//! // Serialize the public key to PASERK "pid". +//! let mut pid = Id::from(&kp.public); +//! // Add the "pid" to the "kid" claim of a footer. +//! let mut footer = Footer::new(); +//! footer.key_id(&pid); +//! footer.add_additional("custom_footer_claim", "custom_value")?; +//! +//! let mut claims = Claims::new()?; +//! let pub_token = public::sign(&kp.secret, &claims, Some(&footer), Some(b"implicit assertion"))?; +//! +//! // If we receive a token that needs to be verified, we can still try to parse a Footer from it +//! // as long one was used during creation, if we don't know it beforehand. +//! let validation_rules = ClaimsValidationRules::new(); +//! let untrusted_token = UntrustedToken::<Public, V4>::try_from(&pub_token)?; +//! let trusted_token = public::verify(&kp.public, &untrusted_token, &validation_rules, None, Some(b"implicit assertion"))?; +//! let trusted_footer = Footer::try_from(&trusted_token)?; +//! +//! let mut kid = String::new(); +//! pid.fmt(&mut kid).unwrap(); +//! assert_eq!(trusted_footer.get_claim("kid").unwrap().as_str().unwrap(), kid); +//! +//! # Ok::<(), pasetors::errors::Error>(()) +//! ``` + +//! ## PASERK serialization +//! ```rust +//! use pasetors::paserk::FormatAsPaserk; +//! use pasetors::keys::{Generate, SymmetricKey}; +//! use pasetors::version4::V4; +//! use core::convert::TryFrom; +//! +//! // Generate the key and serialize to and from PASERK. +//! let sk = SymmetricKey::<V4>::generate()?; +//! let mut paserk = String::new(); +//! sk.fmt(&mut paserk).unwrap(); +//! let sk = SymmetricKey::<V4>::try_from(paserk.as_str())?; +//! +//! # Ok::<(), pasetors::errors::Error>(()) +//! ``` + +#![cfg_attr(not(feature = "std"), no_std)] +#![forbid(unsafe_code)] +#![deny(clippy::mem_forget)] +#![warn( + missing_docs, + rust_2018_idioms, + trivial_casts, + unused_qualifications, + overflowing_literals +)] +#![doc(html_root_url = "https://docs.rs/pasetors/0.6.5")] +#![cfg_attr(docsrs, feature(doc_cfg))] + +#[macro_use] +extern crate alloc; + +mod pae; + +/// Errors for token operations. +pub mod errors; + +mod common; + +#[cfg(feature = "std")] +/// Claims for tokens and validation thereof. +pub mod claims; + +#[cfg(feature = "std")] +/// Footer for tokens. +pub mod footer; + +/// Keys used for PASETO tokens. +pub mod keys; + +#[cfg(feature = "paserk")] +/// PASERK key-wrapping and serialization. +pub mod paserk; + +#[cfg(feature = "v2")] +/// PASETO version 2 tokens. +pub mod version2; + +#[cfg(feature = "v3")] +/// PASETO version 3 tokens. +pub mod version3; + +#[cfg(feature = "v4")] +/// PASETO version 4 tokens. +pub mod version4; + +/// Types for handling tokens. +pub mod token; + +#[cfg(feature = "serde")] +/// Serialization and deserialization support for various types. +mod serde; + +mod version; + +/// Public and local tokens. +pub use token::{Local, Public}; + +#[cfg_attr(docsrs, doc(cfg(all(feature = "std", feature = "v4"))))] +#[cfg(all(feature = "std", feature = "v4"))] +/// PASETO public tokens with [`version4`], using [`claims::Claims`]. +pub mod public { + use super::*; + use crate::claims::{Claims, ClaimsValidationRules}; + use crate::errors::Error; + use crate::footer::Footer; + use crate::keys::{AsymmetricPublicKey, AsymmetricSecretKey}; + use crate::token::{TrustedToken, UntrustedToken}; + use crate::version4::V4; + + /// Create a public token using the latest PASETO version (v4). + pub fn sign( + secret_key: &AsymmetricSecretKey<V4>, + message: &Claims, + footer: Option<&Footer>, + implicit_assert: Option<&[u8]>, + ) -> Result<String, Error> { + match footer { + Some(f) => crate::version4::PublicToken::sign( + secret_key, + message.to_string()?.as_bytes(), + Some(f.to_string()?.as_bytes()), + implicit_assert, + ), + None => crate::version4::PublicToken::sign( + secret_key, + message.to_string()?.as_bytes(), + None, + implicit_assert, + ), + } + } + + /// Verify a public token using the latest PASETO version (v4). If verification passes, + /// validate the claims according to the `validation_rules`. + pub fn verify( + public_key: &AsymmetricPublicKey<V4>, + token: &UntrustedToken<Public, V4>, + validation_rules: &ClaimsValidationRules, + footer: Option<&Footer>, + implicit_assert: Option<&[u8]>, + ) -> Result<TrustedToken, Error> { + let mut trusted_token = match footer { + Some(f) => crate::version4::PublicToken::verify( + public_key, + token, + Some(f.to_string()?.as_bytes()), + implicit_assert, + )?, + None => crate::version4::PublicToken::verify(public_key, token, None, implicit_assert)?, + }; + + let claims = Claims::from_string(trusted_token.payload())?; + validation_rules.validate_claims(&claims)?; + trusted_token.set_payload_claims(claims); + + Ok(trusted_token) + } +} + +#[cfg_attr(docsrs, doc(cfg(all(feature = "std", feature = "v4"))))] +#[cfg(all(feature = "std", feature = "v4"))] +/// PASETO local tokens with [`version4`], using [`claims::Claims`]. +pub mod local { + use super::*; + use crate::claims::{Claims, ClaimsValidationRules}; + use crate::errors::Error; + use crate::footer::Footer; + use crate::keys::SymmetricKey; + use crate::token::{TrustedToken, UntrustedToken}; + use crate::version4::V4; + + /// Create a local token using the latest PASETO version (v4). + pub fn encrypt( + secret_key: &SymmetricKey<V4>, + message: &Claims, + footer: Option<&Footer>, + implicit_assert: Option<&[u8]>, + ) -> Result<String, Error> { + match footer { + Some(f) => crate::version4::LocalToken::encrypt( + secret_key, + message.to_string()?.as_bytes(), + Some(f.to_string()?.as_bytes()), + implicit_assert, + ), + None => crate::version4::LocalToken::encrypt( + secret_key, + message.to_string()?.as_bytes(), + None, + implicit_assert, + ), + } + } + + /// Verify a local token using the latest PASETO version (v4). If verification passes, + /// validate the claims according to the `validation_rules`. + pub fn decrypt( + secret_key: &SymmetricKey<V4>, + token: &UntrustedToken<Local, V4>, + validation_rules: &ClaimsValidationRules, + footer: Option<&Footer>, + implicit_assert: Option<&[u8]>, + ) -> Result<TrustedToken, Error> { + let mut trusted_token = match footer { + Some(f) => crate::version4::LocalToken::decrypt( + secret_key, + token, + Some(f.to_string()?.as_bytes()), + implicit_assert, + )?, + None => crate::version4::LocalToken::decrypt(secret_key, token, None, implicit_assert)?, + }; + + let claims = Claims::from_string(trusted_token.payload())?; + validation_rules.validate_claims(&claims)?; + trusted_token.set_payload_claims(claims); + + Ok(trusted_token) + } +} diff --git a/vendor/pasetors/src/pae.rs b/vendor/pasetors/src/pae.rs new file mode 100644 index 000000000..e72e849b0 --- /dev/null +++ b/vendor/pasetors/src/pae.rs @@ -0,0 +1,78 @@ +use crate::errors::Error; +use alloc::vec::Vec; +use core::convert::TryInto; + +/// Encode `n` to little-endian bytes. The MSB is cleared. +pub fn le64(n: u64) -> [u8; core::mem::size_of::<u64>()] { + let mut out = [0u8; core::mem::size_of::<u64>()]; + let mut n_tmp = n; + + out[0] = (n_tmp & 255) as u8; + n_tmp >>= 8; + out[1] = (n_tmp & 255) as u8; + n_tmp >>= 8; + out[2] = (n_tmp & 255) as u8; + n_tmp >>= 8; + out[3] = (n_tmp & 255) as u8; + n_tmp >>= 8; + out[4] = (n_tmp & 255) as u8; + n_tmp >>= 8; + out[5] = (n_tmp & 255) as u8; + n_tmp >>= 8; + out[6] = (n_tmp & 255) as u8; + n_tmp >>= 8; + n_tmp &= 127; // Clear the MSB for interoperability + out[7] = (n_tmp & 255) as u8; + + out +} + +/// Pre-Authentication Encoding. See [specification](https://github.com/paragonie/paseto/blob/master/docs/01-Protocol-Versions/Common.md#pae-definition). +pub fn pae(pieces: &[&[u8]]) -> Result<Vec<u8>, Error> { + let mut out: Vec<u8> = Vec::with_capacity(64); + + out.extend_from_slice(&le64(pieces.len().try_into()?)); + for elem in pieces.iter() { + out.extend_from_slice(&le64(elem.len().try_into()?)); + out.extend_from_slice(elem); + } + + Ok(out) +} + +#[cfg(test)] +mod unit_tests { + use super::*; + + #[test] + fn test_le64() { + assert_eq!(vec![0, 0, 0, 0, 0, 0, 0, 0], le64(0)); + assert_eq!(vec![10, 0, 0, 0, 0, 0, 0, 0], le64(10)); + } + + #[test] + fn test_pae() { + // Source: https://github.com/paragonie/paseto/blob/master/tests/UtilTest.php + assert_eq!("0000000000000000", hex::encode(&pae(&[]).unwrap())); + assert_eq!( + "01000000000000000000000000000000", + hex::encode(&pae(&[b""]).unwrap()) + ); + assert_eq!( + "020000000000000000000000000000000000000000000000", + hex::encode(&pae(&[b"", b""]).unwrap()) + ); + assert_eq!( + "0100000000000000070000000000000050617261676f6e", + hex::encode(&pae(&[b"Paragon"]).unwrap()) + ); + assert_eq!( + "0200000000000000070000000000000050617261676f6e0a00000000000000496e6974696174697665", + hex::encode(&pae(&[b"Paragon", b"Initiative",]).unwrap()) + ); + assert_eq!( + "0100000000000000190000000000000050617261676f6e0a00000000000000496e6974696174697665", + hex::encode(&pae(&[b"Paragon\n\0\0\0\0\0\0\0Initiative"]).unwrap()) + ); + } +} diff --git a/vendor/pasetors/src/paserk.rs b/vendor/pasetors/src/paserk.rs new file mode 100644 index 000000000..95c54b797 --- /dev/null +++ b/vendor/pasetors/src/paserk.rs @@ -0,0 +1,860 @@ +#![cfg_attr(docsrs, doc(cfg(feature = "paserk")))] + +use crate::common::{decode_b64, encode_b64}; +use crate::errors::Error; +use crate::keys::{AsymmetricPublicKey, AsymmetricSecretKey, SymmetricKey}; +use crate::version::private::Version; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::convert::TryFrom; +use core::fmt::Write; +use core::marker::PhantomData; +use orion::hazardous::hash::blake2::blake2b; +use zeroize::Zeroize; + +#[cfg(feature = "v2")] +use crate::version2::V2; + +#[cfg(feature = "v3")] +use crate::version3::V3; +#[cfg(feature = "v3")] +use orion::hazardous::hash::sha2::sha384; + +#[cfg(feature = "v4")] +use crate::version4::V4; + +/// Validate an input string to check if it is a well-formatted PASERK. +/// +/// Return the base64-encoded part of the serialized string. +fn validate_paserk_string( + input: &str, + version_id: &str, + type_id: &str, + expected_len: usize, +) -> Result<Vec<u8>, Error> { + let split = input.split('.').collect::<Vec<&str>>(); + if split.len() != 3 { + return Err(Error::PaserkParsing); + } + + if split[0] == version_id && split[1] == type_id { + let ret = decode_b64(split[2])?; + if ret.len() != expected_len { + return Err(Error::PaserkParsing); + } + + Ok(ret) + } else { + Err(Error::PaserkParsing) + } +} + +/// A trait for serializing a type as PASERK. +pub trait FormatAsPaserk { + /// Format a key as PASERK. + fn fmt(&self, write: &mut dyn Write) -> core::fmt::Result; +} + +#[cfg(feature = "v2")] +impl FormatAsPaserk for SymmetricKey<V2> { + fn fmt(&self, write: &mut dyn Write) -> core::fmt::Result { + write.write_str("k2.local.")?; + write.write_str(&encode_b64(self.as_bytes()).map_err(|_| core::fmt::Error)?) + } +} + +#[cfg(feature = "v2")] +impl TryFrom<&str> for SymmetricKey<V2> { + type Error = Error; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + Ok(Self { + bytes: validate_paserk_string(value, "k2", "local", V2::LOCAL_KEY)?, + phantom: PhantomData, + }) + } +} + +#[cfg(feature = "v4")] +impl FormatAsPaserk for SymmetricKey<V4> { + fn fmt(&self, write: &mut dyn Write) -> core::fmt::Result { + write.write_str("k4.local.")?; + write.write_str(&encode_b64(self.as_bytes()).map_err(|_| core::fmt::Error)?) + } +} + +#[cfg(feature = "v4")] +impl TryFrom<&str> for SymmetricKey<V4> { + type Error = Error; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + Ok(Self { + bytes: validate_paserk_string(value, "k4", "local", V4::LOCAL_KEY)?, + phantom: PhantomData, + }) + } +} + +#[cfg(feature = "v2")] +impl FormatAsPaserk for AsymmetricSecretKey<V2> { + fn fmt(&self, write: &mut dyn Write) -> core::fmt::Result { + write.write_str("k2.secret.")?; + write.write_str(&encode_b64(self.as_bytes()).map_err(|_| core::fmt::Error)?) + } +} + +#[cfg(feature = "v2")] +impl TryFrom<&str> for AsymmetricSecretKey<V2> { + type Error = Error; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + let mut buf = validate_paserk_string(value, "k2", "secret", V2::SECRET_KEY)?; + let ret = Self::from(&buf)?; + buf.iter_mut().zeroize(); + + Ok(ret) + } +} + +#[cfg(feature = "v3")] +impl FormatAsPaserk for AsymmetricSecretKey<V3> { + fn fmt(&self, write: &mut dyn Write) -> core::fmt::Result { + write.write_str("k3.secret.")?; + write.write_str(&encode_b64(&self.bytes).map_err(|_| core::fmt::Error)?) + } +} + +#[cfg(feature = "v3")] +impl TryFrom<&str> for AsymmetricSecretKey<V3> { + type Error = Error; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + let buf = validate_paserk_string(value, "k3", "secret", V3::SECRET_KEY)?; + let ret = Self { + bytes: buf, + phantom: PhantomData, + }; + + Ok(ret) + } +} + +#[cfg(feature = "v4")] +impl FormatAsPaserk for AsymmetricSecretKey<V4> { + fn fmt(&self, write: &mut dyn Write) -> core::fmt::Result { + write.write_str("k4.secret.")?; + write.write_str(&encode_b64(self.as_bytes()).map_err(|_| core::fmt::Error)?) + } +} + +#[cfg(feature = "v4")] +impl TryFrom<&str> for AsymmetricSecretKey<V4> { + type Error = Error; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + let mut buf = validate_paserk_string(value, "k4", "secret", V4::SECRET_KEY)?; + let ret = Self::from(&buf)?; + buf.iter_mut().zeroize(); + + Ok(ret) + } +} + +#[cfg(feature = "v2")] +impl FormatAsPaserk for AsymmetricPublicKey<V2> { + fn fmt(&self, write: &mut dyn Write) -> core::fmt::Result { + write.write_str("k2.public.")?; + write.write_str(&encode_b64(self.as_bytes()).map_err(|_| core::fmt::Error)?) + } +} + +#[cfg(feature = "v2")] +impl TryFrom<&str> for AsymmetricPublicKey<V2> { + type Error = Error; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + Ok(Self { + bytes: validate_paserk_string(value, "k2", "public", V2::PUBLIC_KEY)?, + phantom: PhantomData, + }) + } +} + +#[cfg(feature = "v3")] +impl FormatAsPaserk for AsymmetricPublicKey<V3> { + fn fmt(&self, write: &mut dyn Write) -> core::fmt::Result { + write.write_str("k3.public.")?; + write.write_str(&encode_b64(self.as_bytes()).map_err(|_| core::fmt::Error)?) + } +} + +#[cfg(feature = "v3")] +impl TryFrom<&str> for AsymmetricPublicKey<V3> { + type Error = Error; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + Ok(Self { + bytes: validate_paserk_string(value, "k3", "public", V3::PUBLIC_KEY)?, + phantom: PhantomData, + }) + } +} + +#[cfg(feature = "v4")] +impl FormatAsPaserk for AsymmetricPublicKey<V4> { + fn fmt(&self, write: &mut dyn Write) -> core::fmt::Result { + write.write_str("k4.public.")?; + write.write_str(&encode_b64(self.as_bytes()).map_err(|_| core::fmt::Error)?) + } +} + +#[cfg(feature = "v4")] +impl TryFrom<&str> for AsymmetricPublicKey<V4> { + type Error = Error; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + Ok(Self { + bytes: validate_paserk_string(value, "k4", "public", V4::PUBLIC_KEY)?, + phantom: PhantomData, + }) + } +} + +#[derive(Debug, Clone)] +/// PASERK IDs. +/// +/// This operation calculates the unique ID for a given PASERK. +/// +/// See: <https://github.com/paseto-standard/paserk/blob/master/operations/ID.md> +pub struct Id { + header: String, + identifier: String, +} + +impl PartialEq<Id> for Id { + fn eq(&self, other: &Id) -> bool { + use subtle::ConstantTimeEq; + (self.header.as_bytes().ct_eq(other.header.as_bytes()) + & self + .identifier + .as_bytes() + .ct_eq(other.identifier.as_bytes())) + .into() + } +} + +#[cfg(feature = "v3")] +impl From<&AsymmetricSecretKey<V3>> for Id { + fn from(key: &AsymmetricSecretKey<V3>) -> Self { + let header = String::from("k3.sid."); + let mut hasher = sha384::Sha384::new(); + hasher.update(header.as_bytes()).unwrap(); + + let mut paserk_string = String::new(); + key.fmt(&mut paserk_string).unwrap(); + hasher.update(paserk_string.as_bytes()).unwrap(); + let identifier = encode_b64(&hasher.finalize().unwrap().as_ref()[..33]).unwrap(); + debug_assert_eq!(identifier.len(), 44); + + Self { header, identifier } + } +} + +#[cfg(feature = "v3")] +impl From<&AsymmetricPublicKey<V3>> for Id { + fn from(key: &AsymmetricPublicKey<V3>) -> Self { + let header = String::from("k3.pid."); + let mut hasher = sha384::Sha384::new(); + hasher.update(header.as_bytes()).unwrap(); + + let mut paserk_string = String::new(); + key.fmt(&mut paserk_string).unwrap(); + hasher.update(paserk_string.as_bytes()).unwrap(); + let identifier = encode_b64(&hasher.finalize().unwrap().as_ref()[..33]).unwrap(); + debug_assert_eq!(identifier.len(), 44); + + Self { header, identifier } + } +} + +#[cfg(feature = "v2")] +impl From<&SymmetricKey<V2>> for Id { + fn from(key: &SymmetricKey<V2>) -> Self { + let header = String::from("k2.lid."); + let mut hasher = blake2b::Blake2b::new(33).unwrap(); + hasher.update(header.as_bytes()).unwrap(); + + let mut paserk_string = String::new(); + key.fmt(&mut paserk_string).unwrap(); + hasher.update(paserk_string.as_bytes()).unwrap(); + let identifier = encode_b64(hasher.finalize().unwrap().as_ref()).unwrap(); + debug_assert_eq!(identifier.len(), 44); + + Self { header, identifier } + } +} + +#[cfg(feature = "v4")] +impl From<&SymmetricKey<V4>> for Id { + fn from(key: &SymmetricKey<V4>) -> Self { + let header = String::from("k4.lid."); + let mut hasher = blake2b::Blake2b::new(33).unwrap(); + hasher.update(header.as_bytes()).unwrap(); + + let mut paserk_string = String::new(); + key.fmt(&mut paserk_string).unwrap(); + hasher.update(paserk_string.as_bytes()).unwrap(); + let identifier = encode_b64(hasher.finalize().unwrap().as_ref()).unwrap(); + debug_assert_eq!(identifier.len(), 44); + + Self { header, identifier } + } +} + +#[cfg(feature = "v2")] +impl From<&AsymmetricSecretKey<V2>> for Id { + fn from(key: &AsymmetricSecretKey<V2>) -> Self { + let header = String::from("k2.sid."); + let mut hasher = blake2b::Blake2b::new(33).unwrap(); + hasher.update(header.as_bytes()).unwrap(); + + let mut paserk_string = String::new(); + key.fmt(&mut paserk_string).unwrap(); + hasher.update(paserk_string.as_bytes()).unwrap(); + let identifier = encode_b64(hasher.finalize().unwrap().as_ref()).unwrap(); + debug_assert_eq!(identifier.len(), 44); + + Self { header, identifier } + } +} + +#[cfg(feature = "v4")] +impl From<&AsymmetricSecretKey<V4>> for Id { + fn from(key: &AsymmetricSecretKey<V4>) -> Self { + let header = String::from("k4.sid."); + let mut hasher = blake2b::Blake2b::new(33).unwrap(); + hasher.update(header.as_bytes()).unwrap(); + + let mut paserk_string = String::new(); + key.fmt(&mut paserk_string).unwrap(); + hasher.update(paserk_string.as_bytes()).unwrap(); + let identifier = encode_b64(hasher.finalize().unwrap().as_ref()).unwrap(); + debug_assert_eq!(identifier.len(), 44); + + Self { header, identifier } + } +} + +#[cfg(feature = "v2")] +impl From<&AsymmetricPublicKey<V2>> for Id { + fn from(key: &AsymmetricPublicKey<V2>) -> Self { + let header = String::from("k2.pid."); + let mut hasher = blake2b::Blake2b::new(33).unwrap(); + hasher.update(header.as_bytes()).unwrap(); + + let mut paserk_string = String::new(); + key.fmt(&mut paserk_string).unwrap(); + hasher.update(paserk_string.as_bytes()).unwrap(); + let identifier = encode_b64(hasher.finalize().unwrap().as_ref()).unwrap(); + debug_assert_eq!(identifier.len(), 44); + + Self { header, identifier } + } +} + +#[cfg(feature = "v4")] +impl From<&AsymmetricPublicKey<V4>> for Id { + fn from(key: &AsymmetricPublicKey<V4>) -> Self { + let header = String::from("k4.pid."); + let mut hasher = blake2b::Blake2b::new(33).unwrap(); + hasher.update(header.as_bytes()).unwrap(); + + let mut paserk_string = String::new(); + key.fmt(&mut paserk_string).unwrap(); + hasher.update(paserk_string.as_bytes()).unwrap(); + let identifier = encode_b64(hasher.finalize().unwrap().as_ref()).unwrap(); + debug_assert_eq!(identifier.len(), 44); + + Self { header, identifier } + } +} + +impl FormatAsPaserk for Id { + fn fmt(&self, write: &mut dyn Write) -> core::fmt::Result { + write.write_str(&self.header)?; + write.write_str(&self.identifier) + } +} + +#[cfg(any(feature = "v2", feature = "v3", feature = "v4"))] +impl TryFrom<&str> for Id { + type Error = Error; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + let split = value.split('.').collect::<Vec<&str>>(); + if split.len() != 3 { + return Err(Error::PaserkParsing); + } + + let header = match (split[0], split[1]) { + ("k2", "lid" | "sid" | "pid") + | ("k3", "sid" | "pid") + | ("k4", "lid" | "sid" | "pid") => format!("{}.{}.", split[0], split[1]), + _ => return Err(Error::PaserkParsing), + }; + + let expected_len = match split[0] { + #[cfg(feature = "v2")] + "k2" => V2::PASERK_ID, + #[cfg(feature = "v3")] + "k3" => V3::PASERK_ID, + #[cfg(feature = "v4")] + "k4" => V4::PASERK_ID, + _ => return Err(Error::PaserkParsing), + }; + if split[2].len() != expected_len { + return Err(Error::PaserkParsing); + } + + Ok(Self { + header, + identifier: split[2].to_string(), + }) + } +} + +#[cfg(test)] +#[cfg(feature = "std")] +mod tests { + use super::*; + + use ::serde::{Deserialize, Serialize}; + use alloc::string::String; + use alloc::vec::Vec; + use hex; + use std::fs::File; + use std::io::BufReader; + + #[allow(non_snake_case)] + #[derive(Serialize, Deserialize, Debug)] + pub(crate) struct TestFile { + pub(crate) name: String, + pub(crate) tests: Vec<PaserkTest>, + } + + #[allow(non_snake_case)] + #[derive(Serialize, Deserialize, Debug)] + pub(crate) struct PaserkTest { + pub(crate) name: String, + #[serde(rename(deserialize = "expect-fail"))] + pub(crate) expect_fail: bool, + pub(crate) key: Option<String>, + pub(crate) paserk: Option<String>, + #[serde(rename(deserialize = "public-key"))] + pub(crate) public_key: Option<String>, + #[serde(rename(deserialize = "secret-key-seed"))] + pub(crate) secret_key_seed: Option<String>, + } + + const TEST_WITH_ALL_ZERO_SEED: [&str; 4] = + ["k2.secret-1", "k2.sid-1", "k4.secret-1", "k4.sid-1"]; + + macro_rules! test_paserk_type { + ($test_func_name:ident, $key:ident, $version:ident, $path:expr) => { + #[test] + pub fn $test_func_name() { + let file = File::open($path).unwrap(); + let reader = BufReader::new(file); + let tests: TestFile = serde_json::from_reader(reader).unwrap(); + + for test_paserk in tests.tests { + if TEST_WITH_ALL_ZERO_SEED.contains(&test_paserk.name.as_str()) { + // We require that the public key match the secret seed. Thus, + // the first test vectors for PASERK dealing with secret keys + // will always fail. + continue; + } + + match (test_paserk.expect_fail, test_paserk.paserk, test_paserk.key) { + (true, Some(_paserk), Some(_key)) => { + unreachable!("This test vectors shouldn't exist") + } + (true, Some(paserk), None) => { + assert!($key::<$version>::try_from(paserk.as_str()).is_err()); + continue; + } + (true, None, Some(key)) => { + if hex::decode(&key).is_err() { + continue; // The case where RSA keys are put in v2 + } + assert!($key::<$version>::from(&hex::decode(&key).unwrap()).is_err()); + continue; + } + (false, Some(paserk), Some(key)) => { + #[cfg(feature = "serde")] + let key_hex = key.clone(); + let deser = $key::<$version>::try_from(paserk.as_str()).unwrap(); + let key = $key::<$version>::from(&hex::decode(&key).unwrap()).unwrap(); + assert_eq!(deser.as_bytes(), key.as_bytes()); + let mut buf = String::new(); + key.fmt(&mut buf).unwrap(); + assert_eq!(paserk, buf); + + #[cfg(feature = "serde")] + { + let deser: $key<$version> = + serde_json::from_str(&format!(r#""{paserk}""#)).unwrap(); + let key = $key::<$version>::from(&hex::decode(&key_hex).unwrap()) + .unwrap(); + assert_eq!(deser.as_bytes(), key.as_bytes()); + let ser = serde_json::to_string(&key).unwrap(); + assert_eq!(format!(r#""{paserk}""#), ser); + } + } + _ => unreachable!("This test vectors shouldn't exist"), + } + } + } + }; + } + + macro_rules! test_id_type { + ($test_func_name:ident, $key:ident, $version:ident, $path:expr) => { + #[test] + pub fn $test_func_name() { + let file = File::open($path).unwrap(); + let reader = BufReader::new(file); + let tests: TestFile = serde_json::from_reader(reader).unwrap(); + + for test_paserk in tests.tests { + if TEST_WITH_ALL_ZERO_SEED.contains(&test_paserk.name.as_str()) { + // We require that the public key match the secret seed. Thus, + // the first test vectors for PASERK dealing with secret keys + // will always fail. + continue; + } + + match (test_paserk.expect_fail, test_paserk.paserk, test_paserk.key) { + (true, Some(_paserk), Some(_key)) => { + unreachable!("This test vectors shouldn't exist") + } + (true, Some(_paserk), None) => { + unreachable!("This test vectors shouldn't exist") + } + (true, None, Some(key)) => { + if hex::decode(&key).is_err() { + continue; // The case where RSA keys are put in v2 + } + assert!($key::<$version>::from(&hex::decode(&key).unwrap()).is_err()); + continue; + } + (false, Some(paserk), Some(key)) => { + #[cfg(feature = "serde")] + let key_hex = key.clone(); + let key = $key::<$version>::from(&hex::decode(&key).unwrap()).unwrap(); + + let paserk_id = Id::from(&key); + let mut buf = String::new(); + paserk_id.fmt(&mut buf).unwrap(); + assert_eq!(paserk, buf); + + #[cfg(feature = "serde")] + { + let key = $key::<$version>::from(&hex::decode(&key_hex).unwrap()) + .unwrap(); + let paserk_id = Id::from(&key); + let mut buf = String::new(); + paserk_id.fmt(&mut buf).unwrap(); + + let deser: Id = + serde_json::from_str(&format!(r#""{buf}""#)).unwrap(); + assert_eq!(paserk_id, deser); + let ser = serde_json::to_string(&paserk_id).unwrap(); + assert_eq!(format!(r#""{buf}""#), ser); + } + } + _ => unreachable!("This test vectors shouldn't exist"), + } + } + } + }; + } + + #[cfg(test)] + #[cfg(feature = "v2")] + mod v2 { + use super::*; + + test_id_type!( + test_local_k2_id, + SymmetricKey, + V2, + "./test_vectors/PASERK/k2.lid.json" + ); + + test_id_type!( + test_secret_k2_id, + AsymmetricSecretKey, + V2, + "./test_vectors/PASERK/k2.sid.json" + ); + + test_id_type!( + test_public_k2_id, + AsymmetricPublicKey, + V2, + "./test_vectors/PASERK/k2.pid.json" + ); + + test_paserk_type!( + test_local_k2, + SymmetricKey, + V2, + "./test_vectors/PASERK/k2.local.json" + ); + + test_paserk_type!( + test_public_k2, + AsymmetricPublicKey, + V2, + "./test_vectors/PASERK/k2.public.json" + ); + + test_paserk_type!( + test_secret_k2, + AsymmetricSecretKey, + V2, + "./test_vectors/PASERK/k2.secret.json" + ); + + #[test] + fn test_wrong_version_or_purpose() { + assert!(SymmetricKey::<V2>::try_from( + "k2.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_ok()); + assert!(SymmetricKey::<V2>::try_from( + "k4.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + assert!(SymmetricKey::<V2>::try_from( + "k2.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + assert!(SymmetricKey::<V2>::try_from( + "k4.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + + assert!(AsymmetricPublicKey::<V2>::try_from( + "k2.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_ok()); + assert!(AsymmetricPublicKey::<V2>::try_from( + "k4.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + assert!(AsymmetricPublicKey::<V2>::try_from( + "k2.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + assert!(AsymmetricPublicKey::<V2>::try_from( + "k4.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + + assert!(AsymmetricSecretKey::<V2>::try_from("k2.secret.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8c5WpIyC_5kWKhS8VEYSZ05dYfuTF-ZdQFV4D9vLTcNQ").is_ok()); + assert!(AsymmetricSecretKey::<V2>::try_from("k4.secret.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8c5WpIyC_5kWKhS8VEYSZ05dYfuTF-ZdQFV4D9vLTcNQ").is_err()); + assert!(AsymmetricSecretKey::<V2>::try_from("k2.local.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8c5WpIyC_5kWKhS8VEYSZ05dYfuTF-ZdQFV4D9vLTcNQ").is_err()); + assert!(AsymmetricSecretKey::<V2>::try_from("k4.local.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8c5WpIyC_5kWKhS8VEYSZ05dYfuTF-ZdQFV4D9vLTcNQ").is_err()); + } + } + + #[cfg(test)] + #[cfg(feature = "v3")] + mod v3 { + use super::*; + + test_id_type!( + test_secret_k3_id, + AsymmetricSecretKey, + V3, + "./test_vectors/PASERK/k3.sid.json" + ); + + test_id_type!( + test_public_k3_id, + AsymmetricPublicKey, + V3, + "./test_vectors/PASERK/k3.pid.json" + ); + + test_paserk_type!( + test_public_k3, + AsymmetricPublicKey, + V3, + "./test_vectors/PASERK/k3.public.json" + ); + + test_paserk_type!( + test_secret_k3, + AsymmetricSecretKey, + V3, + "./test_vectors/PASERK/k3.secret.json" + ); + + #[test] + fn test_wrong_version_or_purpose() { + assert!(AsymmetricPublicKey::<V3>::try_from( + "k3.public.AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_ok()); + assert!(AsymmetricPublicKey::<V3>::try_from( + "k4.public.AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + assert!(AsymmetricPublicKey::<V3>::try_from( + "k3.local.AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + assert!(AsymmetricPublicKey::<V3>::try_from( + "k4.local.AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + + assert!(AsymmetricSecretKey::<V3>::try_from( + "k3.secret.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB" + ) + .is_ok()); + assert!(AsymmetricSecretKey::<V3>::try_from( + "k4.secret.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB" + ) + .is_err()); + assert!(AsymmetricSecretKey::<V3>::try_from( + "k3.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB" + ) + .is_err()); + assert!(AsymmetricSecretKey::<V3>::try_from( + "k4.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB" + ) + .is_err()); + } + } + + #[cfg(test)] + #[cfg(feature = "v4")] + mod v4 { + use super::*; + + test_id_type!( + test_local_k4_id, + SymmetricKey, + V4, + "./test_vectors/PASERK/k4.lid.json" + ); + + test_id_type!( + test_secret_k4_id, + AsymmetricSecretKey, + V4, + "./test_vectors/PASERK/k4.sid.json" + ); + + test_id_type!( + test_public_k4_id, + AsymmetricPublicKey, + V4, + "./test_vectors/PASERK/k4.pid.json" + ); + + test_paserk_type!( + test_local_k4, + SymmetricKey, + V4, + "./test_vectors/PASERK/k4.local.json" + ); + + test_paserk_type!( + test_public_k4, + AsymmetricPublicKey, + V4, + "./test_vectors/PASERK/k4.public.json" + ); + + test_paserk_type!( + test_secret_k4, + AsymmetricSecretKey, + V4, + "./test_vectors/PASERK/k4.secret.json" + ); + + #[test] + fn test_wrong_version_or_purpose() { + assert!(SymmetricKey::<V4>::try_from( + "k4.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_ok()); + assert!(SymmetricKey::<V4>::try_from( + "k2.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + assert!(SymmetricKey::<V4>::try_from( + "k4.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + assert!(SymmetricKey::<V4>::try_from( + "k2.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + + assert!(AsymmetricPublicKey::<V4>::try_from( + "k4.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_ok()); + assert!(AsymmetricPublicKey::<V4>::try_from( + "k2.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + assert!(AsymmetricPublicKey::<V4>::try_from( + "k4.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + assert!(AsymmetricPublicKey::<V4>::try_from( + "k2.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + ) + .is_err()); + + assert!(AsymmetricSecretKey::<V4>::try_from("k4.secret.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8c5WpIyC_5kWKhS8VEYSZ05dYfuTF-ZdQFV4D9vLTcNQ").is_ok()); + assert!(AsymmetricSecretKey::<V4>::try_from("k2.secret.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8c5WpIyC_5kWKhS8VEYSZ05dYfuTF-ZdQFV4D9vLTcNQ").is_err()); + assert!(AsymmetricSecretKey::<V4>::try_from("k4.local.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8c5WpIyC_5kWKhS8VEYSZ05dYfuTF-ZdQFV4D9vLTcNQ").is_err()); + assert!(AsymmetricSecretKey::<V4>::try_from("k2.local.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8c5WpIyC_5kWKhS8VEYSZ05dYfuTF-ZdQFV4D9vLTcNQ").is_err()); + } + } + + #[test] + #[cfg(all(feature = "v4", feature = "v3"))] + fn test_partial_eq_id() { + use crate::keys::{AsymmetricKeyPair, Generate}; + + let kpv4 = AsymmetricKeyPair::<V4>::generate().unwrap(); + assert_eq!(Id::from(&kpv4.secret), Id::from(&kpv4.secret)); + assert_ne!(Id::from(&kpv4.secret), Id::from(&kpv4.public)); + let kpv3 = AsymmetricKeyPair::<V3>::generate().unwrap(); + assert_ne!(Id::from(&kpv4.secret), Id::from(&kpv3.secret)); + } + + #[test] + #[cfg(feature = "v4")] + fn test_validate_paserk_string() { + assert!(validate_paserk_string("k4.public", "k4", "public", V4::PUBLIC_KEY).is_err()); + assert!( + validate_paserk_string("k4.public.public.public", "k4", "public", V4::PUBLIC_KEY) + .is_err() + ); + let too_long = format!( + "k4.public.{}", + encode_b64([0u8; V4::PUBLIC_KEY * 2]).unwrap() + ); + assert!(validate_paserk_string(&too_long, "k4", "public", V4::PUBLIC_KEY).is_err()); + } +} diff --git a/vendor/pasetors/src/serde.rs b/vendor/pasetors/src/serde.rs new file mode 100644 index 000000000..92eb5fe89 --- /dev/null +++ b/vendor/pasetors/src/serde.rs @@ -0,0 +1,133 @@ +use crate::keys::{AsymmetricPublicKey, AsymmetricSecretKey, SymmetricKey}; +#[cfg(feature = "paserk")] +use crate::paserk::{FormatAsPaserk, Id}; +use alloc::string::String; +use core::convert::TryFrom; + +#[cfg(all(feature = "paserk", feature = "serde"))] +#[cfg_attr(docsrs, doc(cfg(all(feature = "paserk", feature = "serde"))))] +impl<V> serde::Serialize for AsymmetricPublicKey<V> +where + AsymmetricPublicKey<V>: FormatAsPaserk, +{ + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> + where + S: serde::Serializer, + { + use serde::ser::Error; + let mut paserk_string = String::new(); + self.fmt(&mut paserk_string).map_err(S::Error::custom)?; + serializer.serialize_str(&paserk_string) + } +} + +#[cfg(all(feature = "serde", feature = "std"))] +#[cfg_attr(docsrs, doc(cfg(all(feature = "serde", feature = "std"))))] +impl<'de, V> serde::Deserialize<'de> for AsymmetricPublicKey<V> +where + AsymmetricPublicKey<V>: TryFrom<&'de str>, + <AsymmetricPublicKey<V> as TryFrom<&'de str>>::Error: std::fmt::Display, +{ + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> + where + D: serde::Deserializer<'de>, + { + let paserk_string = <&str>::deserialize(deserializer)?; + TryFrom::try_from(paserk_string).map_err(serde::de::Error::custom) + } +} + +#[cfg(all(feature = "paserk", feature = "serde"))] +#[cfg_attr(docsrs, doc(cfg(all(feature = "paserk", feature = "serde"))))] +impl<V> serde::Serialize for AsymmetricSecretKey<V> +where + AsymmetricSecretKey<V>: FormatAsPaserk, +{ + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> + where + S: serde::Serializer, + { + use serde::ser::Error; + let mut paserk_string = String::new(); + self.fmt(&mut paserk_string).map_err(S::Error::custom)?; + serializer.serialize_str(&paserk_string) + } +} + +#[cfg(all(feature = "serde", feature = "std"))] +#[cfg_attr(docsrs, doc(cfg(all(feature = "serde", feature = "std"))))] +impl<'de, V> serde::Deserialize<'de> for AsymmetricSecretKey<V> +where + AsymmetricSecretKey<V>: TryFrom<&'de str>, + <AsymmetricSecretKey<V> as TryFrom<&'de str>>::Error: std::fmt::Display, +{ + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> + where + D: serde::Deserializer<'de>, + { + let paserk_string = <&str>::deserialize(deserializer)?; + TryFrom::try_from(paserk_string).map_err(serde::de::Error::custom) + } +} + +#[cfg(all(feature = "paserk", feature = "serde"))] +#[cfg_attr(docsrs, doc(cfg(all(feature = "paserk", feature = "serde"))))] +impl<V> serde::Serialize for SymmetricKey<V> +where + SymmetricKey<V>: FormatAsPaserk, +{ + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> + where + S: serde::Serializer, + { + use serde::ser::Error; + let mut paserk_string = String::new(); + self.fmt(&mut paserk_string).map_err(S::Error::custom)?; + serializer.serialize_str(&paserk_string) + } +} + +#[cfg(all(feature = "serde", feature = "std"))] +#[cfg_attr(docsrs, doc(cfg(all(feature = "serde", feature = "std"))))] +impl<'de, V> serde::Deserialize<'de> for SymmetricKey<V> +where + SymmetricKey<V>: TryFrom<&'de str>, + <SymmetricKey<V> as TryFrom<&'de str>>::Error: std::fmt::Display, +{ + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> + where + D: serde::Deserializer<'de>, + { + let paserk_string = <&str>::deserialize(deserializer)?; + TryFrom::try_from(paserk_string).map_err(serde::de::Error::custom) + } +} + +#[cfg(all(feature = "paserk", feature = "serde"))] +#[cfg_attr(docsrs, doc(cfg(all(feature = "paserk", feature = "serde"))))] +impl serde::Serialize for Id { + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> + where + S: serde::Serializer, + { + use serde::ser::Error; + let mut paserk_id = String::new(); + self.fmt(&mut paserk_id).map_err(S::Error::custom)?; + serializer.serialize_str(&paserk_id) + } +} + +#[cfg(all(feature = "paserk", feature = "serde", feature = "std"))] +#[cfg_attr( + docsrs, + doc(cfg(all(feature = "paserk", feature = "serde", feature = "std"))) +)] +impl<'de> serde::Deserialize<'de> for Id { + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> + where + D: serde::Deserializer<'de>, + { + let paserk_id = <&str>::deserialize(deserializer)?; + TryFrom::try_from(paserk_id).map_err(serde::de::Error::custom) + } +} diff --git a/vendor/pasetors/src/token.rs b/vendor/pasetors/src/token.rs new file mode 100644 index 000000000..ae3368036 --- /dev/null +++ b/vendor/pasetors/src/token.rs @@ -0,0 +1,656 @@ +use crate::alloc::string::ToString; +#[cfg(feature = "std")] +use crate::claims::Claims; +use crate::common; +use crate::errors::Error; +#[cfg(feature = "std")] +use crate::footer::Footer; +use crate::token::private::Purpose; +use crate::version::private::Version; +use alloc::string::String; +use alloc::vec::Vec; +use core::convert::TryFrom; +use core::marker::PhantomData; + +pub(crate) mod private { + use super::Error; + use crate::version::private::Version; + + // Inside private module to prevent users from implementing this themself. + + /// Purpose (`local`/`public`) of a token, given a version `V`. + pub trait Purpose<V: Version> { + /// Validate the header for a given version and purpose for some token. + fn validate_header(token: &str) -> Result<(), Error>; + /// Validate the tokens raw (decoded base64) + /// message length for a given version and purpose for some token. + fn validate_token_message_len(message: &[u8]) -> Result<(), Error>; + /// Parse the raw payload of a token. Either the ciphertext or the message that was signed. + /// The length **MUST** have been verified beforehand. + fn parse_raw_payload(message: &[u8]) -> &[u8]; + } +} + +#[derive(Debug, PartialEq, Eq, Clone)] +/// A public token. +pub struct Public; + +#[derive(Debug, PartialEq, Eq, Clone)] +/// A local token. +pub struct Local; + +impl<V: Version> Purpose<V> for Public { + fn validate_header(token: &str) -> Result<(), Error> { + if token.is_empty() || !token.starts_with(V::PUBLIC_HEADER) { + return Err(Error::TokenFormat); + } + + Ok(()) + } + + fn validate_token_message_len(message: &[u8]) -> Result<(), Error> { + if message.len() <= V::PUBLIC_SIG { + // Empty payload encrypted. Disallowed by PASETO + return Err(Error::TokenFormat); + } + + Ok(()) + } + + fn parse_raw_payload(message: &[u8]) -> &[u8] { + debug_assert!(message.len() > V::PUBLIC_SIG); + &message[..message.len() - V::PUBLIC_SIG] + } +} + +impl<V: Version> Purpose<V> for Local { + fn validate_header(token: &str) -> Result<(), Error> { + if token.is_empty() || !token.starts_with(V::LOCAL_HEADER) { + return Err(Error::TokenFormat); + } + + Ok(()) + } + + fn validate_token_message_len(message: &[u8]) -> Result<(), Error> { + if message.len() <= V::LOCAL_NONCE + V::LOCAL_TAG { + // Empty payload encrypted. Disallowed by PASETO + return Err(Error::TokenFormat); + } + + Ok(()) + } + + fn parse_raw_payload(message: &[u8]) -> &[u8] { + debug_assert!(message.len() > V::LOCAL_TAG + V::LOCAL_NONCE); + &message[V::LOCAL_NONCE..message.len() - V::LOCAL_TAG] + } +} + +#[derive(Clone, Debug, Eq, PartialEq)] +/// A [`TrustedToken`] is returned by either a `verify()` or `decrypt()` operation and represents +/// a validated token. +/// +/// It represents a authenticated and non-tampered token. It **does not** validate additional things, +/// such as claims that may be within the token payload itself. These must still be validated separately. +/// +/// However, using the [`crate::public`] and [`crate::local`] API will automatically handle claims +/// validation. Any validated claims may be retrieved with [`TrustedToken::payload_claims()`]. +pub struct TrustedToken { + header: String, + // PASETO requires the payload to be valid JSON in UTF-8, so we say String for UTF-8. + payload: String, + #[cfg(feature = "std")] + // If std is available, we also keep claims as JSON. + payload_claims: Option<Claims>, + footer: Vec<u8>, + implicit_assert: Vec<u8>, +} + +impl TrustedToken { + pub(crate) fn _new( + header: &str, + payload: &[u8], + footer: &[u8], + implicit_assert: &[u8], + ) -> Result<Self, Error> { + Ok(Self { + header: header.to_string(), + payload: String::from_utf8(payload.to_vec()).map_err(|_| Error::PayloadInvalidUtf8)?, + #[cfg(feature = "std")] + payload_claims: None, + footer: footer.to_vec(), + implicit_assert: implicit_assert.to_vec(), + }) + } + + /// Get the header that is used for this token. + pub fn header(&self) -> &str { + &self.header + } + + /// Get the payload that is used for this token. + pub fn payload(&self) -> &str { + &self.payload + } + + #[cfg(feature = "std")] + #[cfg_attr(docsrs, doc(cfg(feature = "std")))] + /// Return the optional and validated [`Claims`] parsed from the tokens payload. + /// + /// - `None`: If no [`Claims`] have been parsed or validated. + /// - `Some`: If some [`Claims`] have been parsed **AND** validated. + /// + /// [`Claims`]: crate::claims::Claims + pub fn payload_claims(&self) -> Option<&Claims> { + debug_assert!(self.payload_claims.is_some()); + match &self.payload_claims { + Some(claims) => Some(claims), + None => None, + } + } + + #[cfg(feature = "std")] + /// Set the payload claims **AFTER HAVING VALIDATED THEM**. + pub(crate) fn set_payload_claims(&mut self, claims: Claims) { + self.payload_claims = Some(claims); + } + + /// Get the footer used to create the token. + /// + /// Empty if `None` was used during creation. + pub fn footer(&self) -> &[u8] { + &self.footer + } + + /// Get the implicit assertion used to create the token. + /// + /// Empty if `None` was used during creation. + /// If token was created using `V2`, then it will always be empty. + pub fn implicit_assert(&self) -> &[u8] { + &self.implicit_assert + } +} + +#[cfg(feature = "std")] +impl TryFrom<&TrustedToken> for Footer { + type Error = Error; + + fn try_from(value: &TrustedToken) -> Result<Self, Self::Error> { + if value.footer.is_empty() { + return Err(Error::FooterParsing); + } + + let mut footer = Footer::new(); + footer.parse_bytes(value.footer())?; + + Ok(footer) + } +} + +#[derive(Clone, Debug, PartialEq, Eq)] +/// [`UntrustedToken`] can parse PASETO tokens in order to extract individual parts of it. +/// +/// A use-case for this would be parsing the tokens footer, if this is not known before receiving it. Then, +/// the footer can be used during verification/decryption of the token itself. +/// +/// This type should only be used in order to verify the validity of a token. +/// +/// __WARNING__: Anything returned by this type should be treated as **UNTRUSTED** until the token +/// has been verified. +pub struct UntrustedToken<T, V> { + message: Vec<u8>, + footer: Vec<u8>, + phantom_t: PhantomData<T>, + phantom_v: PhantomData<V>, +} + +impl<T: Purpose<V>, V: Version> TryFrom<&str> for UntrustedToken<T, V> { + type Error = Error; + + /// This fails if `value` is not a PASETO token or it has invalid base64 encoding. + fn try_from(value: &str) -> Result<Self, Self::Error> { + T::validate_header(value)?; + + let parts_split = value.split('.').collect::<Vec<&str>>(); + if parts_split.len() < 3 || parts_split.len() > 4 { + return Err(Error::TokenFormat); + } + if parts_split[2].is_empty() { + // Empty payload entirely + return Err(Error::TokenFormat); + } + + let m_raw = common::decode_b64(parts_split[2])?; + T::validate_token_message_len(&m_raw)?; + let is_footer_present = parts_split.len() == 4; + + Ok(Self { + message: m_raw, + footer: { + if is_footer_present { + common::decode_b64(parts_split[3])? + } else { + Vec::<u8>::new() + } + }, + phantom_t: PhantomData, + phantom_v: PhantomData, + }) + } +} + +impl<T: Purpose<V>, V: Version> TryFrom<&String> for UntrustedToken<T, V> { + type Error = Error; + + /// This fails if `value` is not a PASETO token or it has invalid base64 encoding. + fn try_from(value: &String) -> Result<Self, Self::Error> { + Self::try_from(value.as_str()) + } +} + +impl<T: Purpose<V>, V: Version> UntrustedToken<T, V> { + /// Return untrusted message of this [`UntrustedToken`]. + /// If it is a [`Local`] token, this is the encrypted message with nonce and tag. + /// If it is a [`Public`] token, the signature is included. + pub fn untrusted_message(&self) -> &[u8] { + &self.message + } + + /// Return untrusted payload only of this [`UntrustedToken`]'s message body. + /// If it is a [`Local`] token, this is the encrypted message sans nonce and tag. + /// If it is a [`Public`] token, the signature is not included. + pub fn untrusted_payload(&self) -> &[u8] { + T::parse_raw_payload(self.untrusted_message()) + } + + /// Return untrusted footer of this [`UntrustedToken`]. + /// Empty if there was no footer in the token. + pub fn untrusted_footer(&self) -> &[u8] { + &self.footer + } +} + +#[cfg(test)] +#[cfg(all(feature = "v2", feature = "v3", feature = "v4"))] +mod tests_untrusted { + use super::*; + use crate::common::encode_b64; + use crate::errors::Error; + use crate::version::private::Version; + use crate::{version2::V2, version3::V3, version4::V4}; + + const V2_PUBLIC_TOKEN: &str = "v2.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAxOS0wMS0wMVQwMDowMDowMCswMDowMCJ9flsZsx_gYCR0N_Ec2QxJFFpvQAs7h9HtKwbVK2n1MJ3Rz-hwe8KUqjnd8FAnIJZ601tp7lGkguU63oGbomhoBw.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + const V2_LOCAL_TOKEN: &str = "v2.local.5K4SCXNhItIhyNuVIZcwrdtaDKiyF81-eWHScuE0idiVqCo72bbjo07W05mqQkhLZdVbxEa5I_u5sgVk1QLkcWEcOSlLHwNpCkvmGGlbCdNExn6Qclw3qTKIIl5-zSLIrxZqOLwcFLYbVK1SrQ.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + const V3_PUBLIC_TOKEN: &str = "v3.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9ZWrbGZ6L0MDK72skosUaS0Dz7wJ_2bMcM6tOxFuCasO9GhwHrvvchqgXQNLQQyWzGC2wkr-VKII71AvkLpC8tJOrzJV1cap9NRwoFzbcXjzMZyxQ0wkshxZxx8ImmNWP.eyJraWQiOiJkWWtJU3lseFFlZWNFY0hFTGZ6Rjg4VVpyd2JMb2xOaUNkcHpVSEd3OVVxbiJ9"; + const V4_PUBLIC_TOKEN: &str = "v4.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9v3Jt8mx_TdM2ceTGoqwrh4yDFn0XsHvvV_D0DtwQxVrJEBMl0F2caAdgnpKlt4p7xBnx1HcO-SPo8FPp214HDw.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + const V4_LOCAL_TOKEN: &str = "v4.local.32VIErrEkmY4JVILovbmfPXKW9wT1OdQepjMTC_MOtjA4kiqw7_tcaOM5GNEcnTxl60WkwMsYXw6FSNb_UdJPXjpzm0KW9ojM5f4O2mRvE2IcweP-PRdoHjd5-RHCiExR1IK6t4x-RMNXtQNbz7FvFZ_G-lFpk5RG3EOrwDL6CgDqcerSQ.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + + const TOKEN_LIST: [&str; 5] = [ + V2_PUBLIC_TOKEN, + V2_LOCAL_TOKEN, + V3_PUBLIC_TOKEN, + V4_LOCAL_TOKEN, + V4_PUBLIC_TOKEN, + ]; + + fn test_untrusted_parse_fails(invalid: &str, expected_err: Error) { + if invalid.starts_with(V2::LOCAL_HEADER) { + assert_eq!( + UntrustedToken::<Local, V2>::try_from(invalid).unwrap_err(), + expected_err + ); + } + if invalid.starts_with(V2::PUBLIC_HEADER) { + assert_eq!( + UntrustedToken::<Public, V2>::try_from(invalid).unwrap_err(), + expected_err + ); + } + if invalid.starts_with(V3::LOCAL_HEADER) { + assert_eq!( + UntrustedToken::<Local, V3>::try_from(invalid).unwrap_err(), + expected_err + ); + } + if invalid.starts_with(V3::PUBLIC_HEADER) { + assert_eq!( + UntrustedToken::<Public, V3>::try_from(invalid).unwrap_err(), + expected_err + ); + } + if invalid.starts_with(V4::LOCAL_HEADER) { + assert_eq!( + UntrustedToken::<Local, V4>::try_from(invalid).unwrap_err(), + expected_err + ); + } + if invalid.starts_with(V4::PUBLIC_HEADER) { + assert_eq!( + UntrustedToken::<Public, V4>::try_from(invalid).unwrap_err(), + expected_err + ); + } + } + + #[test] + fn empty_string() { + assert_eq!( + UntrustedToken::<Local, V2>::try_from("").unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Public, V2>::try_from("").unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Local, V3>::try_from("").unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Public, V3>::try_from("").unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Local, V4>::try_from("").unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Public, V4>::try_from("").unwrap_err(), + Error::TokenFormat + ); + } + + #[test] + fn no_separators() { + for token in TOKEN_LIST { + let split = token.split('.').collect::<Vec<&str>>(); + let invalid: String = split.iter().copied().collect(); + + test_untrusted_parse_fails(&invalid, Error::TokenFormat); + } + } + + #[test] + // NOTE: See https://github.com/paseto-standard/paseto-spec/issues/17 + fn missing_payload() { + for token in TOKEN_LIST { + let split = token.split('.').collect::<Vec<&str>>(); + let invalid: String = format!("{}.{}..{}", split[0], split[1], split[3]); + + test_untrusted_parse_fails(&invalid, Error::TokenFormat); + } + } + + #[test] + fn payload_too_short() { + for token in TOKEN_LIST { + let split = token.split('.').collect::<Vec<&str>>(); + let invalid: String = format!( + "{}.{}.{}.{}", + split[0], + split[1], + encode_b64(split[0].as_bytes()).unwrap(), + split[3] + ); + + test_untrusted_parse_fails(&invalid, Error::TokenFormat); + } + } + + #[test] + fn extra_after_footer() { + for token in TOKEN_LIST { + let mut invalid = token.to_string(); + invalid.push_str(".shouldNotBeHere"); + + test_untrusted_parse_fails(&invalid, Error::TokenFormat); + } + } + + #[test] + fn invalid_header() { + // Invalid version + assert_eq!( + UntrustedToken::<Public, V2>::try_from(&V2_PUBLIC_TOKEN.replace("v2", "v4")) + .unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Local, V2>::try_from(&V2_LOCAL_TOKEN.replace("v2", "v4")).unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Public, V3>::try_from(&V3_PUBLIC_TOKEN.replace("v3", "v2")) + .unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Local, V4>::try_from(&V4_LOCAL_TOKEN.replace("v4", "v2")).unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Public, V4>::try_from(&V4_PUBLIC_TOKEN.replace("v4", "v2")) + .unwrap_err(), + Error::TokenFormat + ); + + // Invalid purpose + assert_eq!( + UntrustedToken::<Public, V2>::try_from(&V2_PUBLIC_TOKEN.replace("public", "local")) + .unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Local, V2>::try_from(&V2_LOCAL_TOKEN.replace("local", "public")) + .unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Public, V3>::try_from(&V3_PUBLIC_TOKEN.replace("public", "local")) + .unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Local, V4>::try_from(&V4_LOCAL_TOKEN.replace("local", "public")) + .unwrap_err(), + Error::TokenFormat + ); + assert_eq!( + UntrustedToken::<Public, V4>::try_from(&V4_PUBLIC_TOKEN.replace("public", "local")) + .unwrap_err(), + Error::TokenFormat + ); + } + + #[test] + fn invalid_base64() { + for token in TOKEN_LIST { + let split = token.split('.').collect::<Vec<&str>>(); + + let invalid: String = format!("{}.{}.{}!.{}", split[0], split[1], split[2], split[3]); + test_untrusted_parse_fails(&invalid, Error::Base64); + + let invalid: String = format!("{}.{}.{}.{}!", split[0], split[1], split[2], split[3]); + test_untrusted_parse_fails(&invalid, Error::Base64); + } + } + + #[cfg(feature = "v2")] + #[test] + fn valid_v2_local() { + // "2-E-1" + let valid_no_footer = "v2.local.97TTOvgwIxNGvV80XKiGZg_kD3tsXM_-qB4dZGHOeN1cTkgQ4PnW8888l802W8d9AvEGnoNBY3BnqHORy8a5cC8aKpbA0En8XELw2yDk2f1sVODyfnDbi6rEGMY3pSfCbLWMM2oHJxvlEl2XbQ"; + // "2-E-5" + let valid_with_footer = "v2.local.5K4SCXNhItIhyNuVIZcwrdtaDKiyF81-eWHScuE0idiVqCo72bbjo07W05mqQkhLZdVbxEa5I_u5sgVk1QLkcWEcOSlLHwNpCkvmGGlbCdNExn6Qclw3qTKIIl5-zSLIrxZqOLwcFLYbVK1SrQ.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + + let untrusted_no_footer = UntrustedToken::<Local, V2>::try_from(valid_no_footer).unwrap(); + let untrusted_with_footer = + UntrustedToken::<Local, V2>::try_from(valid_with_footer).unwrap(); + + // Note: We don't test for untrusted message, since it is encrypted. + assert_eq!(untrusted_no_footer.untrusted_footer(), &[0u8; 0]); + assert_eq!( + untrusted_with_footer.untrusted_footer(), + "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}".as_bytes() + ); + } + + #[cfg(feature = "v2")] + #[test] + fn valid_v2_public() { + // "2-S-1" + let valid_no_footer = "v2.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAxOS0wMS0wMVQwMDowMDowMCswMDowMCJ9HQr8URrGntTu7Dz9J2IF23d1M7-9lH9xiqdGyJNvzp4angPW5Esc7C5huy_M8I8_DjJK2ZXC2SUYuOFM-Q_5Cw"; + // "2-S-2" + let valid_with_footer = "v2.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAxOS0wMS0wMVQwMDowMDowMCswMDowMCJ9flsZsx_gYCR0N_Ec2QxJFFpvQAs7h9HtKwbVK2n1MJ3Rz-hwe8KUqjnd8FAnIJZ601tp7lGkguU63oGbomhoBw.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + + let untrusted_no_footer = UntrustedToken::<Public, V2>::try_from(valid_no_footer).unwrap(); + let untrusted_with_footer = + UntrustedToken::<Public, V2>::try_from(valid_with_footer).unwrap(); + + assert_eq!( + untrusted_no_footer.untrusted_payload(), + "{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}" + .as_bytes() + ); + assert_eq!(untrusted_no_footer.untrusted_footer(), &[0u8; 0]); + + assert_eq!( + untrusted_with_footer.untrusted_payload(), + "{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}" + .as_bytes() + ); + assert_eq!( + untrusted_with_footer.untrusted_footer(), + "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}".as_bytes() + ); + } + + #[cfg(feature = "v3")] + #[test] + fn valid_v3_public() { + // "3-S-1" + let valid_no_footer = "v3.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9qqEwwrKHKi5lJ7b9MBKc0G4MGZy0ptUiMv3lAUAaz-JY_zjoqBSIxMxhfAoeNYiSyvfUErj76KOPWm1OeNnBPkTSespeSXDGaDfxeIrl3bRrPEIy7tLwLAIsRzsXkfph"; + // "3-S-2" + let valid_with_footer = "v3.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9ZWrbGZ6L0MDK72skosUaS0Dz7wJ_2bMcM6tOxFuCasO9GhwHrvvchqgXQNLQQyWzGC2wkr-VKII71AvkLpC8tJOrzJV1cap9NRwoFzbcXjzMZyxQ0wkshxZxx8ImmNWP.eyJraWQiOiJkWWtJU3lseFFlZWNFY0hFTGZ6Rjg4VVpyd2JMb2xOaUNkcHpVSEd3OVVxbiJ9"; + + let untrusted_no_footer = UntrustedToken::<Public, V3>::try_from(valid_no_footer).unwrap(); + let untrusted_with_footer = + UntrustedToken::<Public, V3>::try_from(valid_with_footer).unwrap(); + + assert_eq!( + untrusted_no_footer.untrusted_payload(), + "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}" + .as_bytes() + ); + assert_eq!(untrusted_no_footer.untrusted_footer(), &[0u8; 0]); + + assert_eq!( + untrusted_with_footer.untrusted_payload(), + "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}" + .as_bytes() + ); + assert_eq!( + untrusted_with_footer.untrusted_footer(), + "{\"kid\":\"dYkISylxQeecEcHELfzF88UZrwbLolNiCdpzUHGw9Uqn\"}".as_bytes() + ); + } + + #[cfg(feature = "v4")] + #[test] + fn valid_v4_public() { + // "4-S-1" + let valid_no_footer = "v4.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9bg_XBBzds8lTZShVlwwKSgeKpLT3yukTw6JUz3W4h_ExsQV-P0V54zemZDcAxFaSeef1QlXEFtkqxT1ciiQEDA"; + // "4-S-2" + let valid_with_footer = "v4.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9v3Jt8mx_TdM2ceTGoqwrh4yDFn0XsHvvV_D0DtwQxVrJEBMl0F2caAdgnpKlt4p7xBnx1HcO-SPo8FPp214HDw.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + + let untrusted_no_footer = UntrustedToken::<Public, V4>::try_from(valid_no_footer).unwrap(); + let untrusted_with_footer = + UntrustedToken::<Public, V4>::try_from(valid_with_footer).unwrap(); + + assert_eq!( + untrusted_no_footer.untrusted_payload(), + "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}" + .as_bytes() + ); + assert_eq!(untrusted_no_footer.untrusted_footer(), &[0u8; 0]); + + assert_eq!( + untrusted_with_footer.untrusted_payload(), + "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}" + .as_bytes() + ); + assert_eq!( + untrusted_with_footer.untrusted_footer(), + "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}".as_bytes() + ); + } + + #[cfg(feature = "v4")] + #[test] + fn valid_v4_local() { + // "4-E-1" + let valid_no_footer = "v4.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAr68PS4AXe7If_ZgesdkUMvSwscFlAl1pk5HC0e8kApeaqMfGo_7OpBnwJOAbY9V7WU6abu74MmcUE8YWAiaArVI8XJ5hOb_4v9RmDkneN0S92dx0OW4pgy7omxgf3S8c3LlQg"; + // "4-E-5" + let valid_with_footer = "v4.local.32VIErrEkmY4JVILovbmfPXKW9wT1OdQepjMTC_MOtjA4kiqw7_tcaOM5GNEcnTxl60WkwMsYXw6FSNb_UdJPXjpzm0KW9ojM5f4O2mRvE2IcweP-PRdoHjd5-RHCiExR1IK6t4x-RMNXtQNbz7FvFZ_G-lFpk5RG3EOrwDL6CgDqcerSQ.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + + let untrusted_no_footer = UntrustedToken::<Local, V4>::try_from(valid_no_footer).unwrap(); + let untrusted_with_footer = + UntrustedToken::<Local, V4>::try_from(valid_with_footer).unwrap(); + + // Note: We don't test for untrusted message, since it is encrypted. + assert_eq!(untrusted_no_footer.untrusted_footer(), &[0u8; 0]); + assert_eq!( + untrusted_with_footer.untrusted_footer(), + "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}".as_bytes() + ); + } + + #[test] + fn local_token_nonce_tag_no_payload_v4() { + assert!(UntrustedToken::<Local, V4>::try_from( + "v4.local.444444bbbbb444444444bbb444444bbb44444444444444888888888888888cJJbbb44444444", + ) + .is_err()); + } + + #[test] + fn local_token_nonce_tag_no_payload_v3() { + assert!(UntrustedToken::<Public, V3>::try_from( + "v3.local.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo", + ).is_err()); + } + + #[test] + fn test_get_footer_from_trusted() { + let mut footer = Footer::default(); + footer.add_additional("t", "v").unwrap(); + let mut tt = TrustedToken::_new( + "v3.local.", + b"test msg", + footer.to_string().unwrap().as_bytes(), + b"", + ) + .unwrap(); + assert!(Footer::try_from(&tt).is_ok()); + tt.footer = Vec::<u8>::new(); + assert!(Footer::try_from(&tt).is_err()); + } + + #[test] + fn test_trusted_claims() { + let mut footer = Footer::default(); + footer.add_additional("t", "v").unwrap(); + let mut tt = TrustedToken::_new( + "v3.local.", + b"test msg", + footer.to_string().unwrap().as_bytes(), + b"", + ) + .unwrap(); + let claims = Claims::new().unwrap(); + tt.set_payload_claims(claims.clone()); + + assert_eq!(tt.payload_claims.unwrap(), claims); + } +} diff --git a/vendor/pasetors/src/version.rs b/vendor/pasetors/src/version.rs new file mode 100644 index 000000000..6e5962c6a --- /dev/null +++ b/vendor/pasetors/src/version.rs @@ -0,0 +1,37 @@ +use crate::errors::Error; + +pub(crate) mod private { + use super::Error; + + // Inside private module to prevent users from implementing this themself. + + /// A given version must implement validation logic in terms of both itself and the kind of key. + pub trait Version { + /// Size for a `local` key. + const LOCAL_KEY: usize; + /// Size for a secret `public` key. + const SECRET_KEY: usize; + /// Size for a public `public` key. + const PUBLIC_KEY: usize; + /// Size of the signature for a public token. + const PUBLIC_SIG: usize; + /// Size of the nonce for a local token. + const LOCAL_NONCE: usize; + /// Size of the authentication tag for a local token. + const LOCAL_TAG: usize; + /// Header for a public token for this version. + const PUBLIC_HEADER: &'static str; + /// Header for a local token for this version. + const LOCAL_HEADER: &'static str; + /// Size of a PASERK ID. + #[cfg(feature = "paserk")] + const PASERK_ID: usize; + + /// Validate bytes for a `local` key of a given version. + fn validate_local_key(key_bytes: &[u8]) -> Result<(), Error>; + /// Validate bytes for a secret `public` key of a given version. + fn validate_secret_key(key_bytes: &[u8]) -> Result<(), Error>; + /// Validate bytes for a public `local` key of a given version. + fn validate_public_key(key_bytes: &[u8]) -> Result<(), Error>; + } +} diff --git a/vendor/pasetors/src/version2.rs b/vendor/pasetors/src/version2.rs new file mode 100644 index 000000000..f2a5c9a75 --- /dev/null +++ b/vendor/pasetors/src/version2.rs @@ -0,0 +1,828 @@ +#![cfg_attr(docsrs, doc(cfg(feature = "v2")))] + +use crate::common::{encode_b64, validate_footer_untrusted_token}; +use crate::errors::Error; +use crate::keys::{ + AsymmetricKeyPair, AsymmetricPublicKey, AsymmetricSecretKey, Generate, SymmetricKey, +}; +use crate::pae; +use crate::token::{Local, Public, TrustedToken, UntrustedToken}; +use crate::version::private::Version; +use alloc::string::String; +use alloc::vec::Vec; +use core::convert::TryFrom; +use core::marker::PhantomData; +use ed25519_compact::{KeyPair, PublicKey, SecretKey as SigningKey, Seed, Signature}; +use orion::hazardous::aead::xchacha20poly1305::*; +use orion::hazardous::mac::blake2b; +use orion::hazardous::mac::poly1305::POLY1305_OUTSIZE; +use orion::hazardous::stream::xchacha20::XCHACHA_NONCESIZE; +use subtle::ConstantTimeEq; + +#[derive(Debug, PartialEq, Eq, Clone)] +/// Version 2 of the PASETO spec. +pub struct V2; + +impl Version for V2 { + const LOCAL_KEY: usize = 32; + const SECRET_KEY: usize = 32 + Self::PUBLIC_KEY; // Seed || PK + const PUBLIC_KEY: usize = 32; + const PUBLIC_SIG: usize = 64; + const LOCAL_NONCE: usize = 24; + const LOCAL_TAG: usize = 16; + const PUBLIC_HEADER: &'static str = "v2.public."; + const LOCAL_HEADER: &'static str = "v2.local."; + #[cfg(feature = "paserk")] + const PASERK_ID: usize = 44; + + fn validate_local_key(key_bytes: &[u8]) -> Result<(), Error> { + if key_bytes.len() != Self::LOCAL_KEY { + return Err(Error::Key); + } + + Ok(()) + } + + fn validate_secret_key(key_bytes: &[u8]) -> Result<(), Error> { + if key_bytes.len() != Self::SECRET_KEY { + return Err(Error::Key); + } + + let seed = Seed::from_slice(&key_bytes[..32]).map_err(|_| Error::Key)?; + let kp = KeyPair::from_seed(seed); + + if !bool::from(kp.pk.as_slice().ct_eq(&key_bytes[32..])) { + return Err(Error::Key); + } + + Ok(()) + } + + fn validate_public_key(key_bytes: &[u8]) -> Result<(), Error> { + if key_bytes.len() != Self::PUBLIC_KEY { + return Err(Error::Key); + } + + Ok(()) + } +} + +impl TryFrom<&AsymmetricSecretKey<V2>> for AsymmetricPublicKey<V2> { + type Error = Error; + + fn try_from(value: &AsymmetricSecretKey<V2>) -> Result<Self, Self::Error> { + AsymmetricPublicKey::<V2>::from(&value.as_bytes()[32..]) + } +} + +impl Generate<AsymmetricKeyPair<V2>, V2> for AsymmetricKeyPair<V2> { + fn generate() -> Result<AsymmetricKeyPair<V2>, Error> { + let key_pair = KeyPair::generate(); + + let secret = AsymmetricSecretKey::<V2>::from(key_pair.sk.as_ref()) + .map_err(|_| Error::KeyGeneration)?; + let public = AsymmetricPublicKey::<V2>::from(key_pair.pk.as_ref()) + .map_err(|_| Error::KeyGeneration)?; + + Ok(Self { public, secret }) + } +} + +impl Generate<SymmetricKey<V2>, V2> for SymmetricKey<V2> { + fn generate() -> Result<SymmetricKey<V2>, Error> { + let mut rng_bytes = vec![0u8; V2::LOCAL_KEY]; + V2::validate_local_key(&rng_bytes)?; + getrandom::getrandom(&mut rng_bytes)?; + + Ok(Self { + bytes: rng_bytes, + phantom: PhantomData, + }) + } +} + +/// PASETO v2 public tokens. +pub struct PublicToken; + +impl PublicToken { + /// The header and purpose for the public token: `v2.public.`. + pub const HEADER: &'static str = "v2.public."; + + /// Create a public token. + pub fn sign( + secret_key: &AsymmetricSecretKey<V2>, + message: &[u8], + footer: Option<&[u8]>, + ) -> Result<String, Error> { + if message.is_empty() { + return Err(Error::EmptyPayload); + } + + let sk = SigningKey::from_slice(secret_key.as_bytes()).map_err(|_| Error::Key)?; + let f = footer.unwrap_or(&[]); + let m2 = pae::pae(&[Self::HEADER.as_bytes(), message, f])?; + let sig = sk.sign(m2, None); + + let mut m_sig: Vec<u8> = Vec::from(message); + m_sig.extend_from_slice(sig.as_ref()); + + let token_no_footer = format!("{}{}", Self::HEADER, encode_b64(m_sig)?); + + if f.is_empty() { + Ok(token_no_footer) + } else { + Ok(format!("{}.{}", token_no_footer, encode_b64(f)?)) + } + } + + /// Verify a public token. + /// + /// If `footer.is_none()`, then it will be validated but not compared to a known value. + /// If `footer.is_some()`, then it will be validated AND compared to the known value. + pub fn verify( + public_key: &AsymmetricPublicKey<V2>, + token: &UntrustedToken<Public, V2>, + footer: Option<&[u8]>, + ) -> Result<TrustedToken, Error> { + validate_footer_untrusted_token(token, footer)?; + + let f = token.untrusted_footer(); + let sm = token.untrusted_message(); + let m = token.untrusted_payload(); + let s = sm[m.len()..m.len() + V2::PUBLIC_SIG].as_ref(); + + let m2 = pae::pae(&[Self::HEADER.as_bytes(), m, f])?; + let pk: PublicKey = PublicKey::from_slice(public_key.as_bytes()).map_err(|_| Error::Key)?; + + debug_assert!(s.len() == V2::PUBLIC_SIG); + // If the below fails, it is an invalid signature. + let sig = Signature::from_slice(s).map_err(|_| Error::TokenValidation)?; + + if pk.verify(m2, &sig).is_ok() { + TrustedToken::_new(Self::HEADER, m, f, &[]) + } else { + Err(Error::TokenValidation) + } + } +} + +/// PASETO v2 local tokens. +pub struct LocalToken; + +impl LocalToken { + /// The header and purpose for the local token: `v2.local.`. + pub const HEADER: &'static str = "v2.local."; + + /// Encrypt and authenticate a message using nonce_key_bytes to derive a nonce + /// using BLAKE2b. + pub(crate) fn encrypt_with_derived_nonce( + secret_key: &SymmetricKey<V2>, + nonce_key_bytes: &[u8], + message: &[u8], + footer: Option<&[u8]>, + ) -> Result<String, Error> { + debug_assert!(nonce_key_bytes.len() == XCHACHA_NONCESIZE); + + // Safe unwrap()s due to lengths. + let nonce_key = blake2b::SecretKey::from_slice(nonce_key_bytes).unwrap(); + let mut blake2b = blake2b::Blake2b::new(&nonce_key, XCHACHA_NONCESIZE).unwrap(); + blake2b.update(message.as_ref()).unwrap(); + let nonce = Nonce::from_slice(blake2b.finalize().unwrap().unprotected_as_bytes()).unwrap(); + + let f = footer.unwrap_or(&[]); + + let pre_auth = pae::pae(&[Self::HEADER.as_bytes(), nonce.as_ref(), f])?; + let mut out = vec![0u8; message.len() + POLY1305_OUTSIZE + nonce.len()]; + let sk = match SecretKey::from_slice(secret_key.as_bytes()) { + Ok(val) => val, + Err(orion::errors::UnknownCryptoError) => return Err(Error::Key), + }; + + match seal( + &sk, + &nonce, + message, + Some(&pre_auth), + &mut out[nonce.len()..], + ) { + Ok(()) => (), + Err(orion::errors::UnknownCryptoError) => return Err(Error::Encryption), + } + + out[..nonce.len()].copy_from_slice(nonce.as_ref()); + let token_no_footer = format!("{}{}", Self::HEADER, encode_b64(out)?); + + if f.is_empty() { + Ok(token_no_footer) + } else { + Ok(format!("{}.{}", token_no_footer, encode_b64(f)?)) + } + } + + /// Create a local token. + pub fn encrypt( + secret_key: &SymmetricKey<V2>, + message: &[u8], + footer: Option<&[u8]>, + ) -> Result<String, Error> { + if message.is_empty() { + return Err(Error::EmptyPayload); + } + + let mut rng_bytes = [0u8; XCHACHA_NONCESIZE]; + getrandom::getrandom(&mut rng_bytes)?; + + Self::encrypt_with_derived_nonce(secret_key, &rng_bytes, message, footer) + } + + /// Verify and decrypt a local token. + /// + /// If `footer.is_none()`, then it will be validated but not compared to a known value. + /// If `footer.is_some()`, then it will be validated AND compared to the known value. + pub fn decrypt( + secret_key: &SymmetricKey<V2>, + token: &UntrustedToken<Local, V2>, + footer: Option<&[u8]>, + ) -> Result<TrustedToken, Error> { + validate_footer_untrusted_token(token, footer)?; + + let f = token.untrusted_footer(); + let nc = token.untrusted_message(); + let n = nc[..XCHACHA_NONCESIZE].as_ref(); + let c = nc[n.len()..].as_ref(); + + let pre_auth = pae::pae(&[Self::HEADER.as_bytes(), n, f])?; + let mut out = vec![0u8; c.len() - POLY1305_OUTSIZE]; + + let sk = match SecretKey::from_slice(secret_key.as_bytes()) { + Ok(val) => val, + Err(orion::errors::UnknownCryptoError) => return Err(Error::Key), + }; + + match open( + &sk, + &Nonce::from_slice(n).unwrap(), + c, + Some(pre_auth.as_ref()), + &mut out, + ) { + Ok(()) => TrustedToken::_new(Self::HEADER, &out, f, &[]), + Err(orion::errors::UnknownCryptoError) => Err(Error::TokenValidation), + } + } +} + +#[cfg(test)] +#[cfg(feature = "std")] +mod test_vectors { + + use hex; + + use super::*; + use core::convert::TryFrom; + use std::fs::File; + use std::io::BufReader; + + use crate::claims::Claims; + use crate::common::tests::*; + + fn test_local(test: &PasetoTest) { + debug_assert!(test.nonce.is_some()); + debug_assert!(test.key.is_some()); + + let sk = + SymmetricKey::<V2>::from(&hex::decode(test.key.as_ref().unwrap()).unwrap()).unwrap(); + + let nonce = hex::decode(test.nonce.as_ref().unwrap()).unwrap(); + let footer: Option<&[u8]> = if test.footer.as_bytes().is_empty() { + None + } else { + Some(test.footer.as_bytes()) + }; + + // payload is null when we expect failure + if test.expect_fail { + if let Ok(ut) = UntrustedToken::<Local, V2>::try_from(&test.token) { + assert!(LocalToken::decrypt(&sk, &ut, footer).is_err()); + } + + return; + } + + let message = test.payload.as_ref().unwrap().as_str().unwrap(); + + let actual = + LocalToken::encrypt_with_derived_nonce(&sk, &nonce, message.as_bytes(), footer) + .unwrap(); + assert_eq!(actual, test.token, "Failed {:?}", test.name); + + let ut = UntrustedToken::<Local, V2>::try_from(&test.token).unwrap(); + let trusted = LocalToken::decrypt(&sk, &ut, footer).unwrap(); + assert_eq!(trusted.payload(), message, "Failed {:?}", test.name); + assert_eq!(trusted.footer(), test.footer.as_bytes()); + assert_eq!(trusted.header(), LocalToken::HEADER); + assert!(trusted.implicit_assert().is_empty()); + + let parsed_claims = Claims::from_bytes(trusted.payload().as_bytes()).unwrap(); + let test_vector_claims = serde_json::from_str::<Payload>(message).unwrap(); + + assert_eq!( + parsed_claims.get_claim("data").unwrap().as_str().unwrap(), + test_vector_claims.data, + ); + assert_eq!( + parsed_claims.get_claim("exp").unwrap().as_str().unwrap(), + test_vector_claims.exp, + ); + } + + fn test_public(test: &PasetoTest) { + debug_assert!(test.public_key.is_some()); + debug_assert!(test.secret_key.is_some()); + + let sk = AsymmetricSecretKey::<V2>::from( + &hex::decode(test.secret_key.as_ref().unwrap()).unwrap(), + ) + .unwrap(); + let pk = AsymmetricPublicKey::<V2>::from( + &hex::decode(test.public_key.as_ref().unwrap()).unwrap(), + ) + .unwrap(); + let footer: Option<&[u8]> = if test.footer.as_bytes().is_empty() { + None + } else { + Some(test.footer.as_bytes()) + }; + + // payload is null when we expect failure + if test.expect_fail { + if let Ok(ut) = UntrustedToken::<Public, V2>::try_from(&test.token) { + assert!(PublicToken::verify(&pk, &ut, footer).is_err()); + } + + return; + } + + let message = test.payload.as_ref().unwrap().as_str().unwrap(); + + let actual = PublicToken::sign(&sk, message.as_bytes(), footer).unwrap(); + assert_eq!(actual, test.token, "Failed {:?}", test.name); + let ut = UntrustedToken::<Public, V2>::try_from(&test.token).unwrap(); + + let trusted = PublicToken::verify(&pk, &ut, footer).unwrap(); + assert_eq!(trusted.payload(), message); + assert_eq!(trusted.footer(), test.footer.as_bytes()); + assert_eq!(trusted.header(), PublicToken::HEADER); + assert!(trusted.implicit_assert().is_empty()); + } + + #[test] + fn run_test_vectors() { + let path = "./test_vectors/v2.json"; + let file = File::open(path).unwrap(); + let reader = BufReader::new(file); + let tests: TestFile = serde_json::from_reader(reader).unwrap(); + + for t in tests.tests { + // v2.public + if t.public_key.is_some() { + test_public(&t); + } + // v2.local + if t.nonce.is_some() { + test_local(&t); + } + } + } +} + +#[cfg(test)] +mod test_tokens { + use super::*; + use crate::common::decode_b64; + use crate::keys::{AsymmetricKeyPair, Generate}; + use crate::token::UntrustedToken; + use core::convert::TryFrom; + + const TEST_LOCAL_SK_BYTES: [u8; 32] = [ + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + ]; + + pub(crate) const TEST_SK_BYTES: [u8; 64] = [ + 180, 203, 251, 67, 223, 76, 226, 16, 114, 125, 149, 62, 74, 113, 51, 7, 250, 25, 187, 125, + 159, 133, 4, 20, 56, 217, 225, 27, 148, 42, 55, 116, 30, 185, 219, 187, 188, 4, 124, 3, + 253, 112, 96, 78, 0, 113, 240, 152, 126, 22, 178, 139, 117, 114, 37, 193, 31, 0, 65, 93, + 14, 32, 177, 162, + ]; + + const TEST_PK_BYTES: [u8; 32] = [ + 30, 185, 219, 187, 188, 4, 124, 3, 253, 112, 96, 78, 0, 113, 240, 152, 126, 22, 178, 139, + 117, 114, 37, 193, 31, 0, 65, 93, 14, 32, 177, 162, + ]; + + const MESSAGE: &str = + "{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}"; + const FOOTER: &str = "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}"; + const VALID_PUBLIC_TOKEN: &str = "v2.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAxOS0wMS0wMVQwMDowMDowMCswMDowMCJ9flsZsx_gYCR0N_Ec2QxJFFpvQAs7h9HtKwbVK2n1MJ3Rz-hwe8KUqjnd8FAnIJZ601tp7lGkguU63oGbomhoBw.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + const VALID_LOCAL_TOKEN: &str = "v2.local.5K4SCXNhItIhyNuVIZcwrdtaDKiyF81-eWHScuE0idiVqCo72bbjo07W05mqQkhLZdVbxEa5I_u5sgVk1QLkcWEcOSlLHwNpCkvmGGlbCdNExn6Qclw3qTKIIl5-zSLIrxZqOLwcFLYbVK1SrQ.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + + #[test] + fn test_gen_keypair() { + let kp = AsymmetricKeyPair::<V2>::generate().unwrap(); + + let token = PublicToken::sign(&kp.secret, MESSAGE.as_bytes(), None).unwrap(); + + let ut = UntrustedToken::<Public, V2>::try_from(&token).unwrap(); + assert!(PublicToken::verify(&kp.public, &ut, None).is_ok()); + } + + #[test] + fn test_untrusted_token_usage() { + // Local + let sk = SymmetricKey::<V2>::generate().unwrap(); + let token = LocalToken::encrypt(&sk, MESSAGE.as_bytes(), Some(FOOTER.as_bytes())).unwrap(); + + let untrusted_token = UntrustedToken::<Local, V2>::try_from(token.as_str()).unwrap(); + let _ = LocalToken::decrypt( + &sk, + &untrusted_token, + Some(untrusted_token.untrusted_footer()), + ) + .unwrap(); + + // Public + let kp = AsymmetricKeyPair::<V2>::generate().unwrap(); + let token = + PublicToken::sign(&kp.secret, MESSAGE.as_bytes(), Some(FOOTER.as_bytes())).unwrap(); + + let untrusted_token = UntrustedToken::<Public, V2>::try_from(token.as_str()).unwrap(); + assert!(PublicToken::verify(&kp.public, &untrusted_token, Some(FOOTER.as_bytes())).is_ok()); + } + + #[test] + fn test_roundtrip_local() { + let sk = SymmetricKey::<V2>::generate().unwrap(); + let message = "token payload"; + + let token = LocalToken::encrypt(&sk, message.as_bytes(), None).unwrap(); + let ut = UntrustedToken::<Local, V2>::try_from(&token).unwrap(); + let trusted_token = LocalToken::decrypt(&sk, &ut, None).unwrap(); + + assert_eq!(trusted_token.payload(), message); + } + + #[test] + fn test_roundtrip_public() { + let test_sk = AsymmetricSecretKey::<V2>::from(&TEST_SK_BYTES).unwrap(); + let test_pk = AsymmetricPublicKey::<V2>::from(&TEST_PK_BYTES).unwrap(); + + let token = PublicToken::sign(&test_sk, MESSAGE.as_bytes(), None).unwrap(); + let ut = UntrustedToken::<Public, V2>::try_from(&token).unwrap(); + + assert!(PublicToken::verify(&test_pk, &ut, None).is_ok()); + } + + #[test] + fn footer_logic() { + let test_local_sk = SymmetricKey::<V2>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + let test_sk = AsymmetricSecretKey::<V2>::from(&TEST_SK_BYTES).unwrap(); + let test_pk = AsymmetricPublicKey::<V2>::from(&TEST_PK_BYTES).unwrap(); + let message = + b"{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}"; + + // We create a token with Some(footer) and with None + let actual_some = UntrustedToken::<Public, V2>::try_from( + &PublicToken::sign(&test_sk, message, Some(FOOTER.as_bytes())).unwrap(), + ) + .unwrap(); + let actual_none = UntrustedToken::<Public, V2>::try_from( + &PublicToken::sign(&test_sk, message, None).unwrap(), + ) + .unwrap(); + + // token = Some(footer) = validate and compare + // token = None(footer) = validate only + + // We should be able to validate with None if created with Some() (excludes constant-time + // comparison with known value) + assert!(PublicToken::verify(&test_pk, &actual_some, None).is_ok()); + // We should be able to validate with Some() if created with Some() + assert!(PublicToken::verify(&test_pk, &actual_some, Some(FOOTER.as_bytes())).is_ok()); + // We should NOT be able to validate with Some() if created with None + assert!(PublicToken::verify(&test_pk, &actual_none, Some(FOOTER.as_bytes())).is_err()); + + let actual_some = UntrustedToken::<Local, V2>::try_from( + &LocalToken::encrypt(&test_local_sk, message, Some(FOOTER.as_bytes())).unwrap(), + ) + .unwrap(); + let actual_none = UntrustedToken::<Local, V2>::try_from( + &LocalToken::encrypt(&test_local_sk, message, None).unwrap(), + ) + .unwrap(); + + // They don't equal because the nonce is random. So we only check decryption. + assert!(LocalToken::decrypt(&test_local_sk, &actual_some, None).is_ok()); + assert!(LocalToken::decrypt(&test_local_sk, &actual_some, Some(FOOTER.as_bytes())).is_ok()); + assert!( + LocalToken::decrypt(&test_local_sk, &actual_none, Some(FOOTER.as_bytes())).is_err() + ); + } + + #[test] + // NOTE: See https://github.com/paseto-standard/paseto-spec/issues/17 + fn empty_payload() { + let test_local_sk = SymmetricKey::<V2>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + let test_sk = AsymmetricSecretKey::<V2>::from(&TEST_SK_BYTES).unwrap(); + + assert_eq!( + PublicToken::sign(&test_sk, b"", None).unwrap_err(), + Error::EmptyPayload + ); + assert_eq!( + LocalToken::encrypt(&test_local_sk, b"", None).unwrap_err(), + Error::EmptyPayload + ); + } + + #[test] + fn err_on_modified_footer() { + let test_pk = AsymmetricPublicKey::<V2>::from(&TEST_PK_BYTES).unwrap(); + let test_local_sk = SymmetricKey::<V2>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V2>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(FOOTER.replace("kid", "mid").as_bytes()) + ) + .unwrap_err(), + Error::TokenValidation + ); + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V2>::try_from(VALID_LOCAL_TOKEN).unwrap(), + Some(FOOTER.replace("kid", "mid").as_bytes()) + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_footer_in_token_none_supplied() { + let test_pk = AsymmetricPublicKey::<V2>::from(&TEST_PK_BYTES).unwrap(); + let test_local_sk = SymmetricKey::<V2>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V2>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(b"") + ) + .unwrap_err(), + Error::TokenValidation + ); + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V2>::try_from(VALID_LOCAL_TOKEN).unwrap(), + Some(b"") + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_no_footer_in_token_some_supplied() { + let test_pk = AsymmetricPublicKey::<V2>::from(&TEST_PK_BYTES).unwrap(); + let test_local_sk = SymmetricKey::<V2>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + let split_public = VALID_PUBLIC_TOKEN.split('.').collect::<Vec<&str>>(); + let invalid_public: String = format!( + "{}.{}.{}", + split_public[0], split_public[1], split_public[2] + ); + + let split_local = VALID_LOCAL_TOKEN.split('.').collect::<Vec<&str>>(); + let invalid_local: String = + format!("{}.{}.{}", split_local[0], split_local[1], split_local[2]); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V2>::try_from(&invalid_public).unwrap(), + Some(FOOTER.as_bytes()) + ) + .unwrap_err(), + Error::TokenValidation + ); + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V2>::try_from(&invalid_local).unwrap(), + Some(FOOTER.as_bytes()) + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_modified_signature() { + let test_pk = AsymmetricPublicKey::<V2>::from(&TEST_PK_BYTES).unwrap(); + + let mut split_public = VALID_PUBLIC_TOKEN.split('.').collect::<Vec<&str>>(); + let mut bad_sig = decode_b64(split_public[2]).unwrap(); + bad_sig.copy_within(0..32, 32); + let tmp = encode_b64(bad_sig).unwrap(); + split_public[2] = &tmp; + let invalid_public: String = format!( + "{}.{}.{}.{}", + split_public[0], split_public[1], split_public[2], split_public[3] + ); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V2>::try_from(&invalid_public).unwrap(), + Some(FOOTER.as_bytes()) + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_modified_tag() { + let test_local_sk = SymmetricKey::<V2>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + let mut split_local = VALID_LOCAL_TOKEN.split('.').collect::<Vec<&str>>(); + let mut bad_tag = decode_b64(split_local[2]).unwrap(); + let tlen = bad_tag.len(); + bad_tag.copy_within(0..16, tlen - 16); + let tmp = encode_b64(bad_tag).unwrap(); + split_local[2] = &tmp; + let invalid_local: String = format!( + "{}.{}.{}.{}", + split_local[0], split_local[1], split_local[2], split_local[3] + ); + + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V2>::try_from(&invalid_local).unwrap(), + Some(FOOTER.as_bytes()) + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_modified_ciphertext() { + let test_local_sk = SymmetricKey::<V2>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + let mut split_local = VALID_LOCAL_TOKEN.split('.').collect::<Vec<&str>>(); + let mut bad_ct = decode_b64(split_local[2]).unwrap(); + let ctlen = bad_ct.len(); + bad_ct.copy_within((ctlen - 16)..ctlen, 24); + let tmp = encode_b64(bad_ct).unwrap(); + split_local[2] = &tmp; + let invalid_local: String = format!( + "{}.{}.{}.{}", + split_local[0], split_local[1], split_local[2], split_local[3] + ); + + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V2>::try_from(&invalid_local).unwrap(), + Some(FOOTER.as_bytes()) + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_modified_nonce() { + let test_local_sk = SymmetricKey::<V2>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + let mut split_local = VALID_LOCAL_TOKEN.split('.').collect::<Vec<&str>>(); + let mut bad_nonce = decode_b64(split_local[2]).unwrap(); + let nlen = bad_nonce.len(); + bad_nonce.copy_within((nlen - 24)..nlen, 0); + let tmp = encode_b64(bad_nonce).unwrap(); + split_local[2] = &tmp; + let invalid_local: String = format!( + "{}.{}.{}.{}", + split_local[0], split_local[1], split_local[2], split_local[3] + ); + + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V2>::try_from(&invalid_local).unwrap(), + Some(FOOTER.as_bytes()) + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_invalid_public_secret_key() { + let bad_pk = AsymmetricPublicKey::<V2>::from(&[0u8; 32]).unwrap(); + + assert_eq!( + PublicToken::verify( + &bad_pk, + &UntrustedToken::<Public, V2>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(FOOTER.as_bytes()) + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_invalid_shared_secret_key() { + let bad_local_sk = SymmetricKey::<V2>::from(&[0u8; 32]).unwrap(); + + assert_eq!( + LocalToken::decrypt( + &bad_local_sk, + &UntrustedToken::<Local, V2>::try_from(VALID_LOCAL_TOKEN).unwrap(), + Some(FOOTER.as_bytes()) + ) + .unwrap_err(), + Error::TokenValidation + ); + } +} + +#[cfg(test)] +mod test_keys { + use super::*; + use crate::version2::test_tokens::TEST_SK_BYTES; + + #[test] + fn test_symmetric_gen() { + let randomv = SymmetricKey::<V2>::generate().unwrap(); + assert_ne!(randomv.as_bytes(), &[0u8; 32]); + } + + #[test] + fn test_invalid_sizes() { + assert!(AsymmetricSecretKey::<V2>::from(&[1u8; 63]).is_err()); + assert!(AsymmetricSecretKey::<V2>::from(&TEST_SK_BYTES).is_ok()); + assert!(AsymmetricSecretKey::<V2>::from(&[1u8; 65]).is_err()); + + assert!(AsymmetricPublicKey::<V2>::from(&[1u8; 31]).is_err()); + assert!(AsymmetricPublicKey::<V2>::from(&[1u8; 32]).is_ok()); + assert!(AsymmetricPublicKey::<V2>::from(&[1u8; 33]).is_err()); + + assert!(SymmetricKey::<V2>::from(&[0u8; 31]).is_err()); + assert!(SymmetricKey::<V2>::from(&[0u8; 32]).is_ok()); + assert!(SymmetricKey::<V2>::from(&[0u8; 33]).is_err()); + } + + #[test] + fn try_from_secret_to_public() { + let kpv2 = AsymmetricKeyPair::<V2>::generate().unwrap(); + let pubv2 = AsymmetricPublicKey::<V2>::try_from(&kpv2.secret).unwrap(); + assert_eq!(pubv2.as_bytes(), kpv2.public.as_bytes()); + assert_eq!(pubv2, kpv2.public); + assert_eq!(&kpv2.secret.as_bytes()[32..], pubv2.as_bytes()); + } + + #[test] + fn test_trait_impls() { + let debug = format!("{:?}", SymmetricKey::<V2>::generate().unwrap()); + assert_eq!(debug, "SymmetricKey {***OMITTED***}"); + + let randomv = SymmetricKey::<V2>::generate().unwrap(); + let zero = SymmetricKey::<V2>::from(&[0u8; V2::LOCAL_KEY]).unwrap(); + assert_ne!(randomv, zero); + + let debug = format!("{:?}", AsymmetricKeyPair::<V2>::generate().unwrap().secret); + assert_eq!(debug, "AsymmetricSecretKey {***OMITTED***}"); + + let random1 = AsymmetricKeyPair::<V2>::generate().unwrap(); + let random2 = AsymmetricKeyPair::<V2>::generate().unwrap(); + assert_ne!(random1.secret, random2.secret); + } + + #[test] + fn test_clone() { + let sk = SymmetricKey::<V2>::generate().unwrap(); + assert_eq!(sk, sk.clone()); + + let kp = AsymmetricKeyPair::<V2>::generate().unwrap(); + assert_eq!(kp.secret, kp.secret.clone()); + assert_eq!(kp.public, kp.public.clone()); + } +} diff --git a/vendor/pasetors/src/version3.rs b/vendor/pasetors/src/version3.rs new file mode 100644 index 000000000..5c84a689a --- /dev/null +++ b/vendor/pasetors/src/version3.rs @@ -0,0 +1,817 @@ +#![cfg_attr(docsrs, doc(cfg(feature = "v3")))] + +//! +//! This is an implementation of the [version 3 specification of PASETO](https://github.com/paseto-standard/paseto-spec/blob/master/docs/01-Protocol-Versions/Version3.md#sign). +//! +//! The following points apply to this implementation, in regards to the specification: +//! - PASETO requires the use of compressed public keys. If these are not readily supported in a given +//! setting, [UncompressedPublicKey] and [AsymmetricPublicKey<V3>] conversions can be used to obtain +//! the compressed form. +//! - PASETO recommends use of deterministic nonces ([RFC 6979]) which this library also uses. +//! - Hedged signatures, according to the PASETO spec, are not used. +//! +//! [AsymmetricPublicKey<V3>]: crate::keys::AsymmetricPublicKey +//! [UncompressedPublicKey]: crate::version3::UncompressedPublicKey +//! [RFC 6979]: https://tools.ietf.org/html/rfc6979 + +use core::marker::PhantomData; + +use crate::common::{encode_b64, validate_footer_untrusted_token}; +use crate::errors::Error; +use crate::keys::{AsymmetricKeyPair, AsymmetricPublicKey, AsymmetricSecretKey, Generate}; +use crate::pae; +use crate::token::{Public, TrustedToken, UntrustedToken}; +use crate::version::private::Version; +use alloc::string::String; +use alloc::vec::Vec; +use core::convert::TryFrom; +use p384::ecdsa::{ + signature::DigestSigner, signature::DigestVerifier, Signature, SigningKey, VerifyingKey, +}; +use p384::elliptic_curve::sec1::ToEncodedPoint; +use p384::PublicKey; +use rand_core::OsRng; +use sha2::Digest; + +#[derive(Debug, PartialEq, Eq, Clone)] +/// Version 3 of the PASETO spec. +pub struct V3; + +impl Version for V3 { + const LOCAL_KEY: usize = 32; + const SECRET_KEY: usize = 48; + const PUBLIC_KEY: usize = 49; + const PUBLIC_SIG: usize = 96; + const LOCAL_NONCE: usize = 32; + const LOCAL_TAG: usize = 48; + const PUBLIC_HEADER: &'static str = "v3.public."; + const LOCAL_HEADER: &'static str = "v3.local."; + #[cfg(feature = "paserk")] + const PASERK_ID: usize = 44; + + fn validate_local_key(_key_bytes: &[u8]) -> Result<(), Error> { + unimplemented!(); + } + + fn validate_secret_key(key_bytes: &[u8]) -> Result<(), Error> { + if key_bytes.len() != Self::SECRET_KEY { + return Err(Error::Key); + } + + Ok(()) + } + + fn validate_public_key(key_bytes: &[u8]) -> Result<(), Error> { + if key_bytes.len() != Self::PUBLIC_KEY { + return Err(Error::Key); + } + if key_bytes[0] != 0x02 && key_bytes[0] != 0x03 { + return Err(Error::Key); + } + + Ok(()) + } +} + +impl TryFrom<&AsymmetricSecretKey<V3>> for AsymmetricPublicKey<V3> { + type Error = Error; + + fn try_from(value: &AsymmetricSecretKey<V3>) -> Result<Self, Self::Error> { + let sk = SigningKey::from_bytes(value.as_bytes()).map_err(|_| Error::Key)?; + AsymmetricPublicKey::<V3>::from(sk.verifying_key().to_encoded_point(true).as_bytes()) + } +} + +impl Generate<AsymmetricKeyPair<V3>, V3> for AsymmetricKeyPair<V3> { + fn generate() -> Result<AsymmetricKeyPair<V3>, Error> { + let key = SigningKey::random(&mut OsRng); + + let public = AsymmetricPublicKey::<V3>::from( + VerifyingKey::from(&key).to_encoded_point(true).as_ref(), + )?; + let secret = AsymmetricSecretKey::<V3>::from(key.to_bytes().as_slice())?; + + Ok(Self { public, secret }) + } +} + +/// This struct represents a uncompressed public key for P384, encoded in big-endian using: +/// Octet-String-to-Elliptic-Curve-Point algorithm in SEC 1: Elliptic Curve Cryptography, Version 2.0. +/// +/// Format: `[0x04 || x || y]` +/// +/// This is provided to be able to convert uncompressed keys to compressed ones, as compressed is +/// required by PASETO and what an [`AsymmetricPublicKey<V3>`] represents. +pub struct UncompressedPublicKey(PublicKey); + +impl TryFrom<&[u8]> for UncompressedPublicKey { + type Error = Error; + + fn try_from(value: &[u8]) -> Result<Self, Self::Error> { + // PublicKey::from_sec1_bytes accepts both uncompressed and compressed points + // but we need to make the distiction here. + if value.len() != 97 && value[0] != 4 { + return Err(Error::Key); + } + + let pk = PublicKey::from_sec1_bytes(value).map_err(|_| Error::Key)?; + + Ok(Self(pk)) + } +} + +impl TryFrom<&AsymmetricPublicKey<V3>> for UncompressedPublicKey { + type Error = Error; + + fn try_from(value: &AsymmetricPublicKey<V3>) -> Result<Self, Self::Error> { + // PublicKey::from_sec1_bytes accepts both uncompressed and compressed points + // but we need to make the distiction here. + if value.as_bytes()[0] != 2 && value.as_bytes()[0] != 3 { + return Err(Error::Key); + } + + let pk = PublicKey::from_sec1_bytes(value.as_bytes()).map_err(|_| Error::Key)?; + + Ok(UncompressedPublicKey(pk)) + } +} + +impl TryFrom<&UncompressedPublicKey> for AsymmetricPublicKey<V3> { + type Error = Error; + + fn try_from(value: &UncompressedPublicKey) -> Result<Self, Self::Error> { + Ok(Self { + bytes: value.0.to_encoded_point(true).as_ref().to_vec(), + phantom: PhantomData, + }) + } +} + +/// PASETO v3 public tokens. +pub struct PublicToken; + +impl PublicToken { + /// The header and purpose for the public token: `v3.public.`. + pub const HEADER: &'static str = "v3.public."; + + /// Create a public token. + /// + /// The `secret_key` **must** be in big-endian. + pub fn sign( + secret_key: &AsymmetricSecretKey<V3>, + message: &[u8], + footer: Option<&[u8]>, + implicit_assert: Option<&[u8]>, + ) -> Result<String, Error> { + if message.is_empty() { + return Err(Error::EmptyPayload); + } + + let signing_key = SigningKey::from_bytes(secret_key.as_bytes()).map_err(|_| Error::Key)?; + let public_key = VerifyingKey::from(&signing_key).to_encoded_point(true); + + let f = footer.unwrap_or(&[]); + let i = implicit_assert.unwrap_or(&[]); + let m2 = pae::pae(&[public_key.as_ref(), Self::HEADER.as_bytes(), message, f, i])?; + + let mut msg_digest = sha2::Sha384::new(); + msg_digest.update(m2); + + let sig = signing_key + .try_sign_digest(msg_digest) + .map_err(|_| Error::Signing)?; + debug_assert_eq!(sig.as_ref().len(), V3::PUBLIC_SIG); + + let mut m_sig: Vec<u8> = Vec::from(message); + m_sig.extend_from_slice(sig.as_ref()); + + let token_no_footer = format!("{}{}", Self::HEADER, encode_b64(m_sig)?); + + if f.is_empty() { + Ok(token_no_footer) + } else { + Ok(format!("{}.{}", token_no_footer, encode_b64(f)?)) + } + } + + /// Verify a public token. + /// + /// The `public_key` **must** be in big-endian. + /// + /// If `footer.is_none()`, then it will be validated but not compared to a known value. + /// If `footer.is_some()`, then it will be validated AND compared to the known value. + pub fn verify( + public_key: &AsymmetricPublicKey<V3>, + token: &UntrustedToken<Public, V3>, + footer: Option<&[u8]>, + implicit_assert: Option<&[u8]>, + ) -> Result<TrustedToken, Error> { + validate_footer_untrusted_token(token, footer)?; + + let f = token.untrusted_footer(); + let i = implicit_assert.unwrap_or(&[]); + let sm = token.untrusted_message(); + let m = token.untrusted_payload(); + let s = Signature::try_from(sm[m.len()..m.len() + V3::PUBLIC_SIG].as_ref()) + .map_err(|_| Error::TokenValidation)?; + + let m2 = pae::pae(&[public_key.as_bytes(), Self::HEADER.as_bytes(), m, f, i])?; + + let verifying_key = + VerifyingKey::from_sec1_bytes(public_key.as_bytes()).map_err(|_| Error::Key)?; + + let mut msg_digest = sha2::Sha384::new(); + msg_digest.update(m2); + verifying_key + .verify_digest(msg_digest, &s) + .map_err(|_| Error::TokenValidation)?; + + TrustedToken::_new(Self::HEADER, m, f, i) + } +} + +#[cfg(test)] +mod test_regression { + use super::*; + use crate::keys::AsymmetricPublicKey; + use core::convert::TryFrom; + use p384::elliptic_curve::sec1::ToEncodedPoint; + + #[test] + fn fuzzer_regression_1() { + let pk_bytes: [u8; 97] = [ + 4, 0, 205, 193, 144, 253, 175, 61, 67, 178, 31, 65, 80, 197, 219, 197, 12, 136, 239, + 15, 12, 155, 112, 129, 17, 35, 64, 33, 149, 251, 222, 174, 69, 197, 171, 176, 115, 67, + 144, 76, 135, 147, 21, 48, 196, 235, 169, 93, 34, 100, 63, 20, 128, 61, 191, 214, 161, + 240, 38, 228, 74, 250, 91, 185, 68, 243, 172, 203, 43, 174, 99, 230, 231, 239, 161, 78, + 148, 160, 170, 87, 200, 24, 220, 196, 53, 107, 22, 85, 59, 227, 237, 150, 83, 81, 41, + 2, 132, + ]; + + let uc_pk = UncompressedPublicKey::try_from(pk_bytes.as_ref()).unwrap(); + assert_eq!(&pk_bytes, &uc_pk.0.to_encoded_point(false).as_ref()); + let c_pk = AsymmetricPublicKey::<V3>::try_from(&uc_pk).unwrap(); + assert_eq!(&c_pk.as_bytes()[1..], &pk_bytes[1..49]); + + let round = UncompressedPublicKey::try_from(&c_pk).unwrap(); + + assert_eq!(round.0.to_encoded_point(false).as_ref(), pk_bytes); + } + + #[test] + fn fuzzer_regression_2() { + let data: [u8; 49] = [ + 2, 0, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, + ]; + + if let Ok(compressed_pk) = AsymmetricPublicKey::<V3>::from(&data) { + if let Ok(uncompressed) = UncompressedPublicKey::try_from(&compressed_pk) { + assert_eq!( + AsymmetricPublicKey::<V3>::try_from(&uncompressed) + .unwrap() + .as_bytes(), + compressed_pk.as_bytes() + ); + } + } + } + + #[test] + fn fuzzer_regression_3() { + let data: [u8; 49] = [ + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + ]; + + if let Ok(compressed_pk) = AsymmetricPublicKey::<V3>::from(&data) { + if let Ok(uncompressed) = UncompressedPublicKey::try_from(&compressed_pk) { + assert_eq!( + AsymmetricPublicKey::<V3>::try_from(&uncompressed) + .unwrap() + .as_bytes(), + compressed_pk.as_bytes() + ); + } + } + } +} + +#[cfg(test)] +#[cfg(feature = "std")] +mod test_vectors { + + use super::*; + use hex; + use std::fs::File; + use std::io::BufReader; + + use crate::common::tests::*; + + fn test_pk_conversion(pk: &AsymmetricPublicKey<V3>) { + let uc_pk = UncompressedPublicKey::try_from(pk).unwrap(); + let c_pk: AsymmetricPublicKey<V3> = AsymmetricPublicKey::try_from(&uc_pk).unwrap(); + + assert_eq!( + pk.as_bytes(), + c_pk.as_bytes(), + "Failed to roundtrip conversion between compressed and uncompressed public key" + ); + } + + #[test] + fn sign_verify_roundtrip() { + // Values taken from 3-S-1 + let raw_sk = hex::decode("20347609607477aca8fbfbc5e6218455f3199669792ef8b466faa87bdc67798144c848dd03661eed5ac62461340cea96").unwrap(); + let raw_pk = hex::decode("02fbcb7c69ee1c60579be7a334134878d9c5c5bf35d552dab63c0140397ed14cef637d7720925c44699ea30e72874c72fb").unwrap(); + + let sk = AsymmetricSecretKey::<V3>::from(&raw_sk).unwrap(); + let pk = AsymmetricPublicKey::<V3>::from(&raw_pk).unwrap(); + let message = "this is a signed message"; + + let token = UntrustedToken::<Public, V3>::try_from( + &PublicToken::sign(&sk, message.as_bytes(), Some(b"footer"), Some(b"impl")).unwrap(), + ) + .unwrap(); + assert!(PublicToken::verify(&pk, &token, Some(b"footer"), Some(b"impl")).is_ok()); + } + + fn test_public(test: &PasetoTest) { + debug_assert!(test.public_key.is_some()); + debug_assert!(test.secret_key.is_some()); + + let sk = AsymmetricSecretKey::<V3>::from( + &hex::decode(test.secret_key.as_ref().unwrap()).unwrap(), + ) + .unwrap(); + let pk = AsymmetricPublicKey::<V3>::from( + &hex::decode(test.public_key.as_ref().unwrap()).unwrap(), + ) + .unwrap(); + + test_pk_conversion(&pk); + + let footer: Option<&[u8]> = if test.footer.as_bytes().is_empty() { + None + } else { + Some(test.footer.as_bytes()) + }; + let implicit_assert = test.implicit_assertion.as_bytes(); + + // payload is null when we expect failure + if test.expect_fail { + if let Ok(ut) = UntrustedToken::<Public, V3>::try_from(&test.token) { + assert!(PublicToken::verify(&pk, &ut, footer, Some(implicit_assert)).is_err()); + } + + return; + } + + let message = test.payload.as_ref().unwrap().as_str().unwrap(); + let actual = + PublicToken::sign(&sk, message.as_bytes(), footer, Some(implicit_assert)).unwrap(); + assert_eq!(actual, test.token, "Failed {:?}", test.name); + let ut = UntrustedToken::<Public, V3>::try_from(&test.token).unwrap(); + + let trusted = PublicToken::verify(&pk, &ut, footer, Some(implicit_assert)).unwrap(); + assert_eq!(trusted.payload(), message); + assert_eq!(trusted.footer(), test.footer.as_bytes()); + assert_eq!(trusted.header(), PublicToken::HEADER); + assert_eq!(trusted.implicit_assert(), implicit_assert); + } + + #[test] + fn run_test_vectors() { + let path = "./test_vectors/v3.json"; + let file = File::open(path).unwrap(); + let reader = BufReader::new(file); + let tests: TestFile = serde_json::from_reader(reader).unwrap(); + + for t in tests.tests { + // v3.public + if t.public_key.is_some() { + test_public(&t); + } + } + } +} + +#[cfg(test)] +#[cfg(feature = "std")] +mod test_wycheproof_point_compression { + use super::*; + use crate::keys::AsymmetricPublicKey; + use alloc::string::String; + use alloc::vec::Vec; + use p384::elliptic_curve::sec1::ToEncodedPoint; + use serde::{Deserialize, Serialize}; + use std::convert::TryFrom; + use std::fs::File; + use std::io::BufReader; + + #[allow(dead_code)] // `notes` field + #[allow(non_snake_case)] + #[derive(Serialize, Deserialize, Debug)] + pub(crate) struct WycheproofSecp384r1Tests { + algorithm: String, + generatorVersion: String, + numberOfTests: u64, + header: Vec<String>, + #[serde(skip)] + notes: Vec<String>, // Not a Vec<>, but we don't need this so skip it. + schema: String, + testGroups: Vec<Secp384r1TestGroup>, + } + + #[allow(non_snake_case)] + #[derive(Serialize, Deserialize, Debug)] + pub(crate) struct Secp384r1TestGroup { + key: Secp384r1Key, + keyDer: String, + keyPem: String, + sha: String, + #[serde(rename(deserialize = "type"))] + testType: String, + tests: Vec<TestVector>, + } + + #[allow(non_snake_case)] + #[derive(Serialize, Deserialize, Debug)] + pub(crate) struct Secp384r1Key { + curve: String, + keySize: u64, + #[serde(rename(deserialize = "type"))] + keyType: String, + uncompressed: String, + wx: String, + wy: String, + } + + #[allow(non_snake_case)] + #[derive(Serialize, Deserialize, Debug)] + pub(crate) struct TestVector { + tcId: u64, + comment: String, + msg: String, + sig: String, + result: String, + flags: Vec<String>, + } + + fn wycheproof_point_compression(path: &str) { + let file = File::open(path).unwrap(); + let reader = BufReader::new(file); + let tests: WycheproofSecp384r1Tests = serde_json::from_reader(reader).unwrap(); + + for test_group in tests.testGroups.iter() { + let uc_pk = UncompressedPublicKey::try_from( + hex::decode(&test_group.key.uncompressed) + .unwrap() + .as_slice(), + ) + .expect("Failed Wycheproof -> Uncompressed"); + + let pk = AsymmetricPublicKey::<V3>::try_from(&uc_pk).unwrap(); + assert_eq!( + hex::encode( + UncompressedPublicKey::try_from(&pk) + .unwrap() + .0 + .to_encoded_point(false) + .as_ref() + ), + test_group.key.uncompressed, + "Failed {:?}", + &test_group.key.uncompressed + ); + } + } + + #[test] + fn run_wycheproof_points() { + wycheproof_point_compression( + "./test_vectors/wycheproof/ecdsa_secp384r1_sha3_384_test.json", + ); + wycheproof_point_compression("./test_vectors/wycheproof/ecdsa_secp384r1_sha384_test.json"); + } +} + +#[cfg(test)] +mod test_tokens { + use super::*; + use crate::common::decode_b64; + use crate::keys::{AsymmetricKeyPair, Generate}; + use crate::token::UntrustedToken; + + // 3-S-2 values + const TEST_SK_BYTES: [u8; 48] = [ + 32, 52, 118, 9, 96, 116, 119, 172, 168, 251, 251, 197, 230, 33, 132, 85, 243, 25, 150, 105, + 121, 46, 248, 180, 102, 250, 168, 123, 220, 103, 121, 129, 68, 200, 72, 221, 3, 102, 30, + 237, 90, 198, 36, 97, 52, 12, 234, 150, + ]; + const TEST_PK_BYTES: [u8; 49] = [ + 2, 251, 203, 124, 105, 238, 28, 96, 87, 155, 231, 163, 52, 19, 72, 120, 217, 197, 197, 191, + 53, 213, 82, 218, 182, 60, 1, 64, 57, 126, 209, 76, 239, 99, 125, 119, 32, 146, 92, 68, + 105, 158, 163, 14, 114, 135, 76, 114, 251, + ]; + + const MESSAGE: &str = + "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}"; + const FOOTER: &str = "{\"kid\":\"dYkISylxQeecEcHELfzF88UZrwbLolNiCdpzUHGw9Uqn\"}"; + const VALID_PUBLIC_TOKEN: &str = "v3.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9ZWrbGZ6L0MDK72skosUaS0Dz7wJ_2bMcM6tOxFuCasO9GhwHrvvchqgXQNLQQyWzGC2wkr-VKII71AvkLpC8tJOrzJV1cap9NRwoFzbcXjzMZyxQ0wkshxZxx8ImmNWP.eyJraWQiOiJkWWtJU3lseFFlZWNFY0hFTGZ6Rjg4VVpyd2JMb2xOaUNkcHpVSEd3OVVxbiJ9"; + + #[test] + fn test_gen_keypair() { + let kp = AsymmetricKeyPair::<V3>::generate().unwrap(); + + let token = PublicToken::sign(&kp.secret, MESSAGE.as_bytes(), None, None).unwrap(); + + let ut = UntrustedToken::<Public, V3>::try_from(&token).unwrap(); + assert!(PublicToken::verify(&kp.public, &ut, None, None).is_ok()); + } + + #[test] + fn test_untrusted_token_usage() { + // Public + let kp = AsymmetricKeyPair::<V3>::generate().unwrap(); + let token = PublicToken::sign( + &kp.secret, + MESSAGE.as_bytes(), + Some(FOOTER.as_bytes()), + None, + ) + .unwrap(); + + let untrusted_token = UntrustedToken::<Public, V3>::try_from(token.as_str()).unwrap(); + assert!(PublicToken::verify( + &kp.public, + &untrusted_token, + Some(untrusted_token.untrusted_footer()), + None + ) + .is_ok()); + } + + #[test] + fn test_roundtrip_public() { + let test_sk = AsymmetricSecretKey::<V3>::from(&TEST_SK_BYTES).unwrap(); + let test_pk = AsymmetricPublicKey::<V3>::from(&TEST_PK_BYTES).unwrap(); + + let token = PublicToken::sign(&test_sk, MESSAGE.as_bytes(), None, None).unwrap(); + let ut = UntrustedToken::<Public, V3>::try_from(&token).unwrap(); + + assert!(PublicToken::verify(&test_pk, &ut, None, None).is_ok()); + } + + #[test] + fn footer_logic() { + let test_sk = AsymmetricSecretKey::<V3>::from(&TEST_SK_BYTES).unwrap(); + let test_pk = AsymmetricPublicKey::<V3>::from(&TEST_PK_BYTES).unwrap(); + let message = + b"{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}"; + + // We create a token with Some(footer) and with None + let actual_some = UntrustedToken::<Public, V3>::try_from( + &PublicToken::sign(&test_sk, message, Some(FOOTER.as_bytes()), None).unwrap(), + ) + .unwrap(); + let actual_none = UntrustedToken::<Public, V3>::try_from( + &PublicToken::sign(&test_sk, message, None, None).unwrap(), + ) + .unwrap(); + + // token = Some(footer) = validate and compare + // token = None(footer) = validate only + + // We should be able to validate with None if created with Some() (excludes constant-time + // comparison with known value) + assert!(PublicToken::verify(&test_pk, &actual_some, None, None).is_ok()); + // We should be able to validate with Some() if created with Some() + assert!(PublicToken::verify(&test_pk, &actual_some, Some(FOOTER.as_bytes()), None).is_ok()); + // We should NOT be able to validate with Some() if created with None + assert!( + PublicToken::verify(&test_pk, &actual_none, Some(FOOTER.as_bytes()), None).is_err() + ); + } + + #[test] + fn implicit_none_some_empty_is_same() { + let test_sk = AsymmetricSecretKey::<V3>::from(&TEST_SK_BYTES).unwrap(); + let test_pk = AsymmetricPublicKey::<V3>::from(&TEST_PK_BYTES).unwrap(); + let message = + b"{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}"; + let implicit = b""; + + let actual_some = UntrustedToken::<Public, V3>::try_from( + &PublicToken::sign(&test_sk, message, None, Some(implicit)).unwrap(), + ) + .unwrap(); + let actual_none = UntrustedToken::<Public, V3>::try_from( + &PublicToken::sign(&test_sk, message, None, None).unwrap(), + ) + .unwrap(); + + assert!(PublicToken::verify(&test_pk, &actual_none, None, Some(implicit)).is_ok()); + assert!(PublicToken::verify(&test_pk, &actual_some, None, None).is_ok()); + } + + #[test] + // NOTE: See https://github.com/paseto-standard/paseto-spec/issues/17 + fn empty_payload() { + let test_sk = AsymmetricSecretKey::<V3>::from(&TEST_SK_BYTES).unwrap(); + + assert_eq!( + PublicToken::sign(&test_sk, b"", None, None).unwrap_err(), + Error::EmptyPayload + ); + } + + #[test] + fn err_on_modified_footer() { + let test_pk = AsymmetricPublicKey::<V3>::from(&TEST_PK_BYTES).unwrap(); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V3>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(FOOTER.replace("kid", "mid").as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_wrong_implicit_assert() { + let test_pk = AsymmetricPublicKey::<V3>::from(&TEST_PK_BYTES).unwrap(); + assert!(PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V3>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .is_ok()); + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V3>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(FOOTER.as_bytes()), + Some(b"WRONG IMPLICIT") + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_footer_in_token_none_supplied() { + let test_pk = AsymmetricPublicKey::<V3>::from(&TEST_PK_BYTES).unwrap(); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V3>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(b""), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_no_footer_in_token_some_supplied() { + let test_pk = AsymmetricPublicKey::<V3>::from(&TEST_PK_BYTES).unwrap(); + + let split_public = VALID_PUBLIC_TOKEN.split('.').collect::<Vec<&str>>(); + let invalid_public: String = format!( + "{}.{}.{}", + split_public[0], split_public[1], split_public[2] + ); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V3>::try_from(&invalid_public).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_modified_signature() { + let test_pk = AsymmetricPublicKey::<V3>::from(&TEST_PK_BYTES).unwrap(); + + let mut split_public = VALID_PUBLIC_TOKEN.split('.').collect::<Vec<&str>>(); + let mut bad_sig = decode_b64(split_public[2]).unwrap(); + bad_sig.copy_within(0..32, 32); + let tmp = encode_b64(bad_sig).unwrap(); + split_public[2] = &tmp; + let invalid_public: String = format!( + "{}.{}.{}.{}", + split_public[0], split_public[1], split_public[2], split_public[3] + ); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V3>::try_from(&invalid_public).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_invalid_public_secret_key() { + let mut pk_bytes = [0u8; 49]; + pk_bytes[0] = 2; + let bad_pk = AsymmetricPublicKey::<V3>::from(&pk_bytes).unwrap(); + + assert_eq!( + PublicToken::verify( + &bad_pk, + &UntrustedToken::<Public, V3>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } +} + +#[cfg(test)] +mod test_keys { + use super::*; + use crate::keys::SymmetricKey; + + #[test] + #[should_panic] + fn test_v3_local_not_implemented() { + assert!(SymmetricKey::<V3>::from(&[0u8; 32]).is_ok()); + } + + #[test] + fn test_invalid_sizes() { + assert!(AsymmetricSecretKey::<V3>::from(&[0u8; 47]).is_err()); + assert!(AsymmetricSecretKey::<V3>::from(&[0u8; 48]).is_ok()); + assert!(AsymmetricSecretKey::<V3>::from(&[0u8; 49]).is_err()); + + let mut pk2 = [0u8; 49]; + pk2[0] = 0x02; + let mut pk3 = [0u8; 49]; + pk3[0] = 0x03; + assert!(AsymmetricPublicKey::<V3>::from(&[0u8; 48]).is_err()); + assert!(AsymmetricPublicKey::<V3>::from(&[0u8; 49]).is_err()); + assert!(AsymmetricPublicKey::<V3>::from(&pk2).is_ok()); + assert!(AsymmetricPublicKey::<V3>::from(&pk3).is_ok()); + assert!(AsymmetricPublicKey::<V3>::from(&[0u8; 50]).is_err()); + } + + #[test] + fn try_from_secret_to_public() { + let kpv3 = AsymmetricKeyPair::<V3>::generate().unwrap(); + let pubv3 = AsymmetricPublicKey::<V3>::try_from(&kpv3.secret).unwrap(); + assert_eq!(pubv3.as_bytes(), kpv3.public.as_bytes()); + assert_eq!(pubv3, kpv3.public); + } + + #[test] + fn test_trait_impls() { + let debug = format!("{:?}", AsymmetricKeyPair::<V3>::generate().unwrap().secret); + assert_eq!(debug, "AsymmetricSecretKey {***OMITTED***}"); + + let randomv = AsymmetricKeyPair::<V3>::generate().unwrap(); + let randomv2 = AsymmetricKeyPair::<V3>::generate().unwrap(); + assert_ne!(randomv.secret, randomv2.secret); + } + + #[test] + fn test_invalid_pk() { + let uc_badlen = [0u8; 96]; + let mut uc_badtag = [0u8; 97]; + uc_badtag[0] = 0x02; + + assert!(UncompressedPublicKey::try_from(uc_badlen.as_ref()).is_err()); + assert!(UncompressedPublicKey::try_from(uc_badtag.as_ref()).is_err()); + + let mut kpv3 = AsymmetricKeyPair::<V3>::generate().unwrap(); + kpv3.public.bytes[0] = 0x04; + assert!(UncompressedPublicKey::try_from(&kpv3.public).is_err()); + } + + #[test] + fn test_clone() { + let kp = AsymmetricKeyPair::<V3>::generate().unwrap(); + assert_eq!(kp.secret, kp.secret.clone()); + assert_eq!(kp.public, kp.public.clone()); + } +} diff --git a/vendor/pasetors/src/version4.rs b/vendor/pasetors/src/version4.rs new file mode 100644 index 000000000..858b4b9bc --- /dev/null +++ b/vendor/pasetors/src/version4.rs @@ -0,0 +1,983 @@ +#![cfg_attr(docsrs, doc(cfg(feature = "v4")))] + +use core::convert::TryFrom; +use core::marker::PhantomData; + +use crate::common::{encode_b64, validate_footer_untrusted_token}; +use crate::errors::Error; +use crate::keys::{ + AsymmetricKeyPair, AsymmetricPublicKey, AsymmetricSecretKey, Generate, SymmetricKey, +}; +use crate::pae; +use crate::token::{Local, Public, TrustedToken, UntrustedToken}; +use crate::version::private::Version; +use alloc::string::String; +use alloc::vec::Vec; +use blake2b::SecretKey as AuthKey; +use ed25519_compact::{KeyPair, PublicKey, SecretKey, Seed, Signature}; +use orion::hazardous::mac::blake2b; +use orion::hazardous::mac::blake2b::Blake2b; +use orion::hazardous::stream::xchacha20; +use subtle::ConstantTimeEq; +use xchacha20::Nonce as EncNonce; +use xchacha20::SecretKey as EncKey; + +#[derive(Debug, PartialEq, Eq, Clone)] +/// Version 4 of the PASETO spec. +pub struct V4; + +impl Version for V4 { + const LOCAL_KEY: usize = 32; + const SECRET_KEY: usize = 32 + Self::PUBLIC_KEY; // Seed || PK + const PUBLIC_KEY: usize = 32; + const PUBLIC_SIG: usize = 64; + const LOCAL_NONCE: usize = 32; + const LOCAL_TAG: usize = 32; + const PUBLIC_HEADER: &'static str = "v4.public."; + const LOCAL_HEADER: &'static str = "v4.local."; + #[cfg(feature = "paserk")] + const PASERK_ID: usize = 44; + + fn validate_local_key(key_bytes: &[u8]) -> Result<(), Error> { + if key_bytes.len() != Self::LOCAL_KEY { + return Err(Error::Key); + } + + Ok(()) + } + + fn validate_secret_key(key_bytes: &[u8]) -> Result<(), Error> { + if key_bytes.len() != Self::SECRET_KEY { + return Err(Error::Key); + } + + let seed = Seed::from_slice(&key_bytes[..32]).map_err(|_| Error::Key)?; + let kp = KeyPair::from_seed(seed); + + if !bool::from(kp.pk.as_slice().ct_eq(&key_bytes[32..])) { + return Err(Error::Key); + } + + Ok(()) + } + + fn validate_public_key(key_bytes: &[u8]) -> Result<(), Error> { + if key_bytes.len() != Self::PUBLIC_KEY { + return Err(Error::Key); + } + + Ok(()) + } +} + +impl TryFrom<&AsymmetricSecretKey<V4>> for AsymmetricPublicKey<V4> { + type Error = Error; + + fn try_from(value: &AsymmetricSecretKey<V4>) -> Result<Self, Self::Error> { + AsymmetricPublicKey::<V4>::from(&value.as_bytes()[32..]) + } +} + +impl Generate<AsymmetricKeyPair<V4>, V4> for AsymmetricKeyPair<V4> { + fn generate() -> Result<AsymmetricKeyPair<V4>, Error> { + let key_pair = KeyPair::generate(); + + let secret = AsymmetricSecretKey::<V4>::from(key_pair.sk.as_ref()) + .map_err(|_| Error::KeyGeneration)?; + let public = AsymmetricPublicKey::<V4>::from(key_pair.pk.as_ref()) + .map_err(|_| Error::KeyGeneration)?; + + Ok(Self { public, secret }) + } +} + +impl Generate<SymmetricKey<V4>, V4> for SymmetricKey<V4> { + fn generate() -> Result<SymmetricKey<V4>, Error> { + let mut rng_bytes = vec![0u8; V4::LOCAL_KEY]; + V4::validate_local_key(&rng_bytes)?; + getrandom::getrandom(&mut rng_bytes)?; + + Ok(Self { + bytes: rng_bytes, + phantom: PhantomData, + }) + } +} + +/// PASETO v4 public tokens. +pub struct PublicToken; + +impl PublicToken { + /// The header and purpose for the public token: `v4.public.`. + pub const HEADER: &'static str = "v4.public."; + + /// Create a public token. + pub fn sign( + secret_key: &AsymmetricSecretKey<V4>, + message: &[u8], + footer: Option<&[u8]>, + implicit_assert: Option<&[u8]>, + ) -> Result<String, Error> { + if message.is_empty() { + return Err(Error::EmptyPayload); + } + + let sk = SecretKey::from_slice(secret_key.as_bytes()).map_err(|_| Error::Key)?; + + let f = footer.unwrap_or(&[]); + let i = implicit_assert.unwrap_or(&[]); + let m2 = pae::pae(&[Self::HEADER.as_bytes(), message, f, i])?; + let sig = sk.sign(m2, None); + + let mut m_sig: Vec<u8> = Vec::from(message); + m_sig.extend_from_slice(sig.as_ref()); + + let token_no_footer = format!("{}{}", Self::HEADER, encode_b64(m_sig)?); + + if f.is_empty() { + Ok(token_no_footer) + } else { + Ok(format!("{}.{}", token_no_footer, encode_b64(f)?)) + } + } + + /// Verify a public token. + /// + /// If `footer.is_none()`, then it will be validated but not compared to a known value. + /// If `footer.is_some()`, then it will be validated AND compared to the known value. + pub fn verify( + public_key: &AsymmetricPublicKey<V4>, + token: &UntrustedToken<Public, V4>, + footer: Option<&[u8]>, + implicit_assert: Option<&[u8]>, + ) -> Result<TrustedToken, Error> { + validate_footer_untrusted_token(token, footer)?; + + let f = token.untrusted_footer(); + let i = implicit_assert.unwrap_or(&[]); + let sm = token.untrusted_message(); + let m = token.untrusted_payload(); + let s = sm[m.len()..m.len() + V4::PUBLIC_SIG].as_ref(); + + let m2 = pae::pae(&[Self::HEADER.as_bytes(), m, f, i])?; + let pk: PublicKey = PublicKey::from_slice(public_key.as_bytes()).map_err(|_| Error::Key)?; + + debug_assert!(s.len() == V4::PUBLIC_SIG); + // If the below fails, it is an invalid signature. + let sig = Signature::from_slice(s).map_err(|_| Error::TokenValidation)?; + + if pk.verify(m2, &sig).is_ok() { + TrustedToken::_new(Self::HEADER, m, f, i) + } else { + Err(Error::TokenValidation) + } + } +} + +/// PASETO v4 local tokens. +pub struct LocalToken; + +impl LocalToken { + /// The header and purpose for the local token: `v4.local.`. + pub const HEADER: &'static str = "v4.local."; + + /// Domain separator for key-splitting the encryption key (21 in length as bytes). + const DOMAIN_SEPARATOR_ENC: &'static str = "paseto-encryption-key"; + + /// Domain separator for key-splitting the authentication key (24 in length as bytes). + const DOMAIN_SEPARATOR_AUTH: &'static str = "paseto-auth-key-for-aead"; + + const M1_LEN: usize = V4::LOCAL_NONCE + Self::DOMAIN_SEPARATOR_ENC.as_bytes().len(); + const M2_LEN: usize = V4::LOCAL_NONCE + Self::DOMAIN_SEPARATOR_AUTH.as_bytes().len(); + + /// Split the user-provided secret key into keys used for encryption and authentication. + fn key_split(sk: &[u8], n: &[u8]) -> Result<(EncKey, EncNonce, AuthKey), Error> { + debug_assert_eq!(n.len(), V4::LOCAL_NONCE); + debug_assert_eq!(sk.len(), V4::LOCAL_KEY); + + let mut m1 = [0u8; Self::M1_LEN]; + m1[..21].copy_from_slice(Self::DOMAIN_SEPARATOR_ENC.as_bytes()); + m1[21..].copy_from_slice(n); + + let mut m2 = [0u8; Self::M2_LEN]; + m2[..24].copy_from_slice(Self::DOMAIN_SEPARATOR_AUTH.as_bytes()); + m2[24..].copy_from_slice(n); + + let sk = blake2b::SecretKey::from_slice(sk).unwrap(); + let mut b2_ctx = Blake2b::new(&sk, 56).unwrap(); + b2_ctx.update(&m1).unwrap(); + let tmp = b2_ctx.finalize().unwrap(); + let enc_key = EncKey::from_slice(&tmp.unprotected_as_bytes()[..32]).unwrap(); + let n2 = EncNonce::from_slice(&tmp.unprotected_as_bytes()[32..]).unwrap(); + + b2_ctx = Blake2b::new(&sk, V4::LOCAL_TAG).unwrap(); + b2_ctx.update(&m2).unwrap(); + let auth_key = + AuthKey::from_slice(b2_ctx.finalize().unwrap().unprotected_as_bytes()).unwrap(); + + Ok((enc_key, n2, auth_key)) + } + + /// Encrypt and authenticate a message using nonce directly. + pub(crate) fn encrypt_with_nonce( + secret_key: &SymmetricKey<V4>, + nonce: &[u8], + message: &[u8], + footer: Option<&[u8]>, + implicit_assert: Option<&[u8]>, + ) -> Result<String, Error> { + debug_assert_eq!(nonce.len(), V4::LOCAL_NONCE); + let f = footer.unwrap_or(&[]); + let i = implicit_assert.unwrap_or(&[]); + + let (enc_key, n2, auth_key) = Self::key_split(secret_key.as_bytes(), nonce)?; + + let mut ciphertext = vec![0u8; message.len()]; + xchacha20::encrypt(&enc_key, &n2, 0, message, &mut ciphertext) + .map_err(|_| Error::Encryption)?; + let pre_auth = pae::pae(&[Self::HEADER.as_bytes(), nonce, ciphertext.as_slice(), f, i])?; + + let mut b2_ctx = Blake2b::new(&auth_key, V4::LOCAL_TAG).unwrap(); + b2_ctx + .update(pre_auth.as_slice()) + .map_err(|_| Error::Encryption)?; + let tag = b2_ctx.finalize().map_err(|_| Error::Encryption)?; + + // nonce and tag lengths are both 32, so obviously safe to op::add + let concat_len: usize = match (nonce.len() + tag.len()).checked_add(ciphertext.len()) { + Some(len) => len, + None => return Err(Error::Encryption), + }; + let mut concat = vec![0u8; concat_len]; + concat[..32].copy_from_slice(nonce); + concat[32..32 + ciphertext.len()].copy_from_slice(ciphertext.as_slice()); + concat[concat_len - V4::LOCAL_TAG..].copy_from_slice(tag.unprotected_as_bytes()); + + let token_no_footer = format!("{}{}", Self::HEADER, encode_b64(concat)?); + + if f.is_empty() { + Ok(token_no_footer) + } else { + Ok(format!("{}.{}", token_no_footer, encode_b64(f)?)) + } + } + + /// Create a local token. + pub fn encrypt( + secret_key: &SymmetricKey<V4>, + message: &[u8], + footer: Option<&[u8]>, + implicit_assert: Option<&[u8]>, + ) -> Result<String, Error> { + if message.is_empty() { + return Err(Error::EmptyPayload); + } + + let mut n = [0u8; V4::LOCAL_NONCE]; + getrandom::getrandom(&mut n)?; + + Self::encrypt_with_nonce(secret_key, &n, message, footer, implicit_assert) + } + + #[allow(clippy::many_single_char_names)] // The single-char names match those in the spec + /// Verify and decrypt a local token. + /// + /// If `footer.is_none()`, then it will be validated but not compared to a known value. + /// If `footer.is_some()`, then it will be validated AND compared to the known value. + pub fn decrypt( + secret_key: &SymmetricKey<V4>, + token: &UntrustedToken<Local, V4>, + footer: Option<&[u8]>, + implicit_assert: Option<&[u8]>, + ) -> Result<TrustedToken, Error> { + validate_footer_untrusted_token(token, footer)?; + + let f = token.untrusted_footer(); + let i = implicit_assert.unwrap_or(&[]); + let nc = token.untrusted_message(); + + let mut n: [u8; 32] = [0u8; V4::LOCAL_NONCE]; + n.copy_from_slice(nc[..V4::LOCAL_NONCE].as_ref()); + let c = token.untrusted_payload(); + let t = nc[nc.len() - V4::LOCAL_TAG..].as_ref(); + + let (enc_key, n2, auth_key) = Self::key_split(secret_key.as_bytes(), &n)?; + + let pre_auth = pae::pae(&[Self::HEADER.as_bytes(), n.as_ref(), c, f, i])?; + let expected_tag = blake2b::Tag::from_slice(t).map_err(|_| Error::TokenValidation)?; + blake2b::Blake2b::verify(&expected_tag, &auth_key, 32, pre_auth.as_slice()) + .map_err(|_| Error::TokenValidation)?; + + let mut out = vec![0u8; c.len()]; + xchacha20::decrypt(&enc_key, &n2, 0, c, &mut out).map_err(|_| Error::TokenValidation)?; + + TrustedToken::_new(Self::HEADER, &out, f, i) + } +} + +#[cfg(test)] +#[cfg(feature = "std")] +mod test_vectors { + + use hex; + + use super::*; + use core::convert::TryFrom; + use std::fs::File; + use std::io::BufReader; + + use crate::claims::Claims; + use crate::common::tests::*; + + fn test_local(test: &PasetoTest) { + debug_assert!(test.nonce.is_some()); + debug_assert!(test.key.is_some()); + + let sk = + SymmetricKey::<V4>::from(&hex::decode(test.key.as_ref().unwrap()).unwrap()).unwrap(); + + let nonce = hex::decode(test.nonce.as_ref().unwrap()).unwrap(); + let footer: Option<&[u8]> = if test.footer.as_bytes().is_empty() { + None + } else { + Some(test.footer.as_bytes()) + }; + let implicit_assert = test.implicit_assertion.as_bytes(); + + // payload is null when we expect failure + if test.expect_fail { + if let Ok(ut) = UntrustedToken::<Local, V4>::try_from(&test.token) { + assert!(LocalToken::decrypt(&sk, &ut, footer, Some(implicit_assert)).is_err()); + } + + return; + } + + let message = test.payload.as_ref().unwrap().as_str().unwrap(); + + let actual = LocalToken::encrypt_with_nonce( + &sk, + &nonce, + message.as_bytes(), + footer, + Some(implicit_assert), + ) + .unwrap(); + assert_eq!(actual, test.token, "Failed {:?}", test.name); + + let ut = UntrustedToken::<Local, V4>::try_from(&test.token).unwrap(); + let trusted = LocalToken::decrypt(&sk, &ut, footer, Some(implicit_assert)).unwrap(); + assert_eq!(trusted.payload(), message, "Failed {:?}", test.name); + assert_eq!(trusted.footer(), test.footer.as_bytes()); + assert_eq!(trusted.header(), LocalToken::HEADER); + assert_eq!(trusted.implicit_assert(), implicit_assert); + + let parsed_claims = Claims::from_bytes(trusted.payload().as_bytes()).unwrap(); + let test_vector_claims = serde_json::from_str::<Payload>(message).unwrap(); + + assert_eq!( + parsed_claims.get_claim("data").unwrap().as_str().unwrap(), + test_vector_claims.data, + ); + assert_eq!( + parsed_claims.get_claim("exp").unwrap().as_str().unwrap(), + test_vector_claims.exp, + ); + } + + fn test_public(test: &PasetoTest) { + debug_assert!(test.public_key.is_some()); + debug_assert!(test.secret_key.is_some()); + + let sk = AsymmetricSecretKey::<V4>::from( + &hex::decode(test.secret_key.as_ref().unwrap()).unwrap(), + ) + .unwrap(); + let pk = AsymmetricPublicKey::<V4>::from( + &hex::decode(test.public_key.as_ref().unwrap()).unwrap(), + ) + .unwrap(); + let footer: Option<&[u8]> = if test.footer.as_bytes().is_empty() { + None + } else { + Some(test.footer.as_bytes()) + }; + let implicit_assert = test.implicit_assertion.as_bytes(); + + // payload is null when we expect failure + if test.expect_fail { + if let Ok(ut) = UntrustedToken::<Public, V4>::try_from(&test.token) { + assert!(PublicToken::verify(&pk, &ut, footer, Some(implicit_assert)).is_err()); + } + + return; + } + + let message = test.payload.as_ref().unwrap().as_str().unwrap(); + + let actual = + PublicToken::sign(&sk, message.as_bytes(), footer, Some(implicit_assert)).unwrap(); + assert_eq!(actual, test.token, "Failed {:?}", test.name); + let ut = UntrustedToken::<Public, V4>::try_from(&test.token).unwrap(); + + let trusted = PublicToken::verify(&pk, &ut, footer, Some(implicit_assert)).unwrap(); + assert_eq!(trusted.payload(), message); + assert_eq!(trusted.footer(), test.footer.as_bytes()); + assert_eq!(trusted.header(), PublicToken::HEADER); + assert_eq!(trusted.implicit_assert(), implicit_assert); + } + + #[test] + fn run_test_vectors() { + let path = "./test_vectors/v4.json"; + let file = File::open(path).unwrap(); + let reader = BufReader::new(file); + let tests: TestFile = serde_json::from_reader(reader).unwrap(); + + for t in tests.tests { + // v4.public + if t.public_key.is_some() { + test_public(&t); + } + // v4.local + if t.nonce.is_some() { + test_local(&t); + } + } + } +} + +#[cfg(test)] +mod test_tokens { + use super::*; + use crate::common::decode_b64; + use crate::keys::{AsymmetricKeyPair, Generate, SymmetricKey}; + use crate::token::UntrustedToken; + use core::convert::TryFrom; + + const TEST_LOCAL_SK_BYTES: [u8; 32] = [ + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + ]; + + pub(crate) const TEST_SK_BYTES: [u8; 64] = [ + 180, 203, 251, 67, 223, 76, 226, 16, 114, 125, 149, 62, 74, 113, 51, 7, 250, 25, 187, 125, + 159, 133, 4, 20, 56, 217, 225, 27, 148, 42, 55, 116, 30, 185, 219, 187, 188, 4, 124, 3, + 253, 112, 96, 78, 0, 113, 240, 152, 126, 22, 178, 139, 117, 114, 37, 193, 31, 0, 65, 93, + 14, 32, 177, 162, + ]; + + const TEST_PK_BYTES: [u8; 32] = [ + 30, 185, 219, 187, 188, 4, 124, 3, 253, 112, 96, 78, 0, 113, 240, 152, 126, 22, 178, 139, + 117, 114, 37, 193, 31, 0, 65, 93, 14, 32, 177, 162, + ]; + + const MESSAGE: &str = + "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}"; + const FOOTER: &str = "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}"; + const VALID_PUBLIC_TOKEN: &str = "v4.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9v3Jt8mx_TdM2ceTGoqwrh4yDFn0XsHvvV_D0DtwQxVrJEBMl0F2caAdgnpKlt4p7xBnx1HcO-SPo8FPp214HDw.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + const VALID_LOCAL_TOKEN: &str = "v4.local.32VIErrEkmY4JVILovbmfPXKW9wT1OdQepjMTC_MOtjA4kiqw7_tcaOM5GNEcnTxl60WkwMsYXw6FSNb_UdJPXjpzm0KW9ojM5f4O2mRvE2IcweP-PRdoHjd5-RHCiExR1IK6t4x-RMNXtQNbz7FvFZ_G-lFpk5RG3EOrwDL6CgDqcerSQ.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9"; + + #[test] + fn test_gen_keypair() { + let kp = AsymmetricKeyPair::<V4>::generate().unwrap(); + + let token = PublicToken::sign(&kp.secret, MESSAGE.as_bytes(), None, None).unwrap(); + + let ut = UntrustedToken::<Public, V4>::try_from(&token).unwrap(); + assert!(PublicToken::verify(&kp.public, &ut, None, None).is_ok()); + } + + #[test] + fn test_untrusted_token_usage() { + // Local + let sk = SymmetricKey::<V4>::generate().unwrap(); + let token = + LocalToken::encrypt(&sk, MESSAGE.as_bytes(), Some(FOOTER.as_bytes()), None).unwrap(); + + let untrusted_token = UntrustedToken::<Local, V4>::try_from(token.as_str()).unwrap(); + let _ = LocalToken::decrypt( + &sk, + &untrusted_token, + Some(untrusted_token.untrusted_footer()), + None, + ) + .unwrap(); + + // Public + let kp = AsymmetricKeyPair::<V4>::generate().unwrap(); + let token = PublicToken::sign( + &kp.secret, + MESSAGE.as_bytes(), + Some(FOOTER.as_bytes()), + None, + ) + .unwrap(); + + let untrusted_token = UntrustedToken::<Public, V4>::try_from(token.as_str()).unwrap(); + assert!( + PublicToken::verify(&kp.public, &untrusted_token, Some(FOOTER.as_bytes()), None) + .is_ok() + ); + } + + #[test] + fn test_roundtrip_local() { + let sk = SymmetricKey::<V4>::generate().unwrap(); + let message = "token payload"; + + let token = LocalToken::encrypt(&sk, message.as_bytes(), None, None).unwrap(); + let ut = UntrustedToken::<Local, V4>::try_from(&token).unwrap(); + let trusted_token = LocalToken::decrypt(&sk, &ut, None, None).unwrap(); + + assert_eq!(trusted_token.payload(), message); + } + + #[test] + fn test_roundtrip_public() { + let test_sk = AsymmetricSecretKey::<V4>::from(&TEST_SK_BYTES).unwrap(); + let test_pk = AsymmetricPublicKey::<V4>::from(&TEST_PK_BYTES).unwrap(); + + let token = PublicToken::sign(&test_sk, MESSAGE.as_bytes(), None, None).unwrap(); + let ut = UntrustedToken::<Public, V4>::try_from(&token).unwrap(); + + assert!(PublicToken::verify(&test_pk, &ut, None, None).is_ok()); + } + + #[test] + fn footer_logic() { + let test_local_sk = SymmetricKey::<V4>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + let test_sk = AsymmetricSecretKey::<V4>::from(&TEST_SK_BYTES).unwrap(); + let test_pk = AsymmetricPublicKey::<V4>::from(&TEST_PK_BYTES).unwrap(); + let message = + b"{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}"; + + // We create a token with Some(footer) and with None + let actual_some = UntrustedToken::<Public, V4>::try_from( + &PublicToken::sign(&test_sk, message, Some(FOOTER.as_bytes()), None).unwrap(), + ) + .unwrap(); + let actual_none = UntrustedToken::<Public, V4>::try_from( + &PublicToken::sign(&test_sk, message, None, None).unwrap(), + ) + .unwrap(); + + // token = Some(footer) = validate and compare + // token = None(footer) = validate only + + // We should be able to validate with None if created with Some() (excludes constant-time + // comparison with known value) + assert!(PublicToken::verify(&test_pk, &actual_some, None, None).is_ok()); + // We should be able to validate with Some() if created with Some() + assert!(PublicToken::verify(&test_pk, &actual_some, Some(FOOTER.as_bytes()), None).is_ok()); + // We should NOT be able to validate with Some() if created with None + assert!( + PublicToken::verify(&test_pk, &actual_none, Some(FOOTER.as_bytes()), None).is_err() + ); + + let actual_some = UntrustedToken::<Local, V4>::try_from( + &LocalToken::encrypt(&test_local_sk, message, Some(FOOTER.as_bytes()), None).unwrap(), + ) + .unwrap(); + let actual_none = UntrustedToken::<Local, V4>::try_from( + &LocalToken::encrypt(&test_local_sk, message, None, None).unwrap(), + ) + .unwrap(); + + // They don't equal because the nonce is random. So we only check decryption. + assert!(LocalToken::decrypt(&test_local_sk, &actual_some, None, None).is_ok()); + assert!( + LocalToken::decrypt(&test_local_sk, &actual_some, Some(FOOTER.as_bytes()), None) + .is_ok() + ); + assert!( + LocalToken::decrypt(&test_local_sk, &actual_none, Some(FOOTER.as_bytes()), None) + .is_err() + ); + } + + #[test] + fn implicit_none_some_empty_is_same() { + let test_local_sk = SymmetricKey::<V4>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + let test_sk = AsymmetricSecretKey::<V4>::from(&TEST_SK_BYTES).unwrap(); + let test_pk = AsymmetricPublicKey::<V4>::from(&TEST_PK_BYTES).unwrap(); + let message = + b"{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}"; + let implicit = b""; + + let actual_some = UntrustedToken::<Public, V4>::try_from( + &PublicToken::sign(&test_sk, message, None, Some(implicit)).unwrap(), + ) + .unwrap(); + let actual_none = UntrustedToken::<Public, V4>::try_from( + &PublicToken::sign(&test_sk, message, None, None).unwrap(), + ) + .unwrap(); + assert_eq!(actual_some, actual_none); + + assert!(PublicToken::verify(&test_pk, &actual_none, None, Some(implicit)).is_ok()); + assert!(PublicToken::verify(&test_pk, &actual_some, None, None).is_ok()); + + let actual_some = UntrustedToken::<Local, V4>::try_from( + &LocalToken::encrypt(&test_local_sk, message, None, Some(implicit)).unwrap(), + ) + .unwrap(); + let actual_none = UntrustedToken::<Local, V4>::try_from( + &LocalToken::encrypt(&test_local_sk, message, None, None).unwrap(), + ) + .unwrap(); + // They don't equal because the nonce is random. So we only check decryption. + + assert!(LocalToken::decrypt(&test_local_sk, &actual_none, None, Some(implicit)).is_ok()); + assert!(LocalToken::decrypt(&test_local_sk, &actual_some, None, None).is_ok()); + } + + #[test] + // NOTE: See https://github.com/paseto-standard/paseto-spec/issues/17 + fn empty_payload() { + let test_local_sk = SymmetricKey::<V4>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + let test_sk = AsymmetricSecretKey::<V4>::from(&TEST_SK_BYTES).unwrap(); + + assert_eq!( + PublicToken::sign(&test_sk, b"", None, None).unwrap_err(), + Error::EmptyPayload + ); + assert_eq!( + LocalToken::encrypt(&test_local_sk, b"", None, None).unwrap_err(), + Error::EmptyPayload + ); + } + + #[test] + fn err_on_modified_footer() { + let test_pk = AsymmetricPublicKey::<V4>::from(&TEST_PK_BYTES).unwrap(); + let test_local_sk = SymmetricKey::<V4>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V4>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(FOOTER.replace("kid", "mid").as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V4>::try_from(VALID_LOCAL_TOKEN).unwrap(), + Some(FOOTER.replace("kid", "mid").as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_wrong_implicit_assert() { + let test_pk = AsymmetricPublicKey::<V4>::from(&TEST_PK_BYTES).unwrap(); + let test_local_sk = SymmetricKey::<V4>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + assert!(PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V4>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .is_ok()); + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V4>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(FOOTER.as_bytes()), + Some(b"WRONG IMPLICIT") + ) + .unwrap_err(), + Error::TokenValidation + ); + assert!(LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V4>::try_from(VALID_LOCAL_TOKEN).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .is_ok()); + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V4>::try_from(VALID_LOCAL_TOKEN).unwrap(), + Some(FOOTER.as_bytes()), + Some(b"WRONG IMPLICIT") + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_footer_in_token_none_supplied() { + let test_pk = AsymmetricPublicKey::<V4>::from(&TEST_PK_BYTES).unwrap(); + let test_local_sk = SymmetricKey::<V4>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V4>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(b""), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V4>::try_from(VALID_LOCAL_TOKEN).unwrap(), + Some(b""), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_no_footer_in_token_some_supplied() { + let test_pk = AsymmetricPublicKey::<V4>::from(&TEST_PK_BYTES).unwrap(); + let test_local_sk = SymmetricKey::<V4>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + let split_public = VALID_PUBLIC_TOKEN.split('.').collect::<Vec<&str>>(); + let invalid_public: String = format!( + "{}.{}.{}", + split_public[0], split_public[1], split_public[2] + ); + + let split_local = VALID_LOCAL_TOKEN.split('.').collect::<Vec<&str>>(); + let invalid_local: String = + format!("{}.{}.{}", split_local[0], split_local[1], split_local[2]); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V4>::try_from(&invalid_public).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V4>::try_from(&invalid_local).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_modified_signature() { + let test_pk = AsymmetricPublicKey::<V4>::from(&TEST_PK_BYTES).unwrap(); + + let mut split_public = VALID_PUBLIC_TOKEN.split('.').collect::<Vec<&str>>(); + let mut bad_sig = decode_b64(split_public[2]).unwrap(); + bad_sig.copy_within(0..32, 32); + let tmp = encode_b64(bad_sig).unwrap(); + split_public[2] = &tmp; + let invalid_public: String = format!( + "{}.{}.{}.{}", + split_public[0], split_public[1], split_public[2], split_public[3] + ); + + assert_eq!( + PublicToken::verify( + &test_pk, + &UntrustedToken::<Public, V4>::try_from(&invalid_public).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_modified_tag() { + let test_local_sk = SymmetricKey::<V4>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + let mut split_local = VALID_LOCAL_TOKEN.split('.').collect::<Vec<&str>>(); + let mut bad_tag = decode_b64(split_local[2]).unwrap(); + let tlen = bad_tag.len(); + bad_tag.copy_within(0..16, tlen - 16); + let tmp = encode_b64(bad_tag).unwrap(); + split_local[2] = &tmp; + let invalid_local: String = format!( + "{}.{}.{}.{}", + split_local[0], split_local[1], split_local[2], split_local[3] + ); + + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V4>::try_from(&invalid_local).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_modified_ciphertext() { + let test_local_sk = SymmetricKey::<V4>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + let mut split_local = VALID_LOCAL_TOKEN.split('.').collect::<Vec<&str>>(); + let mut bad_ct = decode_b64(split_local[2]).unwrap(); + let ctlen = bad_ct.len(); + bad_ct.copy_within((ctlen - 16)..ctlen, 24); + let tmp = encode_b64(bad_ct).unwrap(); + split_local[2] = &tmp; + let invalid_local: String = format!( + "{}.{}.{}.{}", + split_local[0], split_local[1], split_local[2], split_local[3] + ); + + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V4>::try_from(&invalid_local).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_modified_nonce() { + let test_local_sk = SymmetricKey::<V4>::from(&TEST_LOCAL_SK_BYTES).unwrap(); + + let mut split_local = VALID_LOCAL_TOKEN.split('.').collect::<Vec<&str>>(); + let mut bad_nonce = decode_b64(split_local[2]).unwrap(); + let nlen = bad_nonce.len(); + bad_nonce.copy_within((nlen - 24)..nlen, 0); + let tmp = encode_b64(bad_nonce).unwrap(); + split_local[2] = &tmp; + let invalid_local: String = format!( + "{}.{}.{}.{}", + split_local[0], split_local[1], split_local[2], split_local[3] + ); + + assert_eq!( + LocalToken::decrypt( + &test_local_sk, + &UntrustedToken::<Local, V4>::try_from(&invalid_local).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_invalid_public_secret_key() { + let bad_pk = AsymmetricPublicKey::<V4>::from(&[0u8; 32]).unwrap(); + + assert_eq!( + PublicToken::verify( + &bad_pk, + &UntrustedToken::<Public, V4>::try_from(VALID_PUBLIC_TOKEN).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } + + #[test] + fn err_on_invalid_shared_secret_key() { + let bad_local_sk = SymmetricKey::<V4>::from(&[0u8; 32]).unwrap(); + + assert_eq!( + LocalToken::decrypt( + &bad_local_sk, + &UntrustedToken::<Local, V4>::try_from(VALID_LOCAL_TOKEN).unwrap(), + Some(FOOTER.as_bytes()), + None + ) + .unwrap_err(), + Error::TokenValidation + ); + } +} + +#[cfg(test)] +mod test_keys { + use super::*; + use crate::version4::test_tokens::TEST_SK_BYTES; + + #[test] + fn test_symmetric_gen() { + let randomv = SymmetricKey::<V4>::generate().unwrap(); + assert_ne!(randomv.as_bytes(), &[0u8; 32]); + } + + #[test] + fn test_invalid_sizes() { + assert!(AsymmetricSecretKey::<V4>::from(&[1u8; 63]).is_err()); + assert!(AsymmetricSecretKey::<V4>::from(&TEST_SK_BYTES).is_ok()); + assert!(AsymmetricSecretKey::<V4>::from(&[1u8; 65]).is_err()); + + assert!(AsymmetricPublicKey::<V4>::from(&[1u8; 31]).is_err()); + assert!(AsymmetricPublicKey::<V4>::from(&[1u8; 32]).is_ok()); + assert!(AsymmetricPublicKey::<V4>::from(&[1u8; 33]).is_err()); + + assert!(SymmetricKey::<V4>::from(&[0u8; 31]).is_err()); + assert!(SymmetricKey::<V4>::from(&[0u8; 32]).is_ok()); + assert!(SymmetricKey::<V4>::from(&[0u8; 33]).is_err()); + } + + #[test] + fn try_from_secret_to_public() { + let kpv4 = AsymmetricKeyPair::<V4>::generate().unwrap(); + let pubv4 = AsymmetricPublicKey::<V4>::try_from(&kpv4.secret).unwrap(); + assert_eq!(pubv4.as_bytes(), kpv4.public.as_bytes()); + assert_eq!(pubv4, kpv4.public); + assert_eq!(&kpv4.secret.as_bytes()[32..], pubv4.as_bytes()); + } + + #[test] + fn test_trait_impls() { + let debug = format!("{:?}", SymmetricKey::<V4>::generate().unwrap()); + assert_eq!(debug, "SymmetricKey {***OMITTED***}"); + + let randomv = SymmetricKey::<V4>::generate().unwrap(); + let zero = SymmetricKey::<V4>::from(&[0u8; V4::LOCAL_KEY]).unwrap(); + assert_ne!(randomv, zero); + + let debug = format!("{:?}", AsymmetricKeyPair::<V4>::generate().unwrap().secret); + assert_eq!(debug, "AsymmetricSecretKey {***OMITTED***}"); + + let random1 = AsymmetricKeyPair::<V4>::generate().unwrap(); + let random2 = AsymmetricKeyPair::<V4>::generate().unwrap(); + assert_ne!(random1.secret, random2.secret); + } + + #[test] + fn test_clone() { + let sk = SymmetricKey::<V4>::generate().unwrap(); + assert_eq!(sk, sk.clone()); + + let kp = AsymmetricKeyPair::<V4>::generate().unwrap(); + assert_eq!(kp.secret, kp.secret.clone()); + assert_eq!(kp.public, kp.public.clone()); + } +} diff --git a/vendor/pasetors/test_vectors/PASERK/k2.lid.json b/vendor/pasetors/test_vectors/PASERK/k2.lid.json new file mode 100644 index 000000000..a0bcfcb1c --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k2.lid.json @@ -0,0 +1,30 @@ +{ + "name": "PASERK k2.lid Test Vectors", + "tests": [ + { + "name": "k2.lid-1", + "expect-fail": false, + "key": "0000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k2.lid.WpgZ4rDluvqGSwOFQfbkxem-i3lRJ92XPPPwHEDm-gtE" + }, + { + "name": "k2.lid-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "paserk": "k2.lid.keK316jg65NYOw6BbBHJHeQ7YWpyuHfNRxBVtY3kNoXG" + }, + { + "name": "k2.lid-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": "k2.lid.n-Eq3LSDD2sdKE5DjJmZmXQ7-O7BT8mhYoSg_TvDC6x1" + }, + { + "name": "k2.lid-fail-1", + "expect-fail": true, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e", + "paserk": null, + "comment": "If the key is too short, this must fail to serialize." + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k2.local.json b/vendor/pasetors/test_vectors/PASERK/k2.local.json new file mode 100644 index 000000000..f616dbf0e --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k2.local.json @@ -0,0 +1,37 @@ +{ + "name": "PASERK k2.local Test Vectors", + "tests": [ + { + "name": "k2.local-1", + "expect-fail": false, + "key": "0000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k2.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "name": "k2.local-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "paserk": "k2.local.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8" + }, + { + "name": "k2.local-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": "k2.local.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjpA" + }, + { + "name": "k2.local-fail-1", + "expect-fail": true, + "key": null, + "paserk": "k2.local.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjp", + "comment": "If the PASERK is too short, this must fail to deserialize." + }, + { + "name": "k2.local-fail-2", + "expect-fail": true, + "key": null, + "paserk": "k1.local.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjpA", + "comment": "Implementations MUST NOT accept a PASERK of the wrong version." + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k2.pid.json b/vendor/pasetors/test_vectors/PASERK/k2.pid.json new file mode 100644 index 000000000..d511bd140 --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k2.pid.json @@ -0,0 +1,37 @@ +{ + "name": "PASERK k2.pid Test Vectors", + "tests": [ + { + "name": "k2.pid-1", + "expect-fail": false, + "key": "0000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k2.pid.gUztDB_2F1oxWaUa0RYxGYtLw_0TN-g5mw_M7HUMLh7D" + }, + { + "name": "k2.pid-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "paserk": "k2.pid.4zgEvkSaB64DlcV9ChYZPEqBATLwUsB5zCrlpEOk2wD9" + }, + { + "name": "k2.pid-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": "k2.pid.2Jd0YsfxY7YWVCHWG0BOc9CCVZmSqRXz0B-p7ENnkxqG" + }, + { + "name": "k2.pid-fail-1", + "expect-fail": true, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e", + "paserk": null, + "comment": "Small public keys must fail to serialize" + }, + { + "name": "k2.pid-fail-2", + "expect-fail": true, + "key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyaTgTt53ph3p5GHgwoGW\nwz5hRfWXSQA08NCOwe0FEgALWos9GCjNFCd723nCHxBtN1qd74MSh/uN88JPIbwx\nKheDp4kxo4YMN5trPaF0e9G6Bj1N02HnanxFLW+gmLbgYO/SZYfWF/M8yLBcu5Y1\nOt0ZxDDDXS9wIQTtBE0ne3YbxgZJAZTU5XqyQ1DxdzYyC5lF6yBaR5UQtCYTnXAA\npVRuUI2Sd6L1E2vl9bSBumZ5IpNxkRnAwIMjeTJB/0AIELh0mE5vwdihOCbdV6al\nUyhKC1+1w/FW6HWcp/JG1kKC8DPIidZ78Bbqv9YFzkAbNni5eSBOsXVBKG78Zsc8\nowIDAQAB\n-----END PUBLIC KEY-----", + "paserk": null, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version." + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k2.public.json b/vendor/pasetors/test_vectors/PASERK/k2.public.json new file mode 100644 index 000000000..37608f8d7 --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k2.public.json @@ -0,0 +1,30 @@ +{ + "name": "PASERK k2.public Test Vectors", + "tests": [ + { + "name": "k2.public-1", + "expect-fail": false, + "key": "0000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k2.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "name": "k2.public-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "paserk": "k2.public.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8" + }, + { + "name": "k2.public-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": "k2.public.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjpA" + }, + { + "name": "k2.public-fail-1", + "expect-fail": true, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version.", + "key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyaTgTt53ph3p5GHgwoGW\nwz5hRfWXSQA08NCOwe0FEgALWos9GCjNFCd723nCHxBtN1qd74MSh/uN88JPIbwx\nKheDp4kxo4YMN5trPaF0e9G6Bj1N02HnanxFLW+gmLbgYO/SZYfWF/M8yLBcu5Y1\nOt0ZxDDDXS9wIQTtBE0ne3YbxgZJAZTU5XqyQ1DxdzYyC5lF6yBaR5UQtCYTnXAA\npVRuUI2Sd6L1E2vl9bSBumZ5IpNxkRnAwIMjeTJB/0AIELh0mE5vwdihOCbdV6al\nUyhKC1+1w/FW6HWcp/JG1kKC8DPIidZ78Bbqv9YFzkAbNni5eSBOsXVBKG78Zsc8\nowIDAQAB\n-----END PUBLIC KEY-----", + "paserk": null + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k2.secret.json b/vendor/pasetors/test_vectors/PASERK/k2.secret.json new file mode 100644 index 000000000..de814619c --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k2.secret.json @@ -0,0 +1,46 @@ +{ + "name": "PASERK k2.secret Test Vectors", + "tests": [ + { + "name": "k2.secret-1", + "expect-fail": false, + "key": "00000000000000000000000000000000000000000000000000000000000000003b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29", + "secret-key-seed": "0000000000000000000000000000000000000000000000000000000000000000", + "public-key": "3b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29", + "paserk": "k2.secret.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7aie8zrakLWKjqNAqbw1zZTIVdx3iQ6Y6wEihi1naKQ" + }, + { + "name": "k2.secret-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f1ce56a48c82ff99162a14bc544612674e5d61fb9317e65d4055780fdbcb4dc35", + "secret-key-seed": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "public-key": "1ce56a48c82ff99162a14bc544612674e5d61fb9317e65d4055780fdbcb4dc35", + "paserk": "k2.secret.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8c5WpIyC_5kWKhS8VEYSZ05dYfuTF-ZdQFV4D9vLTcNQ" + }, + { + "name": "k2.secret-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e9060fe37571a5d6e7d30b15154ce4a9fb92c70c870848f4ccdf1626588097f73f7", + "secret-key-seed": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "public-key": "60fe37571a5d6e7d30b15154ce4a9fb92c70c870848f4ccdf1626588097f73f7", + "paserk": "k2.secret.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjpBg_jdXGl1ufTCxUVTOSp-5LHDIcISPTM3xYmWICX9z9w" + }, + { + "name": "k2.secret-fail-1", + "expect-fail": true, + "comment": "Short keys must be rejected", + "key": "7172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e9060fe37571a5d6e7d30b15154ce4a9fb92c70c870848f4ccdf1626588097f73", + "secret-key-seed": "7172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "public-key": "60fe37571a5d6e7d30b15154ce4a9fb92c70c870848f4ccdf1626588097f73f7", + "paserk": null + }, + { + "name": "k2.secret-fail-2", + "expect-fail": true, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version.", + "key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAyaTgTt53ph3p5GHgwoGWwz5hRfWXSQA08NCOwe0FEgALWos9\nGCjNFCd723nCHxBtN1qd74MSh/uN88JPIbwxKheDp4kxo4YMN5trPaF0e9G6Bj1N\n02HnanxFLW+gmLbgYO/SZYfWF/M8yLBcu5Y1Ot0ZxDDDXS9wIQTtBE0ne3YbxgZJ\nAZTU5XqyQ1DxdzYyC5lF6yBaR5UQtCYTnXAApVRuUI2Sd6L1E2vl9bSBumZ5IpNx\nkRnAwIMjeTJB/0AIELh0mE5vwdihOCbdV6alUyhKC1+1w/FW6HWcp/JG1kKC8DPI\nidZ78Bbqv9YFzkAbNni5eSBOsXVBKG78Zsc8owIDAQABAoIBAF22jLDa34yKdns3\nqfd7to+C3D5hRzAcMn6Azvf9qc+VybEI6RnjTHxDZWK5EajSP4/sQ15e8ivUk0Jo\nWdJ53feL+hnQvwsab28gghSghrxM2kGwGA1XgO+SVawqJt8SjvE+Q+//01ZKK0Oy\nA0cDJjX3L9RoPUN/moMeAPFw0hqkFEhm72GSVCEY1eY+cOXmL3icxnsnlUD//SS9\nq33RxF2y5oiW1edqcRqhW/7L1yYMbxHFUcxWh8WUwjn1AAhoCOUzF8ZB+0X/PPh+\n1nYoq6xwqL0ZKDwrQ8SDhW/rNDLeO9gic5rl7EetRQRbFvsZ40AdsX2wU+lWFUkB\n42AjuoECgYEA5z/CXqDFfZ8MXCPAOeui8y5HNDtu30aR+HOXsBDnRI8huXsGND04\nFfmXR7nkghr08fFVDmE4PeKUk810YJb+IAJo8wrOZ0682n6yEMO58omqKin+iIUV\nrPXLSLo5CChrqw2J4vgzolzPw3N5I8FJdLomb9FkrV84H+IviPIylyECgYEA3znw\nAG29QX6ATEfFpGVOcogorHCntd4niaWCq5ne5sFL+EwLeVc1zD9yj1axcDelICDZ\nxCZynU7kDnrQcFkT0bjH/gC8Jk3v7XT9l1UDDqC1b7rm/X5wFIZ/rmNa1rVZhL1o\n/tKx5tvM2syJ1q95v7NdygFIEIW+qbIKbc6Wz0MCgYBsUZdQD+qx/xAhELX364I2\nepTryHMUrs+tGygQVrqdiJX5dcDgM1TUJkdQV6jLsKjPs4Vt6OgZRMrnuLMsk02R\n3M8gGQ25ok4f4nyyEZxGGWnVujn55KzUiYWhGWmhgp18UCkoYa59/Q9ss+gocV9h\nB9j9Q43vD80QUjiF4z0DQQKBgC7XQX1VibkMim93QAnXGDcAS0ij+w02qKVBjcHk\nb9mMBhz8GAxGOIu7ZJafYmxhwMyVGB0I1FQeEczYCJUKnBYN6Clsjg6bnBT/z5bJ\nx/Jx1qCzX3Uh6vLjpjc5sf4L39Tyye1u2NXQmZPwB5x9BdcsFConSq/s4K1LJtUT\n3KFxAoGBANGcQ8nObi3m4wROyKrkCWcWxFFMnpwxv0pW727Hn9wuaOs4UbesCnwm\npcMTfzGUDuzYXCtAq2pJl64HG6wsdkWmjBTJEpm6b9ibOBN3qFV2zQ0HyyKlMWxI\nuVSj9gOo61hF7UH9XB6R4HRdlpBOuIbgAWZ46dkj9/HM9ovdP0Iy\n-----END RSA PRIVATE KEY-----", + "public-key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyaTgTt53ph3p5GHgwoGW\nwz5hRfWXSQA08NCOwe0FEgALWos9GCjNFCd723nCHxBtN1qd74MSh/uN88JPIbwx\nKheDp4kxo4YMN5trPaF0e9G6Bj1N02HnanxFLW+gmLbgYO/SZYfWF/M8yLBcu5Y1\nOt0ZxDDDXS9wIQTtBE0ne3YbxgZJAZTU5XqyQ1DxdzYyC5lF6yBaR5UQtCYTnXAA\npVRuUI2Sd6L1E2vl9bSBumZ5IpNxkRnAwIMjeTJB/0AIELh0mE5vwdihOCbdV6al\nUyhKC1+1w/FW6HWcp/JG1kKC8DPIidZ78Bbqv9YFzkAbNni5eSBOsXVBKG78Zsc8\nowIDAQAB\n-----END PUBLIC KEY-----", + "paserk": null + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k2.sid.json b/vendor/pasetors/test_vectors/PASERK/k2.sid.json new file mode 100644 index 000000000..66977188c --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k2.sid.json @@ -0,0 +1,33 @@ +{ + "name": "PASERK k2.sid Test Vectors", + "tests": [ + { + "name": "k2.sid-1", + "expect-fail": false, + "key": "00000000000000000000000000000000000000000000000000000000000000003b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29", + "seed": "0000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k2.sid.72HIqql6GuWauqz7l11ZvNufO04l7Lwk1X_uPpbsx9E8" + }, + { + "name": "k2.sid-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f1ce56a48c82ff99162a14bc544612674e5d61fb9317e65d4055780fdbcb4dc35", + "seed": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "paserk": "k2.sid.9wfgiRJhydmagHQ9kKOOxQm3OXRTCPxkelCzxw1sJRkV" + }, + { + "name": "k2.sid-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e9060fe37571a5d6e7d30b15154ce4a9fb92c70c870848f4ccdf1626588097f73f7", + "seed": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": "k2.sid.t22mHkArR7jNtHWm6VzMQ6nMPP3Ab0AyX3rymFdIVG0T" + }, + { + "name": "k2.sid-fail-1", + "expect-fail": true, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version.", + "key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAyaTgTt53ph3p5GHgwoGWwz5hRfWXSQA08NCOwe0FEgALWos9\nGCjNFCd723nCHxBtN1qd74MSh/uN88JPIbwxKheDp4kxo4YMN5trPaF0e9G6Bj1N\n02HnanxFLW+gmLbgYO/SZYfWF/M8yLBcu5Y1Ot0ZxDDDXS9wIQTtBE0ne3YbxgZJ\nAZTU5XqyQ1DxdzYyC5lF6yBaR5UQtCYTnXAApVRuUI2Sd6L1E2vl9bSBumZ5IpNx\nkRnAwIMjeTJB/0AIELh0mE5vwdihOCbdV6alUyhKC1+1w/FW6HWcp/JG1kKC8DPI\nidZ78Bbqv9YFzkAbNni5eSBOsXVBKG78Zsc8owIDAQABAoIBAF22jLDa34yKdns3\nqfd7to+C3D5hRzAcMn6Azvf9qc+VybEI6RnjTHxDZWK5EajSP4/sQ15e8ivUk0Jo\nWdJ53feL+hnQvwsab28gghSghrxM2kGwGA1XgO+SVawqJt8SjvE+Q+//01ZKK0Oy\nA0cDJjX3L9RoPUN/moMeAPFw0hqkFEhm72GSVCEY1eY+cOXmL3icxnsnlUD//SS9\nq33RxF2y5oiW1edqcRqhW/7L1yYMbxHFUcxWh8WUwjn1AAhoCOUzF8ZB+0X/PPh+\n1nYoq6xwqL0ZKDwrQ8SDhW/rNDLeO9gic5rl7EetRQRbFvsZ40AdsX2wU+lWFUkB\n42AjuoECgYEA5z/CXqDFfZ8MXCPAOeui8y5HNDtu30aR+HOXsBDnRI8huXsGND04\nFfmXR7nkghr08fFVDmE4PeKUk810YJb+IAJo8wrOZ0682n6yEMO58omqKin+iIUV\nrPXLSLo5CChrqw2J4vgzolzPw3N5I8FJdLomb9FkrV84H+IviPIylyECgYEA3znw\nAG29QX6ATEfFpGVOcogorHCntd4niaWCq5ne5sFL+EwLeVc1zD9yj1axcDelICDZ\nxCZynU7kDnrQcFkT0bjH/gC8Jk3v7XT9l1UDDqC1b7rm/X5wFIZ/rmNa1rVZhL1o\n/tKx5tvM2syJ1q95v7NdygFIEIW+qbIKbc6Wz0MCgYBsUZdQD+qx/xAhELX364I2\nepTryHMUrs+tGygQVrqdiJX5dcDgM1TUJkdQV6jLsKjPs4Vt6OgZRMrnuLMsk02R\n3M8gGQ25ok4f4nyyEZxGGWnVujn55KzUiYWhGWmhgp18UCkoYa59/Q9ss+gocV9h\nB9j9Q43vD80QUjiF4z0DQQKBgC7XQX1VibkMim93QAnXGDcAS0ij+w02qKVBjcHk\nb9mMBhz8GAxGOIu7ZJafYmxhwMyVGB0I1FQeEczYCJUKnBYN6Clsjg6bnBT/z5bJ\nx/Jx1qCzX3Uh6vLjpjc5sf4L39Tyye1u2NXQmZPwB5x9BdcsFConSq/s4K1LJtUT\n3KFxAoGBANGcQ8nObi3m4wROyKrkCWcWxFFMnpwxv0pW727Hn9wuaOs4UbesCnwm\npcMTfzGUDuzYXCtAq2pJl64HG6wsdkWmjBTJEpm6b9ibOBN3qFV2zQ0HyyKlMWxI\nuVSj9gOo61hF7UH9XB6R4HRdlpBOuIbgAWZ46dkj9/HM9ovdP0Iy\n-----END RSA PRIVATE KEY-----", + "paserk": null + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k3.pid.json b/vendor/pasetors/test_vectors/PASERK/k3.pid.json new file mode 100644 index 000000000..79205380a --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k3.pid.json @@ -0,0 +1,31 @@ +{ + "name": "PASERK k3.pid Test Vectors", + "tests": [ + { + "name": "k3.pid-1", + "expect-fail": false, + "key": "02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k3.pid.mL4lGxNG7cz128frmpn83_76V9C7LmV2sHAMtJ8vIdwG" + }, + { + "name": "k3.pid-2", + "expect-fail": false, + "key": "02707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", + "paserk": "k3.pid.gnwg7IkzZyQF9wJgLLT0OpbdMT7BYmdQoG2u-xXpeeHz" + }, + { + "name": "k3.pid-fail-1", + "expect-fail": true, + "key": "02707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "paserk": null, + "comment": "Small public keys must fail to serialize" + }, + { + "name": "k3.pid-fail-2", + "expect-fail": true, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": null, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version." + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k3.public.json b/vendor/pasetors/test_vectors/PASERK/k3.public.json new file mode 100644 index 000000000..28ed9efc9 --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k3.public.json @@ -0,0 +1,24 @@ +{ + "name": "PASERK k3.public Test Vectors", + "tests": [ + { + "name": "k3.public-1", + "expect-fail": false, + "key": "02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k3.public.AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "name": "k3.public-2", + "expect-fail": false, + "key": "02707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", + "paserk": "k3.public.AnBxcnN0dXZ3eHl6e3x9fn-AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2enw" + }, + { + "name": "k3.public-fail-1", + "expect-fail": true, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": null, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version." + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k3.secret.json b/vendor/pasetors/test_vectors/PASERK/k3.secret.json new file mode 100644 index 000000000..eb877656e --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k3.secret.json @@ -0,0 +1,43 @@ +{ + "name": "PASERK k3.secret Test Vectors", + "tests": [ + { + "name": "k3.secret-1", + "expect-fail": false, + "key": "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "public-key": "2d2d2d2d2d424547494e205055424c4943204b45592d2d2d2d2d0a4d485977454159484b6f5a497a6a3043415159464b3445454143494459674145716f664b4972364c4254654f7363636538794374644734644f324b4c703575590a5766644234494a554b6a685641764a647631557062447055586a6879646771334e6866655370596d4c4739646e70692f6b704c634b666a304862306f6d6852380a36646f7845375877754d414b594c484f485836426e58704448587951366735660a2d2d2d2d2d454e44205055424c4943204b45592d2d2d2d2d", + "paserk": "k3.secret.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB" + }, + { + "name": "k3.secret-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", + "public-key": "2d2d2d2d2d424547494e205055424c4943204b45592d2d2d2d2d0a4d485977454159484b6f5a497a6a3043415159464b344545414349445967414547706b49495a4b624a667668356a33562b5562416c637174424f58376b424e6c0a69344e757946727974362b6d584c516e4c734567714e6333575a6f4d2f55516e476a4c5554574b6b2b7559597a454d537a32336a45726974455541626e624c420a4d5441432b2b7137344b564a47754e6977454b4448556239726658676a66646e0a2d2d2d2d2d454e44205055424c4943204b45592d2d2d2d2d", + "paserk": "k3.secret.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo-QkZKTlJWWl5iZmpucnZ6f" + }, + { + "name": "k3.secret-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9ea0", + "public-key": "2d2d2d2d2d424547494e205055424c4943204b45592d2d2d2d2d0a4d485977454159484b6f5a497a6a3043415159464b344545414349445967414575457544387a72334c5934574a4c3963536e6d52384b475445783449774567540a68636c326c34374e316f334345413551303370477557746a79712f6f774164684b39503968746734555439325468784a6c71485a6432555268665636714d6c420a53657a73733262506c2b366f484363475a7866624441587a34684c594e5752610a2d2d2d2d2d454e44205055424c4943204b45592d2d2d2d2d", + "paserk": "k3.secret.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo-QkZKTlJWWl5iZmpucnZ6g" + }, + { + "name": "k3.secret-fail-1", + "expect-fail": true, + "comment": "Short keys must be rejected", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "public-key": null, + "paserk": null + }, + { + "name": "k3.secret-fail-2", + "expect-fail": true, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e9060fe37571a5d6e7d30b15154ce4a9fb92c70c870848f4ccdf1626588097f73f7", + "secret-key-seed": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "public-key": "60fe37571a5d6e7d30b15154ce4a9fb92c70c870848f4ccdf1626588097f73f7", + "paserk": null, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version." + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k3.sid.json b/vendor/pasetors/test_vectors/PASERK/k3.sid.json new file mode 100644 index 000000000..76ebf3044 --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k3.sid.json @@ -0,0 +1,34 @@ +{ + "name": "PASERK k3.sid Test Vectors", + "tests": [ + { + "name": "k3.sid-1", + "expect-fail": false, + "key": "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "public-key": "2d2d2d2d2d424547494e205055424c4943204b45592d2d2d2d2d0a4d485977454159484b6f5a497a6a3043415159464b3445454143494459674145716f664b4972364c4254654f7363636538794374644734644f324b4c703575590a5766644234494a554b6a685641764a647631557062447055586a6879646771334e6866655370596d4c4739646e70692f6b704c634b666a304862306f6d6852380a36646f7845375877754d414b594c484f485836426e58704448587951366735660a2d2d2d2d2d454e44205055424c4943204b45592d2d2d2d2d", + "paserk": "k3.sid.DjlX1m4BBFtsnbwzw1zv_x0yRcrZpsvdr_gIxh_hg_Rv" + }, + { + "name": "k3.sid-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", + "public-key": "2d2d2d2d2d424547494e205055424c4943204b45592d2d2d2d2d0a4d485977454159484b6f5a497a6a3043415159464b344545414349445967414547706b49495a4b624a667668356a33562b5562416c637174424f58376b424e6c0a69344e757946727974362b6d584c516e4c734567714e6333575a6f4d2f55516e476a4c5554574b6b2b7559597a454d537a32336a45726974455541626e624c420a4d5441432b2b7137344b564a47754e6977454b4448556239726658676a66646e0a2d2d2d2d2d454e44205055424c4943204b45592d2d2d2d2d", + "paserk": "k3.sid.mNalRnF8T60OMPdi1TWSMcub-51v3Au2VB1MOqPrw8zG" + }, + { + "name": "k3.sid-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9ea0", + "public-key": "2d2d2d2d2d424547494e205055424c4943204b45592d2d2d2d2d0a4d485977454159484b6f5a497a6a3043415159464b344545414349445967414575457544387a72334c5934574a4c3963536e6d52384b475445783449774567540a68636c326c34374e316f334345413551303370477557746a79712f6f774164684b39503968746734555439325468784a6c71485a6432555268665636714d6c420a53657a73733262506c2b366f484363475a7866624441587a34684c594e5752610a2d2d2d2d2d454e44205055424c4943204b45592d2d2d2d2d", + "paserk": "k3.sid.2y01jpWJruAPv3epVJkTtDDvdHLsU3luYV9cvGgsR4C6" + }, + { + "name": "k3.sid-fail-1", + "expect-fail": true, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version.", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e9060fe37571a5d6e7d30b15154ce4a9fb92c70c870848f4ccdf1626588097f73f7", + "seed": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": null + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k4.lid.json b/vendor/pasetors/test_vectors/PASERK/k4.lid.json new file mode 100644 index 000000000..759aa1a9b --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k4.lid.json @@ -0,0 +1,30 @@ +{ + "name": "PASERK k4.lid Test Vectors", + "tests": [ + { + "name": "k4.lid-1", + "expect-fail": false, + "key": "0000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k4.lid.bqltbNc4JLUAmc9Xtpok-fBuI0dQN5_m3CD9W_nbh559" + }, + { + "name": "k4.lid-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "paserk": "k4.lid.iVtYQDjr5gEijCSjJC3fQaJm7nCeQSeaty0Jixy8dbsk" + }, + { + "name": "k4.lid-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": "k4.lid.-v0wjDR1FVxNT2to41Ay1P4_8X6HIxnybX1nZ1a4FCTm" + }, + { + "name": "k4.lid-fail-1", + "expect-fail": true, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e", + "paserk": null, + "comment": "If the key is too short, this must fail to serialize." + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k4.local.json b/vendor/pasetors/test_vectors/PASERK/k4.local.json new file mode 100644 index 000000000..0c16f0226 --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k4.local.json @@ -0,0 +1,37 @@ +{ + "name": "PASERK k4.local Test Vectors", + "tests": [ + { + "name": "k4.local-1", + "expect-fail": false, + "key": "0000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k4.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "name": "k4.local-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "paserk": "k4.local.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8" + }, + { + "name": "k4.local-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": "k4.local.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjpA" + }, + { + "name": "k4.local-fail-1", + "expect-fail": true, + "key": null, + "paserk": "k4.local.HFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8", + "comment": "If the PASERK is too short, this must fail to deserialize." + }, + { + "name": "k4.local-fail-2", + "expect-fail": true, + "key": null, + "paserk": "k3.local.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8", + "comment": "Implementations MUST NOT accept a PASERK of the wrong version." + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k4.pid.json b/vendor/pasetors/test_vectors/PASERK/k4.pid.json new file mode 100644 index 000000000..450e1d0d1 --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k4.pid.json @@ -0,0 +1,37 @@ +{ + "name": "PASERK k4.pid Test Vectors", + "tests": [ + { + "name": "k4.pid-1", + "expect-fail": false, + "key": "0000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k4.pid.S_XQmeEwHbbvRmiyfXfHYpLGjXGzjTRSDoT1YtTakWFE" + }, + { + "name": "k4.pid-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "paserk": "k4.pid.9ShR3xc8-qVJ_di0tc9nx0IDIqbatdeM2mqLFBJsKRHs" + }, + { + "name": "k4.pid-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": "k4.pid.-nyvbaTz8U6TQz7OZWW-iB3va31iAxIpUgzUcVQVmW9A" + }, + { + "name": "k4.pid-fail-1", + "expect-fail": true, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e", + "paserk": null, + "comment": "Small public keys must fail to serialize" + }, + { + "name": "k4.pid-fail-2", + "expect-fail": true, + "key": "02707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", + "paserk": null, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version." + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k4.public.json b/vendor/pasetors/test_vectors/PASERK/k4.public.json new file mode 100644 index 000000000..c060a6351 --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k4.public.json @@ -0,0 +1,30 @@ +{ + "name": "PASERK k4.public Test Vectors", + "tests": [ + { + "name": "k4.public-1", + "expect-fail": false, + "key": "0000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k4.public.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "name": "k4.public-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "paserk": "k4.public.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8" + }, + { + "name": "k4.public-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": "k4.public.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjpA" + }, + { + "name": "k4.public-fail-1", + "expect-fail": true, + "key": "02707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", + "paserk": null, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version." + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k4.secret.json b/vendor/pasetors/test_vectors/PASERK/k4.secret.json new file mode 100644 index 000000000..3c1c5116a --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k4.secret.json @@ -0,0 +1,45 @@ +{ + "name": "PASERK k4.secret Test Vectors", + "tests": [ + { + "name": "k4.secret-1", + "expect-fail": false, + "key": "00000000000000000000000000000000000000000000000000000000000000003b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29", + "secret-key-seed": "0000000000000000000000000000000000000000000000000000000000000000", + "public-key": "3b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29", + "paserk": "k4.secret.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7aie8zrakLWKjqNAqbw1zZTIVdx3iQ6Y6wEihi1naKQ" + }, + { + "name": "k4.secret-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f1ce56a48c82ff99162a14bc544612674e5d61fb9317e65d4055780fdbcb4dc35", + "secret-key-seed": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "public-key": "1ce56a48c82ff99162a14bc544612674e5d61fb9317e65d4055780fdbcb4dc35", + "paserk": "k4.secret.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8c5WpIyC_5kWKhS8VEYSZ05dYfuTF-ZdQFV4D9vLTcNQ" + }, + { + "name": "k4.secret-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e9060fe37571a5d6e7d30b15154ce4a9fb92c70c870848f4ccdf1626588097f73f7", + "secret-key-seed": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "public-key": "60fe37571a5d6e7d30b15154ce4a9fb92c70c870848f4ccdf1626588097f73f7", + "paserk": "k4.secret.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjpBg_jdXGl1ufTCxUVTOSp-5LHDIcISPTM3xYmWICX9z9w" + }, + { + "name": "k4.secret-fail-1", + "expect-fail": true, + "comment": "Short keys must be rejected", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e", + "public-key": null, + "paserk": null + }, + { + "name": "k4.secret-fail-2", + "expect-fail": true, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9ea0", + "public-key": "2d2d2d2d2d424547494e205055424c4943204b45592d2d2d2d2d0a4d485977454159484b6f5a497a6a3043415159464b344545414349445967414575457544387a72334c5934574a4c3963536e6d52384b475445783449774567540a68636c326c34374e316f334345413551303370477557746a79712f6f774164684b39503968746734555439325468784a6c71485a6432555268665636714d6c420a53657a73733262506c2b366f484363475a7866624441587a34684c594e5752610a2d2d2d2d2d454e44205055424c4943204b45592d2d2d2d2d", + "paserk": null, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version." + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/PASERK/k4.sid.json b/vendor/pasetors/test_vectors/PASERK/k4.sid.json new file mode 100644 index 000000000..c1c1e18eb --- /dev/null +++ b/vendor/pasetors/test_vectors/PASERK/k4.sid.json @@ -0,0 +1,34 @@ +{ + "name": "PASERK k4.sid Test Vectors", + "tests": [ + { + "name": "k4.sid-1", + "expect-fail": false, + "key": "00000000000000000000000000000000000000000000000000000000000000003b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29", + "seed": "0000000000000000000000000000000000000000000000000000000000000000", + "paserk": "k4.sid.YujQ-NvcGquQ0Q-arRf8iYEcXiSOKg2Vk5az-n1lxiUd" + }, + { + "name": "k4.sid-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f1ce56a48c82ff99162a14bc544612674e5d61fb9317e65d4055780fdbcb4dc35", + "seed": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "paserk": "k4.sid.gHYyx8y5YzqKEZeYoMDqUOKejdSnY_AWhYZiSCMjR1V5" + }, + { + "name": "k4.sid-3", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e9060fe37571a5d6e7d30b15154ce4a9fb92c70c870848f4ccdf1626588097f73f7", + "seed": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e90", + "paserk": "k4.sid.2_m4h6ZTO3qm_PIpl-eYyAqTbNTgmIPQ85POmUEyZHNd" + }, + { + "name": "k4.sid-fail-1", + "expect-fail": true, + "comment": "Implementations MUST NOT accept a PASERK of the wrong version.", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9ea0", + "public-key": "2d2d2d2d2d424547494e205055424c4943204b45592d2d2d2d2d0a4d485977454159484b6f5a497a6a3043415159464b344545414349445967414575457544387a72334c5934574a4c3963536e6d52384b475445783449774567540a68636c326c34374e316f334345413551303370477557746a79712f6f774164684b39503968746734555439325468784a6c71485a6432555268665636714d6c420a53657a73733262506c2b366f484363475a7866624441587a34684c594e5752610a2d2d2d2d2d454e44205055424c4943204b45592d2d2d2d2d", + "paserk": null + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/v2.json b/vendor/pasetors/test_vectors/v2.json new file mode 100644 index 000000000..3e4f61f0b --- /dev/null +++ b/vendor/pasetors/test_vectors/v2.json @@ -0,0 +1,167 @@ +{ + "name": "PASETO v2 Test Vectors", + "tests": [ + { + "name": "2-E-1", + "expect-fail": false, + "nonce": "000000000000000000000000000000000000000000000000", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v2.local.97TTOvgwIxNGvV80XKiGZg_kD3tsXM_-qB4dZGHOeN1cTkgQ4PnW8888l802W8d9AvEGnoNBY3BnqHORy8a5cC8aKpbA0En8XELw2yDk2f1sVODyfnDbi6rEGMY3pSfCbLWMM2oHJxvlEl2XbQ", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "2-E-2", + "expect-fail": false, + "nonce": "000000000000000000000000000000000000000000000000", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v2.local.CH50H-HM5tzdK4kOmQ8KbIvrzJfjYUGuu5Vy9ARSFHy9owVDMYg3-8rwtJZQjN9ABHb2njzFkvpr5cOYuRyt7CRXnHt42L5yZ7siD-4l-FoNsC7J2OlvLlIwlG06mzQVunrFNb7Z3_CHM0PK5w", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "2-E-3", + "expect-fail": false, + "nonce": "45742c976d684ff84ebdc0de59809a97cda2f64c84fda19b", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v2.local.5K4SCXNhItIhyNuVIZcwrdtaDKiyF81-eWHScuE0idiVqCo72bbjo07W05mqQkhLZdVbxEa5I_u5sgVk1QLkcWEcOSlLHwNpCkvmGGlbCdNExn6Qclw3qTKIIl5-O5xRBN076fSDPo5xUCPpBA", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "2-E-4", + "expect-fail": false, + "nonce": "45742c976d684ff84ebdc0de59809a97cda2f64c84fda19b", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v2.local.pvFdDeNtXxknVPsbBCZF6MGedVhPm40SneExdClOxa9HNR8wFv7cu1cB0B4WxDdT6oUc2toyLR6jA6sc-EUM5ll1EkeY47yYk6q8m1RCpqTIzUrIu3B6h232h62DPbIxtjGvNRAwsLK7LcV8oQ", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "2-E-5", + "expect-fail": false, + "nonce": "45742c976d684ff84ebdc0de59809a97cda2f64c84fda19b", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v2.local.5K4SCXNhItIhyNuVIZcwrdtaDKiyF81-eWHScuE0idiVqCo72bbjo07W05mqQkhLZdVbxEa5I_u5sgVk1QLkcWEcOSlLHwNpCkvmGGlbCdNExn6Qclw3qTKIIl5-zSLIrxZqOLwcFLYbVK1SrQ.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "" + }, + { + "name": "2-E-6", + "expect-fail": false, + "nonce": "45742c976d684ff84ebdc0de59809a97cda2f64c84fda19b", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v2.local.pvFdDeNtXxknVPsbBCZF6MGedVhPm40SneExdClOxa9HNR8wFv7cu1cB0B4WxDdT6oUc2toyLR6jA6sc-EUM5ll1EkeY47yYk6q8m1RCpqTIzUrIu3B6h232h62DnMXKdHn_Smp6L_NfaEnZ-A.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "" + }, + { + "name": "2-E-7", + "expect-fail": false, + "nonce": "45742c976d684ff84ebdc0de59809a97cda2f64c84fda19b", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v2.local.5K4SCXNhItIhyNuVIZcwrdtaDKiyF81-eWHScuE0idiVqCo72bbjo07W05mqQkhLZdVbxEa5I_u5sgVk1QLkcWEcOSlLHwNpCkvmGGlbCdNExn6Qclw3qTKIIl5-zSLIrxZqOLwcFLYbVK1SrQ.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "discarded-anyway" + }, + { + "name": "2-E-8", + "expect-fail": false, + "nonce": "45742c976d684ff84ebdc0de59809a97cda2f64c84fda19b", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v2.local.pvFdDeNtXxknVPsbBCZF6MGedVhPm40SneExdClOxa9HNR8wFv7cu1cB0B4WxDdT6oUc2toyLR6jA6sc-EUM5ll1EkeY47yYk6q8m1RCpqTIzUrIu3B6h232h62DnMXKdHn_Smp6L_NfaEnZ-A.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "discarded-anyway" + }, + { + "name": "2-E-9", + "expect-fail": false, + "nonce": "45742c976d684ff84ebdc0de59809a97cda2f64c84fda19b", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v2.local.pvFdDeNtXxknVPsbBCZF6MGedVhPm40SneExdClOxa9HNR8wFv7cu1cB0B4WxDdT6oUc2toyLR6jA6sc-EUM5ll1EkeY47yYk6q8m1RCpqTIzUrIu3B6h232h62DoOJbyKBGPZG50XDZ6mbPtw.YXJiaXRyYXJ5LXN0cmluZy10aGF0LWlzbid0LWpzb24", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "arbitrary-string-that-isn't-json", + "implicit-assertion": "discarded-anyway" + }, + { + "name": "2-S-1", + "expect-fail": false, + "public-key": "1eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a37741eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key-seed": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a3774", + "secret-key-pem": "-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEILTL+0PfTOIQcn2VPkpxMwf6Gbt9n4UEFDjZ4RuUKjd0\n-----END PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAHrnbu7wEfAP9cGBOAHHwmH4Wsot1ciXBHwBBXQ4gsaI=\n-----END PUBLIC KEY-----", + "token": "v2.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAxOS0wMS0wMVQwMDowMDowMCswMDowMCJ9HQr8URrGntTu7Dz9J2IF23d1M7-9lH9xiqdGyJNvzp4angPW5Esc7C5huy_M8I8_DjJK2ZXC2SUYuOFM-Q_5Cw", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "2-S-2", + "expect-fail": false, + "public-key": "1eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a37741eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key-seed": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a3774", + "secret-key-pem": "-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEILTL+0PfTOIQcn2VPkpxMwf6Gbt9n4UEFDjZ4RuUKjd0\n-----END PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAHrnbu7wEfAP9cGBOAHHwmH4Wsot1ciXBHwBBXQ4gsaI=\n-----END PUBLIC KEY-----", + "token": "v2.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAxOS0wMS0wMVQwMDowMDowMCswMDowMCJ9flsZsx_gYCR0N_Ec2QxJFFpvQAs7h9HtKwbVK2n1MJ3Rz-hwe8KUqjnd8FAnIJZ601tp7lGkguU63oGbomhoBw.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "" + }, + { + "name": "2-S-3", + "expect-fail": false, + "public-key": "1eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a37741eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key-seed": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a3774", + "secret-key-pem": "-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEILTL+0PfTOIQcn2VPkpxMwf6Gbt9n4UEFDjZ4RuUKjd0\n-----END PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAHrnbu7wEfAP9cGBOAHHwmH4Wsot1ciXBHwBBXQ4gsaI=\n-----END PUBLIC KEY-----", + "token": "v2.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAxOS0wMS0wMVQwMDowMDowMCswMDowMCJ9flsZsx_gYCR0N_Ec2QxJFFpvQAs7h9HtKwbVK2n1MJ3Rz-hwe8KUqjnd8FAnIJZ601tp7lGkguU63oGbomhoBw.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2019-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "discarded-anyway" + }, + { + "name": "2-F-1", + "expect-fail": true, + "public-key": "1eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a37741eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key-seed": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a3774", + "secret-key-pem": "-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEILTL+0PfTOIQcn2VPkpxMwf6Gbt9n4UEFDjZ4RuUKjd0\n-----END PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAHrnbu7wEfAP9cGBOAHHwmH4Wsot1ciXBHwBBXQ4gsaI=\n-----END PUBLIC KEY-----", + "token": "v2.local.pN9Y9kTFKnCskKr7B13IoceBabSTMS0LkUg3SeAqONg6EJsq9h-CLWdWaA_rMZX4MhGsOQn5I0EsIgYeOA2NPJZU0uulsahH-k871PBq.YXJiaXRyYXJ5LXN0cmluZy10aGF0LWlzbid0LWpzb24", + "payload": null, + "footer": "arbitrary-string-that-isn't-json", + "implicit-assertion": "{\"test-vector\":\"2-F-1\"}" + }, + { + "name": "2-F-2", + "expect-fail": true, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v2.public.eyJpbnZhbGlkIjoidGhpcyBzaG91bGQgbmV2ZXIgZGVjb2RlIn1kgrdAMxcO3wFKXJrLa1cq-DB6V_b25KQ1hV_jpOS-uYBmsg8EMS4j6kl2g83iRsh73knLGr7Ik1AEOvUgyw0P.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": null, + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "{\"test-vector\":\"2-F-2\"}" + }, + { + "name": "2-F-3", + "expect-fail": true, + "nonce": "26f7553354482a1d91d4784627854b8da6b8042a7966523c2b404e8dbbe7f7f2", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v1.local.vXWMCh8nxf_RMqrLREJVOWyu01yRzb-miB6mkG1zQ8LS4_W5nQdTOpexZq482ReJ0sv5uFfAWRGpJaONiMqFaAAo-dsbWG2vo63xUmwFGxHNhu9plfFav2SaGDERFGn7IQ20gNQl87eOLaxf2GDsWdfu5hrFaQ.YXJiaXRyYXJ5LXN0cmluZy10aGF0LWlzbid0LWpzb24", + "payload": null, + "footer": "arbitrary-string-that-isn't-json", + "implicit-assertion": "{\"test-vector\":\"2-F-3\"}" + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/v3.json b/vendor/pasetors/test_vectors/v3.json new file mode 100644 index 000000000..0e1897e11 --- /dev/null +++ b/vendor/pasetors/test_vectors/v3.json @@ -0,0 +1,183 @@ +{ + "name": "PASETO v3 Test Vectors", + "tests": [ + { + "name": "3-E-1", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "nonce": "0000000000000000000000000000000000000000000000000000000000000000", + "token": "v3.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADbfcIURX_0pVZVU1mAESUzrKZAsRm2EsD6yBoZYn6cpVZNzSJOhSDN-sRaWjfLU-yn9OJH1J_B8GKtOQ9gSQlb8yk9Iza7teRdkiR89ZFyvPPsVjjFiepFUVcMa-LP18zV77f_crJrVXWa5PDNRkCSeHfBBeg", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "3-E-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "nonce": "0000000000000000000000000000000000000000000000000000000000000000", + "token": "v3.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADbfcIURX_0pVZVU1mAESUzrKZAqhWxBMDgyBoZYn6cpVZNzSJOhSDN-sRaWjfLU-yn9OJH1J_B8GKtOQ9gSQlb8yk9IzZfaZpReVpHlDSwfuygx1riVXYVs-UjcrG_apl9oz3jCVmmJbRuKn5ZfD8mHz2db0A", + "payload": "{\"data\":\"this is a hidden message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "3-E-3", + "expect-fail": false, + "nonce": "26f7553354482a1d91d4784627854b8da6b8042a7966523c2b404e8dbbe7f7f2", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v3.local.JvdVM1RIKh2R1HhGJ4VLjaa4BCp5ZlI8K0BOjbvn9_LwY78vQnDait-Q-sjhF88dG2B0ROIIykcrGHn8wzPbTrqObHhyoKpjy3cwZQzLdiwRsdEK5SDvl02_HjWKJW2oqGMOQJlxnt5xyhQjFJomwnt7WW_7r2VT0G704ifult011-TgLCyQ2X8imQhniG_hAQ4BydM", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "3-E-4", + "expect-fail": false, + "nonce": "26f7553354482a1d91d4784627854b8da6b8042a7966523c2b404e8dbbe7f7f2", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v3.local.JvdVM1RIKh2R1HhGJ4VLjaa4BCp5ZlI8K0BOjbvn9_LwY78vQnDait-Q-sjhF88dG2B0X-4P3EcxGHn8wzPbTrqObHhyoKpjy3cwZQzLdiwRsdEK5SDvl02_HjWKJW2oqGMOQJlBZa_gOpVj4gv0M9lV6Pwjp8JS_MmaZaTA1LLTULXybOBZ2S4xMbYqYmDRhh3IgEk", + "payload": "{\"data\":\"this is a hidden message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "3-E-5", + "expect-fail": false, + "nonce": "26f7553354482a1d91d4784627854b8da6b8042a7966523c2b404e8dbbe7f7f2", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v3.local.JvdVM1RIKh2R1HhGJ4VLjaa4BCp5ZlI8K0BOjbvn9_LwY78vQnDait-Q-sjhF88dG2B0ROIIykcrGHn8wzPbTrqObHhyoKpjy3cwZQzLdiwRsdEK5SDvl02_HjWKJW2oqGMOQJlkYSIbXOgVuIQL65UMdW9WcjOpmqvjqD40NNzed-XPqn1T3w-bJvitYpUJL_rmihc.eyJraWQiOiJVYmtLOFk2aXY0R1poRnA2VHgzSVdMV0xmTlhTRXZKY2RUM3pkUjY1WVp4byJ9", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"UbkK8Y6iv4GZhFp6Tx3IWLWLfNXSEvJcdT3zdR65YZxo\"}", + "implicit-assertion": "" + }, + { + "name": "3-E-6", + "expect-fail": false, + "nonce": "26f7553354482a1d91d4784627854b8da6b8042a7966523c2b404e8dbbe7f7f2", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v3.local.JvdVM1RIKh2R1HhGJ4VLjaa4BCp5ZlI8K0BOjbvn9_LwY78vQnDait-Q-sjhF88dG2B0X-4P3EcxGHn8wzPbTrqObHhyoKpjy3cwZQzLdiwRsdEK5SDvl02_HjWKJW2oqGMOQJmSeEMphEWHiwtDKJftg41O1F8Hat-8kQ82ZIAMFqkx9q5VkWlxZke9ZzMBbb3Znfo.eyJraWQiOiJVYmtLOFk2aXY0R1poRnA2VHgzSVdMV0xmTlhTRXZKY2RUM3pkUjY1WVp4byJ9", + "payload": "{\"data\":\"this is a hidden message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"UbkK8Y6iv4GZhFp6Tx3IWLWLfNXSEvJcdT3zdR65YZxo\"}", + "implicit-assertion": "" + }, + { + "name": "3-E-7", + "expect-fail": false, + "nonce": "26f7553354482a1d91d4784627854b8da6b8042a7966523c2b404e8dbbe7f7f2", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v3.local.JvdVM1RIKh2R1HhGJ4VLjaa4BCp5ZlI8K0BOjbvn9_LwY78vQnDait-Q-sjhF88dG2B0ROIIykcrGHn8wzPbTrqObHhyoKpjy3cwZQzLdiwRsdEK5SDvl02_HjWKJW2oqGMOQJkzWACWAIoVa0bz7EWSBoTEnS8MvGBYHHo6t6mJunPrFR9JKXFCc0obwz5N-pxFLOc.eyJraWQiOiJVYmtLOFk2aXY0R1poRnA2VHgzSVdMV0xmTlhTRXZKY2RUM3pkUjY1WVp4byJ9", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"UbkK8Y6iv4GZhFp6Tx3IWLWLfNXSEvJcdT3zdR65YZxo\"}", + "implicit-assertion": "{\"test-vector\":\"3-E-7\"}" + }, + { + "name": "3-E-8", + "expect-fail": false, + "nonce": "26f7553354482a1d91d4784627854b8da6b8042a7966523c2b404e8dbbe7f7f2", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v3.local.JvdVM1RIKh2R1HhGJ4VLjaa4BCp5ZlI8K0BOjbvn9_LwY78vQnDait-Q-sjhF88dG2B0X-4P3EcxGHn8wzPbTrqObHhyoKpjy3cwZQzLdiwRsdEK5SDvl02_HjWKJW2oqGMOQJmZHSSKYR6AnPYJV6gpHtx6dLakIG_AOPhu8vKexNyrv5_1qoom6_NaPGecoiz6fR8.eyJraWQiOiJVYmtLOFk2aXY0R1poRnA2VHgzSVdMV0xmTlhTRXZKY2RUM3pkUjY1WVp4byJ9", + "payload": "{\"data\":\"this is a hidden message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"UbkK8Y6iv4GZhFp6Tx3IWLWLfNXSEvJcdT3zdR65YZxo\"}", + "implicit-assertion": "{\"test-vector\":\"3-E-8\"}" + }, + { + "name": "3-E-9", + "expect-fail": false, + "nonce": "26f7553354482a1d91d4784627854b8da6b8042a7966523c2b404e8dbbe7f7f2", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v3.local.JvdVM1RIKh2R1HhGJ4VLjaa4BCp5ZlI8K0BOjbvn9_LwY78vQnDait-Q-sjhF88dG2B0X-4P3EcxGHn8wzPbTrqObHhyoKpjy3cwZQzLdiwRsdEK5SDvl02_HjWKJW2oqGMOQJlk1nli0_wijTH_vCuRwckEDc82QWK8-lG2fT9wQF271sgbVRVPjm0LwMQZkvvamqU.YXJiaXRyYXJ5LXN0cmluZy10aGF0LWlzbid0LWpzb24", + "payload": "{\"data\":\"this is a hidden message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "arbitrary-string-that-isn't-json", + "implicit-assertion": "{\"test-vector\":\"3-E-9\"}" + }, + { + "name": "3-S-1", + "expect-fail": false, + "public-key": "02fbcb7c69ee1c60579be7a334134878d9c5c5bf35d552dab63c0140397ed14cef637d7720925c44699ea30e72874c72fb", + "secret-key": "20347609607477aca8fbfbc5e6218455f3199669792ef8b466faa87bdc67798144c848dd03661eed5ac62461340cea96", + "secret-key-pem": "-----BEGIN EC PRIVATE KEY-----\nMIGkAgEBBDAgNHYJYHR3rKj7+8XmIYRV8xmWaXku+LRm+qh73Gd5gUTISN0DZh7t\nWsYkYTQM6pagBwYFK4EEACKhZANiAAT7y3xp7hxgV5vnozQTSHjZxcW/NdVS2rY8\nAUA5ftFM72N9dyCSXERpnqMOcodMcvt8kgcrB8KcKee0HU23E79/s4CvEs8hBfnj\nSUd/gcAm08EjSIz06iWjrNy4NakxR3I=\n-----END EC PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+8t8ae4cYFeb56M0E0h42cXFvzXVUtq2\nPAFAOX7RTO9jfXcgklxEaZ6jDnKHTHL7fJIHKwfCnCnntB1NtxO/f7OArxLPIQX5\n40lHf4HAJtPBI0iM9Oolo6zcuDWpMUdy\n-----END PUBLIC KEY-----", + "token": "v3.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9qqEwwrKHKi5lJ7b9MBKc0G4MGZy0ptUiMv3lAUAaz-JY_zjoqBSIxMxhfAoeNYiSyvfUErj76KOPWm1OeNnBPkTSespeSXDGaDfxeIrl3bRrPEIy7tLwLAIsRzsXkfph", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "3-S-2", + "expect-fail": false, + "public-key": "02fbcb7c69ee1c60579be7a334134878d9c5c5bf35d552dab63c0140397ed14cef637d7720925c44699ea30e72874c72fb", + "secret-key": "20347609607477aca8fbfbc5e6218455f3199669792ef8b466faa87bdc67798144c848dd03661eed5ac62461340cea96", + "secret-key-pem": "-----BEGIN EC PRIVATE KEY-----\nMIGkAgEBBDAgNHYJYHR3rKj7+8XmIYRV8xmWaXku+LRm+qh73Gd5gUTISN0DZh7t\nWsYkYTQM6pagBwYFK4EEACKhZANiAAT7y3xp7hxgV5vnozQTSHjZxcW/NdVS2rY8\nAUA5ftFM72N9dyCSXERpnqMOcodMcvt8kgcrB8KcKee0HU23E79/s4CvEs8hBfnj\nSUd/gcAm08EjSIz06iWjrNy4NakxR3I=\n-----END EC PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+8t8ae4cYFeb56M0E0h42cXFvzXVUtq2\nPAFAOX7RTO9jfXcgklxEaZ6jDnKHTHL7fJIHKwfCnCnntB1NtxO/f7OArxLPIQX5\n40lHf4HAJtPBI0iM9Oolo6zcuDWpMUdy\n-----END PUBLIC KEY-----", + "token": "v3.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9ZWrbGZ6L0MDK72skosUaS0Dz7wJ_2bMcM6tOxFuCasO9GhwHrvvchqgXQNLQQyWzGC2wkr-VKII71AvkLpC8tJOrzJV1cap9NRwoFzbcXjzMZyxQ0wkshxZxx8ImmNWP.eyJraWQiOiJkWWtJU3lseFFlZWNFY0hFTGZ6Rjg4VVpyd2JMb2xOaUNkcHpVSEd3OVVxbiJ9", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"dYkISylxQeecEcHELfzF88UZrwbLolNiCdpzUHGw9Uqn\"}", + "implicit-assertion": "" + }, + { + "name": "3-S-3", + "expect-fail": false, + "public-key": "02fbcb7c69ee1c60579be7a334134878d9c5c5bf35d552dab63c0140397ed14cef637d7720925c44699ea30e72874c72fb", + "secret-key": "20347609607477aca8fbfbc5e6218455f3199669792ef8b466faa87bdc67798144c848dd03661eed5ac62461340cea96", + "secret-key-pem": "-----BEGIN EC PRIVATE KEY-----\nMIGkAgEBBDAgNHYJYHR3rKj7+8XmIYRV8xmWaXku+LRm+qh73Gd5gUTISN0DZh7t\nWsYkYTQM6pagBwYFK4EEACKhZANiAAT7y3xp7hxgV5vnozQTSHjZxcW/NdVS2rY8\nAUA5ftFM72N9dyCSXERpnqMOcodMcvt8kgcrB8KcKee0HU23E79/s4CvEs8hBfnj\nSUd/gcAm08EjSIz06iWjrNy4NakxR3I=\n-----END EC PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+8t8ae4cYFeb56M0E0h42cXFvzXVUtq2\nPAFAOX7RTO9jfXcgklxEaZ6jDnKHTHL7fJIHKwfCnCnntB1NtxO/f7OArxLPIQX5\n40lHf4HAJtPBI0iM9Oolo6zcuDWpMUdy\n-----END PUBLIC KEY-----", + "token": "v3.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ94SjWIbjmS7715GjLSnHnpJrC9Z-cnwK45dmvnVvCRQDCCKAXaKEopTajX0DKYx1Xqr6gcTdfqscLCAbiB4eOW9jlt-oNqdG8TjsYEi6aloBfTzF1DXff_45tFlnBukEX.eyJraWQiOiJkWWtJU3lseFFlZWNFY0hFTGZ6Rjg4VVpyd2JMb2xOaUNkcHpVSEd3OVVxbiJ9", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"dYkISylxQeecEcHELfzF88UZrwbLolNiCdpzUHGw9Uqn\"}", + "implicit-assertion": "{\"test-vector\":\"3-S-3\"}" + }, + { + "name": "3-F-1", + "expect-fail": true, + "public-key": "02fbcb7c69ee1c60579be7a334134878d9c5c5bf35d552dab63c0140397ed14cef637d7720925c44699ea30e72874c72fb", + "secret-key": "20347609607477aca8fbfbc5e6218455f3199669792ef8b466faa87bdc67798144c848dd03661eed5ac62461340cea96", + "secret-key-pem": "-----BEGIN EC PRIVATE KEY-----\nMIGkAgEBBDAgNHYJYHR3rKj7+8XmIYRV8xmWaXku+LRm+qh73Gd5gUTISN0DZh7t\nWsYkYTQM6pagBwYFK4EEACKhZANiAAT7y3xp7hxgV5vnozQTSHjZxcW/NdVS2rY8\nAUA5ftFM72N9dyCSXERpnqMOcodMcvt8kgcrB8KcKee0HU23E79/s4CvEs8hBfnj\nSUd/gcAm08EjSIz06iWjrNy4NakxR3I=\n-----END EC PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+8t8ae4cYFeb56M0E0h42cXFvzXVUtq2\nPAFAOX7RTO9jfXcgklxEaZ6jDnKHTHL7fJIHKwfCnCnntB1NtxO/f7OArxLPIQX5\n40lHf4HAJtPBI0iM9Oolo6zcuDWpMUdy\n-----END PUBLIC KEY-----", + "token": "v3.local.tthw-G1Da_BzYeMu_GEDp-IyQ7jzUCQHxCHRdDY6hQjKg6CuxECXfjOzlmNgNJ-WELjN61gMDnldG9OLkr3wpxuqdZksCzH9Ul16t3pXCLGPoHQ9_l51NOqVmMLbFVZOPhsmdhef9RxJwmqvzQ_Mo_JkYRlrNA.YXJiaXRyYXJ5LXN0cmluZy10aGF0LWlzbid0LWpzb24", + "payload": null, + "footer": "arbitrary-string-that-isn't-json", + "implicit-assertion": "{\"test-vector\":\"3-F-1\"}" + }, + { + "name": "3-F-2", + "expect-fail": true, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v3.public.eyJpbnZhbGlkIjoidGhpcyBzaG91bGQgbmV2ZXIgZGVjb2RlIn1hbzIBD_EU54TYDTvsN9bbCU1QPo7FDeIhijkkcB9BrVH73XyM3Wwvu1pJaGCOEc0R5DVe9hb1ka1cYBd0goqVHt0NQ2NhPtILz4W36eCCqyU4uV6xDMeLI8ni6r3GnaY.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": null, + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "{\"test-vector\":\"3-F-2\"}" + }, + { + "name": "3-F-3", + "expect-fail": true, + "nonce": "26f7553354482a1d91d4784627854b8da6b8042a7966523c2b404e8dbbe7f7f2", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v4.local.1JgN1UG8TFAYS49qsx8rxlwh-9E4ONUm3slJXYi5EibmzxpF0Q-du6gakjuyKCBX8TvnSLOKqCPu8Yh3WSa5yJWigPy33z9XZTJF2HQ9wlLDPtVn_Mu1pPxkTU50ZaBKblJBufRA.YXJiaXRyYXJ5LXN0cmluZy10aGF0LWlzbid0LWpzb24", + "payload": null, + "footer": "arbitrary-string-that-isn't-json", + "implicit-assertion": "{\"test-vector\":\"3-F-3\"}" + }, + { + "name": "3-F-4", + "expect-fail": true, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "nonce": "0000000000000000000000000000000000000000000000000000000000000000", + "token": "v3.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADbfcIURX_0pVZVU1mAESUzrKZAsRm2EsD6yBoZYn6cpVZNzSJOhSDN-sRaWjfLU-yn9OJH1J_B8GKtOQ9gSQlb8yk9Iza7teRdkiR89ZFyvPPsVjjFiepFUVcMa-LP18zV77f_crJrVXWa5PDNRkCSeHfBBeh", + "payload": null, + "footer": "", + "implicit-assertion": "" + }, + { + "name": "3-F-5", + "expect-fail": true, + "nonce": "26f7553354482a1d91d4784627854b8da6b8042a7966523c2b404e8dbbe7f7f2", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v3.local.JvdVM1RIKh2R1HhGJ4VLjaa4BCp5ZlI8K0BOjbvn9_LwY78vQnDait-Q-sjhF88dG2B0ROIIykcrGHn8wzPbTrqObHhyoKpjy3cwZQzLdiwRsdEK5SDvl02_HjWKJW2oqGMOQJlkYSIbXOgVuIQL65UMdW9WcjOpmqvjqD40NNzed-XPqn1T3w-bJvitYpUJL_rmihc=.eyJraWQiOiJVYmtLOFk2aXY0R1poRnA2VHgzSVdMV0xmTlhTRXZKY2RUM3pkUjY1WVp4byJ9", + "payload": null, + "footer": "{\"kid\":\"UbkK8Y6iv4GZhFp6Tx3IWLWLfNXSEvJcdT3zdR65YZxo\"}", + "implicit-assertion": "" + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/v4.json b/vendor/pasetors/test_vectors/v4.json new file mode 100644 index 000000000..d665aee9c --- /dev/null +++ b/vendor/pasetors/test_vectors/v4.json @@ -0,0 +1,187 @@ +{ + "name": "PASETO v4 Test Vectors", + "tests": [ + { + "name": "4-E-1", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "nonce": "0000000000000000000000000000000000000000000000000000000000000000", + "token": "v4.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAr68PS4AXe7If_ZgesdkUMvSwscFlAl1pk5HC0e8kApeaqMfGo_7OpBnwJOAbY9V7WU6abu74MmcUE8YWAiaArVI8XJ5hOb_4v9RmDkneN0S92dx0OW4pgy7omxgf3S8c3LlQg", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "4-E-2", + "expect-fail": false, + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "nonce": "0000000000000000000000000000000000000000000000000000000000000000", + "token": "v4.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAr68PS4AXe7If_ZgesdkUMvS2csCgglvpk5HC0e8kApeaqMfGo_7OpBnwJOAbY9V7WU6abu74MmcUE8YWAiaArVI8XIemu9chy3WVKvRBfg6t8wwYHK0ArLxxfZP73W_vfwt5A", + "payload": "{\"data\":\"this is a hidden message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "4-E-3", + "expect-fail": false, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v4.local.32VIErrEkmY4JVILovbmfPXKW9wT1OdQepjMTC_MOtjA4kiqw7_tcaOM5GNEcnTxl60WkwMsYXw6FSNb_UdJPXjpzm0KW9ojM5f4O2mRvE2IcweP-PRdoHjd5-RHCiExR1IK6t6-tyebyWG6Ov7kKvBdkrrAJ837lKP3iDag2hzUPHuMKA", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "4-E-4", + "expect-fail": false, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v4.local.32VIErrEkmY4JVILovbmfPXKW9wT1OdQepjMTC_MOtjA4kiqw7_tcaOM5GNEcnTxl60WiA8rd3wgFSNb_UdJPXjpzm0KW9ojM5f4O2mRvE2IcweP-PRdoHjd5-RHCiExR1IK6t4gt6TiLm55vIH8c_lGxxZpE3AWlH4WTR0v45nsWoU3gQ", + "payload": "{\"data\":\"this is a hidden message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "4-E-5", + "expect-fail": false, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v4.local.32VIErrEkmY4JVILovbmfPXKW9wT1OdQepjMTC_MOtjA4kiqw7_tcaOM5GNEcnTxl60WkwMsYXw6FSNb_UdJPXjpzm0KW9ojM5f4O2mRvE2IcweP-PRdoHjd5-RHCiExR1IK6t4x-RMNXtQNbz7FvFZ_G-lFpk5RG3EOrwDL6CgDqcerSQ.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "" + }, + { + "name": "4-E-6", + "expect-fail": false, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v4.local.32VIErrEkmY4JVILovbmfPXKW9wT1OdQepjMTC_MOtjA4kiqw7_tcaOM5GNEcnTxl60WiA8rd3wgFSNb_UdJPXjpzm0KW9ojM5f4O2mRvE2IcweP-PRdoHjd5-RHCiExR1IK6t6pWSA5HX2wjb3P-xLQg5K5feUCX4P2fpVK3ZLWFbMSxQ.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a hidden message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "" + }, + { + "name": "4-E-7", + "expect-fail": false, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v4.local.32VIErrEkmY4JVILovbmfPXKW9wT1OdQepjMTC_MOtjA4kiqw7_tcaOM5GNEcnTxl60WkwMsYXw6FSNb_UdJPXjpzm0KW9ojM5f4O2mRvE2IcweP-PRdoHjd5-RHCiExR1IK6t40KCCWLA7GYL9KFHzKlwY9_RnIfRrMQpueydLEAZGGcA.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a secret message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "{\"test-vector\":\"4-E-7\"}" + }, + { + "name": "4-E-8", + "expect-fail": false, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v4.local.32VIErrEkmY4JVILovbmfPXKW9wT1OdQepjMTC_MOtjA4kiqw7_tcaOM5GNEcnTxl60WiA8rd3wgFSNb_UdJPXjpzm0KW9ojM5f4O2mRvE2IcweP-PRdoHjd5-RHCiExR1IK6t5uvqQbMGlLLNYBc7A6_x7oqnpUK5WLvj24eE4DVPDZjw.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a hidden message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "{\"test-vector\":\"4-E-8\"}" + }, + { + "name": "4-E-9", + "expect-fail": false, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v4.local.32VIErrEkmY4JVILovbmfPXKW9wT1OdQepjMTC_MOtjA4kiqw7_tcaOM5GNEcnTxl60WiA8rd3wgFSNb_UdJPXjpzm0KW9ojM5f4O2mRvE2IcweP-PRdoHjd5-RHCiExR1IK6t6tybdlmnMwcDMw0YxA_gFSE_IUWl78aMtOepFYSWYfQA.YXJiaXRyYXJ5LXN0cmluZy10aGF0LWlzbid0LWpzb24", + "payload": "{\"data\":\"this is a hidden message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "arbitrary-string-that-isn't-json", + "implicit-assertion": "{\"test-vector\":\"4-E-9\"}" + }, + { + "name": "4-S-1", + "expect-fail": false, + "public-key": "1eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a37741eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key-seed": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a3774", + "secret-key-pem": "-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEILTL+0PfTOIQcn2VPkpxMwf6Gbt9n4UEFDjZ4RuUKjd0\n-----END PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAHrnbu7wEfAP9cGBOAHHwmH4Wsot1ciXBHwBBXQ4gsaI=\n-----END PUBLIC KEY-----", + "token": "v4.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9bg_XBBzds8lTZShVlwwKSgeKpLT3yukTw6JUz3W4h_ExsQV-P0V54zemZDcAxFaSeef1QlXEFtkqxT1ciiQEDA", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "", + "implicit-assertion": "" + }, + { + "name": "4-S-2", + "expect-fail": false, + "public-key": "1eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a37741eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key-seed": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a3774", + "secret-key-pem": "-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEILTL+0PfTOIQcn2VPkpxMwf6Gbt9n4UEFDjZ4RuUKjd0\n-----END PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAHrnbu7wEfAP9cGBOAHHwmH4Wsot1ciXBHwBBXQ4gsaI=\n-----END PUBLIC KEY-----", + "token": "v4.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9v3Jt8mx_TdM2ceTGoqwrh4yDFn0XsHvvV_D0DtwQxVrJEBMl0F2caAdgnpKlt4p7xBnx1HcO-SPo8FPp214HDw.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "" + }, + { + "name": "4-S-3", + "expect-fail": false, + "public-key": "1eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a37741eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key-seed": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a3774", + "secret-key-pem": "-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEILTL+0PfTOIQcn2VPkpxMwf6Gbt9n4UEFDjZ4RuUKjd0\n-----END PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAHrnbu7wEfAP9cGBOAHHwmH4Wsot1ciXBHwBBXQ4gsaI=\n-----END PUBLIC KEY-----", + "token": "v4.public.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAyMi0wMS0wMVQwMDowMDowMCswMDowMCJ9NPWciuD3d0o5eXJXG5pJy-DiVEoyPYWs1YSTwWHNJq6DZD3je5gf-0M4JR9ipdUSJbIovzmBECeaWmaqcaP0DQ.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": "{\"data\":\"this is a signed message\",\"exp\":\"2022-01-01T00:00:00+00:00\"}", + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "{\"test-vector\":\"4-S-3\"}" + }, + { + "name": "4-F-1", + "expect-fail": true, + "public-key": "1eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a37741eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2", + "secret-key-seed": "b4cbfb43df4ce210727d953e4a713307fa19bb7d9f85041438d9e11b942a3774", + "secret-key-pem": "-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEILTL+0PfTOIQcn2VPkpxMwf6Gbt9n4UEFDjZ4RuUKjd0\n-----END PRIVATE KEY-----", + "public-key-pem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAHrnbu7wEfAP9cGBOAHHwmH4Wsot1ciXBHwBBXQ4gsaI=\n-----END PUBLIC KEY-----", + "token": "v4.local.vngXfCISbnKgiP6VWGuOSlYrFYU300fy9ijW33rznDYgxHNPwWluAY2Bgb0z54CUs6aYYkIJ-bOOOmJHPuX_34Agt_IPlNdGDpRdGNnBz2MpWJvB3cttheEc1uyCEYltj7wBQQYX.YXJiaXRyYXJ5LXN0cmluZy10aGF0LWlzbid0LWpzb24", + "payload": null, + "footer": "arbitrary-string-that-isn't-json", + "implicit-assertion": "{\"test-vector\":\"4-F-1\"}" + }, + { + "name": "4-F-2", + "expect-fail": true, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v4.public.eyJpbnZhbGlkIjoidGhpcyBzaG91bGQgbmV2ZXIgZGVjb2RlIn22Sp4gjCaUw0c7EH84ZSm_jN_Qr41MrgLNu5LIBCzUr1pn3Z-Wukg9h3ceplWigpoHaTLcwxj0NsI1vjTh67YB.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": null, + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "{\"test-vector\":\"4-F-2\"}" + }, + { + "name": "4-F-3", + "expect-fail": true, + "nonce": "26f7553354482a1d91d4784627854b8da6b8042a7966523c2b404e8dbbe7f7f2", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v3.local.23e_2PiqpQBPvRFKzB0zHhjmxK3sKo2grFZRRLM-U7L0a8uHxuF9RlVz3Ic6WmdUUWTxCaYycwWV1yM8gKbZB2JhygDMKvHQ7eBf8GtF0r3K0Q_gF1PXOxcOgztak1eD1dPe9rLVMSgR0nHJXeIGYVuVrVoLWQ.YXJiaXRyYXJ5LXN0cmluZy10aGF0LWlzbid0LWpzb24", + "payload": null, + "footer": "arbitrary-string-that-isn't-json", + "implicit-assertion": "{\"test-vector\":\"4-F-3\"}" + }, + { + "name": "4-F-4", + "expect-fail": true, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v4.local.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAr68PS4AXe7If_ZgesdkUMvSwscFlAl1pk5HC0e8kApeaqMfGo_7OpBnwJOAbY9V7WU6abu74MmcUE8YWAiaArVI8XJ5hOb_4v9RmDkneN0S92dx0OW4pgy7omxgf3S8c3LlQh", + "payload": null, + "footer": "", + "implicit-assertion": "" + }, + { + "name": "4-F-5", + "expect-fail": true, + "nonce": "df654812bac492663825520ba2f6e67cf5ca5bdc13d4e7507a98cc4c2fcc3ad8", + "key": "707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f", + "token": "v4.local.32VIErrEkmY4JVILovbmfPXKW9wT1OdQepjMTC_MOtjA4kiqw7_tcaOM5GNEcnTxl60WkwMsYXw6FSNb_UdJPXjpzm0KW9ojM5f4O2mRvE2IcweP-PRdoHjd5-RHCiExR1IK6t4x-RMNXtQNbz7FvFZ_G-lFpk5RG3EOrwDL6CgDqcerSQ==.eyJraWQiOiJ6VmhNaVBCUDlmUmYyc25FY1Q3Z0ZUaW9lQTlDT2NOeTlEZmdMMVc2MGhhTiJ9", + "payload": null, + "footer": "{\"kid\":\"zVhMiPBP9fRf2snEcT7gFTioeA9COcNy9DfgL1W60haN\"}", + "implicit-assertion": "" + } + ] +}
\ No newline at end of file diff --git a/vendor/pasetors/test_vectors/wycheproof/ecdsa_secp384r1_sha384_test.json b/vendor/pasetors/test_vectors/wycheproof/ecdsa_secp384r1_sha384_test.json new file mode 100644 index 000000000..66268a7c9 --- /dev/null +++ b/vendor/pasetors/test_vectors/wycheproof/ecdsa_secp384r1_sha384_test.json @@ -0,0 +1,4634 @@ +{ + "algorithm" : "ECDSA", + "generatorVersion" : "0.8r12", + "numberOfTests" : 408, + "header" : [ + "Test vectors of type EcdsaVerify are meant for the verification", + "of ASN encoded ECDSA signatures." + ], + "notes" : { + "BER" : "This is a signature with correct values for (r, s) but using some alternative BER encoding instead of DER encoding. Implementations should not accept such signatures to limit signature malleability.", + "EdgeCase" : "Edge case values such as r=1 and s=0 can lead to forgeries if the ECDSA implementation does not check boundaries and computes s^(-1)==0.", + "MissingZero" : "Some implementations of ECDSA and DSA incorrectly encode r and s by not including leading zeros in the ASN encoding of integers when necessary. Hence, some implementations (e.g. jdk) allow signatures with incorrect ASN encodings assuming that the signature is otherwise valid.", + "PointDuplication" : "Some implementations of ECDSA do not handle duplication and points at infinity correctly. This is a test vector that has been specially crafted to check for such an omission." + }, + "schema" : "ecdsa_verify_schema.json", + "testGroups" : [ + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "042da57dda1089276a543f9ffdac0bff0d976cad71eb7280e7d9bfd9fee4bdb2f20f47ff888274389772d98cc5752138aa4b6d054d69dcf3e25ec49df870715e34883b1836197d76f8ad962e78f6571bbc7407b0d6091f9e4d88f014274406174f", + "wx" : "2da57dda1089276a543f9ffdac0bff0d976cad71eb7280e7d9bfd9fee4bdb2f20f47ff888274389772d98cc5752138aa", + "wy" : "4b6d054d69dcf3e25ec49df870715e34883b1836197d76f8ad962e78f6571bbc7407b0d6091f9e4d88f014274406174f" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200042da57dda1089276a543f9ffdac0bff0d976cad71eb7280e7d9bfd9fee4bdb2f20f47ff888274389772d98cc5752138aa4b6d054d69dcf3e25ec49df870715e34883b1836197d76f8ad962e78f6571bbc7407b0d6091f9e4d88f014274406174f", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAELaV92hCJJ2pUP5/9rAv/DZdsrXHrcoDn\n2b/Z/uS9svIPR/+IgnQ4l3LZjMV1ITiqS20FTWnc8+JexJ34cHFeNIg7GDYZfXb4\nrZYuePZXG7x0B7DWCR+eTYjwFCdEBhdP\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 1, + "comment" : "signature malleability", + "msg" : "313233343030", + "sig" : "3064023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d702301840da9fc1d2f8f8900cf485d5413b8c2574ee3a8d4ca03995ca30240e09513805bf6209b58ac7aa9cff54eecd82b9f1", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 2, + "comment" : "Legacy:ASN encoding of s misses leading 0", + "msg" : "313233343030", + "sig" : "3064023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70230e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "acceptable", + "flags" : [ + "MissingZero" + ] + }, + { + "tcId" : 3, + "comment" : "valid", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 4, + "comment" : "long form encoding of length of sequence", + "msg" : "313233343030", + "sig" : "308165023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 5, + "comment" : "length of sequence contains leading 0", + "msg" : "313233343030", + "sig" : "30820065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 6, + "comment" : "wrong length of sequence", + "msg" : "313233343030", + "sig" : "3066023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 7, + "comment" : "wrong length of sequence", + "msg" : "313233343030", + "sig" : "3064023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 8, + "comment" : "uint32 overflow in length of sequence", + "msg" : "313233343030", + "sig" : "30850100000065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 9, + "comment" : "uint64 overflow in length of sequence", + "msg" : "313233343030", + "sig" : "3089010000000000000065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 10, + "comment" : "length of sequence = 2**31 - 1", + "msg" : "313233343030", + "sig" : "30847fffffff023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 11, + "comment" : "length of sequence = 2**32 - 1", + "msg" : "313233343030", + "sig" : "3084ffffffff023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 12, + "comment" : "length of sequence = 2**40 - 1", + "msg" : "313233343030", + "sig" : "3085ffffffffff023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 13, + "comment" : "length of sequence = 2**64 - 1", + "msg" : "313233343030", + "sig" : "3088ffffffffffffffff023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 14, + "comment" : "incorrect length of sequence", + "msg" : "313233343030", + "sig" : "30ff023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 15, + "comment" : "indefinite length without termination", + "msg" : "313233343030", + "sig" : "3080023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 16, + "comment" : "indefinite length without termination", + "msg" : "313233343030", + "sig" : "3065028012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 17, + "comment" : "indefinite length without termination", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7028000e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 18, + "comment" : "removing sequence", + "msg" : "313233343030", + "sig" : "", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 19, + "comment" : "lonely sequence tag", + "msg" : "313233343030", + "sig" : "30", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 20, + "comment" : "appending 0's to sequence", + "msg" : "313233343030", + "sig" : "3067023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 21, + "comment" : "prepending 0's to sequence", + "msg" : "313233343030", + "sig" : "30670000023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 22, + "comment" : "appending unused 0's to sequence", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 23, + "comment" : "appending null value to sequence", + "msg" : "313233343030", + "sig" : "3067023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820500", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 24, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "306a4981773065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 25, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "306925003065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 26, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "30673065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820004deadbeef", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 27, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "306a2235498177023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 28, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "306922342500023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 29, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "306d2232023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70004deadbeef023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 30, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "306a023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d72236498177023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 31, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "3069023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d722352500023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 32, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "306d023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d72233023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820004deadbeef", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 33, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306daa00bb00cd003065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 34, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306baa02aabb3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 35, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306d2238aa00bb00cd00023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 36, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306b2236aa02aabb023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 37, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306d023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d72239aa00bb00cd00023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 38, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306b023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d72237aa02aabb023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 39, + "comment" : "truncated length of sequence", + "msg" : "313233343030", + "sig" : "3081", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 40, + "comment" : "using composition with indefinite length", + "msg" : "313233343030", + "sig" : "30803065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 41, + "comment" : "using composition with indefinite length", + "msg" : "313233343030", + "sig" : "30692280023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70000023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 42, + "comment" : "using composition with indefinite length", + "msg" : "313233343030", + "sig" : "3069023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d72280023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 43, + "comment" : "using composition with wrong tag", + "msg" : "313233343030", + "sig" : "30803165023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 44, + "comment" : "using composition with wrong tag", + "msg" : "313233343030", + "sig" : "30692280033012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70000023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 45, + "comment" : "using composition with wrong tag", + "msg" : "313233343030", + "sig" : "3069023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d72280033100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 46, + "comment" : "Replacing sequence with NULL", + "msg" : "313233343030", + "sig" : "0500", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 47, + "comment" : "changing tag value of sequence", + "msg" : "313233343030", + "sig" : "2e65023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 48, + "comment" : "changing tag value of sequence", + "msg" : "313233343030", + "sig" : "2f65023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 49, + "comment" : "changing tag value of sequence", + "msg" : "313233343030", + "sig" : "3165023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 50, + "comment" : "changing tag value of sequence", + "msg" : "313233343030", + "sig" : "3265023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 51, + "comment" : "changing tag value of sequence", + "msg" : "313233343030", + "sig" : "ff65023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 52, + "comment" : "dropping value of sequence", + "msg" : "313233343030", + "sig" : "3000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 53, + "comment" : "using composition for sequence", + "msg" : "313233343030", + "sig" : "306930010230643012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 54, + "comment" : "truncated sequence", + "msg" : "313233343030", + "sig" : "3064023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 55, + "comment" : "truncated sequence", + "msg" : "313233343030", + "sig" : "30643012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 56, + "comment" : "indefinite length", + "msg" : "313233343030", + "sig" : "3080023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820000", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 57, + "comment" : "indefinite length with truncated delimiter", + "msg" : "313233343030", + "sig" : "3080023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f8200", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 58, + "comment" : "indefinite length with additional element", + "msg" : "313233343030", + "sig" : "3080023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f8205000000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 59, + "comment" : "indefinite length with truncated element", + "msg" : "313233343030", + "sig" : "3080023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82060811220000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 60, + "comment" : "indefinite length with garbage", + "msg" : "313233343030", + "sig" : "3080023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820000fe02beef", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 61, + "comment" : "indefinite length with nonempty EOC", + "msg" : "313233343030", + "sig" : "3080023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820002beef", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 62, + "comment" : "prepend empty sequence", + "msg" : "313233343030", + "sig" : "30673000023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 63, + "comment" : "append empty sequence", + "msg" : "313233343030", + "sig" : "3067023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f823000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 64, + "comment" : "append garbage with high tag number", + "msg" : "313233343030", + "sig" : "3068023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82bf7f00", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 65, + "comment" : "sequence of sequence", + "msg" : "313233343030", + "sig" : "30673065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 66, + "comment" : "truncated sequence: removed last 1 elements", + "msg" : "313233343030", + "sig" : "3032023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 67, + "comment" : "repeating element in sequence", + "msg" : "313233343030", + "sig" : "308198023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 68, + "comment" : "long form encoding of length of integer", + "msg" : "313233343030", + "sig" : "306602813012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 69, + "comment" : "long form encoding of length of integer", + "msg" : "313233343030", + "sig" : "3066023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d702813100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 70, + "comment" : "length of integer contains leading 0", + "msg" : "313233343030", + "sig" : "30670282003012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 71, + "comment" : "length of integer contains leading 0", + "msg" : "313233343030", + "sig" : "3067023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70282003100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 72, + "comment" : "wrong length of integer", + "msg" : "313233343030", + "sig" : "3065023112b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 73, + "comment" : "wrong length of integer", + "msg" : "313233343030", + "sig" : "3065022f12b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 74, + "comment" : "wrong length of integer", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023200e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 75, + "comment" : "wrong length of integer", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023000e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 76, + "comment" : "uint32 overflow in length of integer", + "msg" : "313233343030", + "sig" : "306a0285010000003012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 77, + "comment" : "uint32 overflow in length of integer", + "msg" : "313233343030", + "sig" : "306a023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70285010000003100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 78, + "comment" : "uint64 overflow in length of integer", + "msg" : "313233343030", + "sig" : "306e028901000000000000003012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 79, + "comment" : "uint64 overflow in length of integer", + "msg" : "313233343030", + "sig" : "306e023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7028901000000000000003100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 80, + "comment" : "length of integer = 2**31 - 1", + "msg" : "313233343030", + "sig" : "306902847fffffff12b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 81, + "comment" : "length of integer = 2**31 - 1", + "msg" : "313233343030", + "sig" : "3069023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d702847fffffff00e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 82, + "comment" : "length of integer = 2**32 - 1", + "msg" : "313233343030", + "sig" : "30690284ffffffff12b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 83, + "comment" : "length of integer = 2**32 - 1", + "msg" : "313233343030", + "sig" : "3069023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70284ffffffff00e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 84, + "comment" : "length of integer = 2**40 - 1", + "msg" : "313233343030", + "sig" : "306a0285ffffffffff12b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 85, + "comment" : "length of integer = 2**40 - 1", + "msg" : "313233343030", + "sig" : "306a023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70285ffffffffff00e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 86, + "comment" : "length of integer = 2**64 - 1", + "msg" : "313233343030", + "sig" : "306d0288ffffffffffffffff12b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 87, + "comment" : "length of integer = 2**64 - 1", + "msg" : "313233343030", + "sig" : "306d023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70288ffffffffffffffff00e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 88, + "comment" : "incorrect length of integer", + "msg" : "313233343030", + "sig" : "306502ff12b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 89, + "comment" : "incorrect length of integer", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d702ff00e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 90, + "comment" : "removing integer", + "msg" : "313233343030", + "sig" : "3033023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 91, + "comment" : "lonely integer tag", + "msg" : "313233343030", + "sig" : "303402023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 92, + "comment" : "lonely integer tag", + "msg" : "313233343030", + "sig" : "3033023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d702", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 93, + "comment" : "appending 0's to integer", + "msg" : "313233343030", + "sig" : "3067023212b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70000023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 94, + "comment" : "appending 0's to integer", + "msg" : "313233343030", + "sig" : "3067023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023300e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 95, + "comment" : "prepending 0's to integer", + "msg" : "313233343030", + "sig" : "30670232000012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 96, + "comment" : "prepending 0's to integer", + "msg" : "313233343030", + "sig" : "3067023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70233000000e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 97, + "comment" : "appending unused 0's to integer", + "msg" : "313233343030", + "sig" : "3067023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70000023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 98, + "comment" : "appending null value to integer", + "msg" : "313233343030", + "sig" : "3067023212b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70500023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 99, + "comment" : "appending null value to integer", + "msg" : "313233343030", + "sig" : "3067023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023300e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f820500", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 100, + "comment" : "truncated length of integer", + "msg" : "313233343030", + "sig" : "30350281023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 101, + "comment" : "truncated length of integer", + "msg" : "313233343030", + "sig" : "3034023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70281", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 102, + "comment" : "Replacing integer with NULL", + "msg" : "313233343030", + "sig" : "30350500023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 103, + "comment" : "Replacing integer with NULL", + "msg" : "313233343030", + "sig" : "3034023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70500", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 104, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3065003012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 105, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3065013012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 106, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3065033012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 107, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3065043012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 108, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3065ff3012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 109, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7003100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 110, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7013100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 111, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7033100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 112, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7043100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 113, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7ff3100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 114, + "comment" : "dropping value of integer", + "msg" : "313233343030", + "sig" : "30350200023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 115, + "comment" : "dropping value of integer", + "msg" : "313233343030", + "sig" : "3034023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70200", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 116, + "comment" : "using composition for integer", + "msg" : "313233343030", + "sig" : "30692234020112022fb30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 117, + "comment" : "using composition for integer", + "msg" : "313233343030", + "sig" : "3069023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d722350201000230e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 118, + "comment" : "modify first byte of integer", + "msg" : "313233343030", + "sig" : "3065023010b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 119, + "comment" : "modify first byte of integer", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023102e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 120, + "comment" : "modify last byte of integer", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c54857023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 121, + "comment" : "modify last byte of integer", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f02", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 122, + "comment" : "truncated integer", + "msg" : "313233343030", + "sig" : "3064022f12b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 123, + "comment" : "truncated integer", + "msg" : "313233343030", + "sig" : "3064022fb30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 124, + "comment" : "truncated integer", + "msg" : "313233343030", + "sig" : "3064023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023000e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 125, + "comment" : "leading ff in integer", + "msg" : "313233343030", + "sig" : "30660231ff12b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 126, + "comment" : "leading ff in integer", + "msg" : "313233343030", + "sig" : "3066023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70232ff00e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 127, + "comment" : "replaced integer by infinity", + "msg" : "313233343030", + "sig" : "3036090180023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 128, + "comment" : "replaced integer by infinity", + "msg" : "313233343030", + "sig" : "3035023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7090180", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 129, + "comment" : "replacing integer with zero", + "msg" : "313233343030", + "sig" : "3036020100023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 130, + "comment" : "replacing integer with zero", + "msg" : "313233343030", + "sig" : "3035023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7020100", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 131, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "306602310112b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19a25617aad7485e6312a8589714f647acf7a94cffbe8a724a023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 132, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "30660231ff12b30abef6b5476fe6b612ae557c0425661e26b44b1bfe1a138f7ca6eeda02a462743d328394f8b71dd11a2a25001f64023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 133, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "30650230ed4cf541094ab8901949ed51aa83fbda99e1d94bb4e401e6250d35d71ceecf7c4571b51b33ba5fcdf542cc6b0e3ab729023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 134, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3066023100ed4cf541094ab8901949ed51aa83fbda99e1d94bb4e401e5ec7083591125fd5b9d8bc2cd7c6b0748e22ee5d5daffe09c023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 135, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "30660231feed4cf541094ab8901949ed51aa83fbda99e1d94bb4e401e65da9e85528b7a19ced57a768eb09b8530856b30041758db6023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 136, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "306602310112b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 137, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3066023100ed4cf541094ab8901949ed51aa83fbda99e1d94bb4e401e6250d35d71ceecf7c4571b51b33ba5fcdf542cc6b0e3ab729023100e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 138, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023101e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc5f8fc6adfda650a86aa74b95adbd6874b3cd8dde6cc0798f5", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 139, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3064023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70230e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc66a35cfdbf1f6aec7fa409df64a7538556300ab11327d460f", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 140, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70231ff1840da9fc1d2f8f8900cf485d5413b8c2574ee3a8d4ca039ce66e2a219d22358ada554576cda202fb0133b8400bd907e", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 141, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d70231fe1840da9fc1d2f8f8900cf485d5413b8c2574ee3a8d4ca03a07039520259af579558b46a5242978b4c327221933f8670b", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 142, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3065023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d7023101e7bf25603e2d07076ff30b7a2abec473da8b11c572b35fc631991d5de62ddca7525aaba89325dfd04fecc47bff426f82", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 143, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3064023012b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c548d702301840da9fc1d2f8f8900cf485d5413b8c2574ee3a8d4ca039ce66e2a219d22358ada554576cda202fb0133b8400bd907e", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 144, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020100020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 145, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020100020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 146, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201000201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 147, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020100023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 148, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020100023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 149, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020100023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 150, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020100023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 151, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020100023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 152, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3008020100090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 153, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020100090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 154, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020101020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 155, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020101020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 156, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201010201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 157, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020101023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 158, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020101023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 159, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020101023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 160, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020101023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 161, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020101023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 162, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3008020101090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 163, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020101090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 164, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201ff020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 165, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201ff020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 166, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201ff0201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 167, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30360201ff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 168, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30360201ff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 169, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30360201ff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 170, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30360201ff023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 171, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30360201ff023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 172, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30080201ff090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 173, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201ff090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 174, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 175, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 176, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc529730201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 177, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 178, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 179, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 180, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 181, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 182, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3038023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 183, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 184, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 185, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 186, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc529720201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 187, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 188, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 189, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 190, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 191, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 192, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3038023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 193, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 194, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 195, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 196, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc529740201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 197, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 198, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 199, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 200, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 201, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 202, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3038023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 203, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 204, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 205, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 206, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff0201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 207, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 208, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 209, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 210, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 211, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 212, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3038023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 213, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 214, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 215, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 216, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000001000000000201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 217, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 218, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 219, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 220, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 221, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 222, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3038023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 223, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 224, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "30060201010c0130", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 225, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "30050201010c00", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 226, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "30090c0225730c03732573", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 227, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "30080201013003020100", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 228, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "3003020101", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 229, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "3006020101010100", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 230, + "comment" : "Edge case for Shamir multiplication", + "msg" : "3133323237", + "sig" : "3066023100ac042e13ab83394692019170707bc21dd3d7b8d233d11b651757085bdd5767eabbb85322984f14437335de0cdf565684023100bd770d3ee4beadbabe7ca46e8c4702783435228d46e2dd360e322fe61c86926fa49c8116ec940f72ac8c30d9beb3e12f", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 231, + "comment" : "special case hash", + "msg" : "31373530353531383135", + "sig" : "3066023100d3298a0193c4316b34e3833ff764a82cff4ef57b5dd79ed6237b51ff76ceab13bf92131f41030515b7e012d2ba857830023100bfc7518d2ad20ed5f58f3be79720f1866f7a23b3bd1bf913d3916819d008497a071046311d3c2fd05fc284c964a39617", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 232, + "comment" : "special case hash", + "msg" : "3130333633303731", + "sig" : "3065023100e14f41a5fc83aa4725a9ea60ab5b0b9de27f519af4b557a601f1fee0243f8eee5180f8c531414f3473f4457430cb7a2602301047ed2bf1f98e3ce93e8fdbdc63cc79f238998fee74e1bb6cd708694950bbffe3945066064da043f04d7083d0a596ec", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 233, + "comment" : "special case hash", + "msg" : "32333632343231333231", + "sig" : "3066023100b7c8b5cf631a96ad908d6a8c8d0e0a35fcc22a5a36050230b665932764ae45bd84cb87ebba8e444abd89e4483fc9c4a8023100a11636c095aa9bc69cf24b50a0a9e5377d0ffbba4fab5433159f006ab4563d55e918493020a19691574e4d1e66e3975e", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 234, + "comment" : "special case hash", + "msg" : "34353838303134363536", + "sig" : "306402304a7df2df6a32d59b6bfed54f032c3d6f3acd3ac4063704099cd162ab3908e8eeba4e973ee75b5e285dd572062338fe58023035365be327e2463dc759951c5c0be5e3d094cb706912fdf7d26b15d4a5c42ffebeca5ae73a1823f5e65d571b4ccf1a82", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 235, + "comment" : "special case hash", + "msg" : "32313436363035363432", + "sig" : "30660231009ad363a1bbc67c57c82a378e988cc083cc91f8b32739ec647c0cb348fb5c86472015131a7d9083bf4740af3351755195023100d310dc1509f8c00281efe571768d488027ea760fe32971f6cb7b57cdf90621b7d0086e26443d3761df7aa3a4eccc6c58", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 236, + "comment" : "special case hash", + "msg" : "333335333030383230", + "sig" : "306502310095078af5c2ac230239557f5fcee2e712a7034e95437a9b34c1692a81270edcf8ddd5aba1138a42012663e5f81c9beae2023040ee510a0cceb8518ad4f618599164da0f3ba75eceeac216216ec62bcceae8dc98b5e35b2e7ed47c4b8ebacfe84a74e6", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 237, + "comment" : "special case hash", + "msg" : "36333936363033363331", + "sig" : "3066023100a538076362043de54864464c14a6c1c3a478443726c1309a36b9e9ea1592b40c3f3f90d195bd298004a71e8f285e093a023100d74f97ef38468515a8c927a450275c14dc16ddbdd92b3a5cae804be20d29c682129247d2e01d37dabe38ffb74808a8b7", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 238, + "comment" : "special case hash", + "msg" : "33333931363630373935", + "sig" : "3065023100bbe835113f8ea4dc469f0283af6603f3d7a3a222b3ab5a93db56007ef2dc07c97988fc7b8b833057fa3fbf97413b6c150230737c316320b61002c2acb184d82e60e46bd2129a9bbf563c80da423121c161decd363518b260aaacf3734c1ef9faa925", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 239, + "comment" : "special case hash", + "msg" : "31343436393735393634", + "sig" : "30650230679c3640ad8ffe9577d9b59b18ff5598dbfe61122bbab8238d268907c989cd94dc7f601d17486af93f6d18624aa524a3023100e84dd195502bdcdd77b7f51d8c1ea789006905844a0e185474af1a583bab564ee23be0bc49500390dceb3d3948f06730", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 240, + "comment" : "special case hash", + "msg" : "35313539343738363431", + "sig" : "3066023100f6f1afe6febce799cc9b754279f2499f3825c3e789accef46d3f068e2b6781fd50669e80c3c7293a5c0c0af48e068e35023100f59cc8c2222ed63b4553f8149ebecc43b866719b294ef0832a12b3e3dbc825eeab68b5779625b10ae5541412ec295354", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 241, + "comment" : "special case hash", + "msg" : "35323431373932333331", + "sig" : "3065023100f46496f6d473f3c091a68aaa3749220c840061cd4f888613ccfeac0aa0411b451edbd4facbe38d2dd9d6d0d0d255ed34023000c3a74fa6666f58c4798f30c3779813e5c6d08ac31a792c2d0f9cb708733f26ad6bf3b1e46815ae536aa151680bdee2", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 242, + "comment" : "special case hash", + "msg" : "31313437323930323034", + "sig" : "3066023100df8b8e4cb1bc4ec69cb1472fa5a81c36642ed47fc6ce560033c4f7cb0bc8459b5788e34caa7d96e6071188e449f0207a0231008b8ee0177962a489938f3feffae55729d9d446fe438c7cb91ea5f632c80aa72a43b9b04e6de7ff34f76f4425107fd697", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 243, + "comment" : "special case hash", + "msg" : "3130383738373235363435", + "sig" : "30660231008bb6a8ecdc8b483ad7b9c94bb39f63b5fc1378efe8c0204a74631dded7159643821419af33863b0414bd87ecf73ba3fb0231008928449f2d6db2b2c65d44d98beb77eeadcbda83ff33e57eb183e1fc29ad86f0ba29ee66e750e8170ccc434cf70ae199", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 244, + "comment" : "special case hash", + "msg" : "37333433333036353633", + "sig" : "3065023100e3832877c80c4ed439d8eadcf615c0286ff54943e3ae2f66a3b9f886245fea470e6d5812cef80c23e4f568d0215a3bfc02303177a7dbf0ab8f8f5fc1d01b19d6a5e89642899f369dfe213b7cc55d8eaf21dd2885efce52b5959c1f06b7cac5773e5b", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 245, + "comment" : "special case hash", + "msg" : "393734343630393738", + "sig" : "306502306275738f0880023286a9b6f28ea0a9779e8d644c3dec48293c64f1566b34e15c7119bd9d02fa2357774cabc9e53ef7e6023100d2f0a52b1016082bd5517609ee81c0764dc38a8f32d9a5074e717ee1d832f9ea0e4c6b100b1fd5e7f4bc7468c79d3933", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 246, + "comment" : "special case hash", + "msg" : "33323237303836383339", + "sig" : "3066023100d316fe5168cf13753c8c3bbef83869a6703dc0d5afa82af49c88ff3555660f57919a6f36e84451c3e8e5783e3b83fe3b023100995f08c8fec7cd82ce27e7509393f5a3803a48fe255fcb160321c6e1890eb36e37bcda158f0fa6899e7d107e52de8c3c", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 247, + "comment" : "special case hash", + "msg" : "323332393736343130", + "sig" : "306402300b13b8fd10fa7b42169137588ad3f557539a4e9206f3a1f1fe9202b0690defded2be18147f5b2da9285c0e7349735ea302300478ad317b22a247bf9334719b4c8ee84acf134515db77e6141c75d08961e1e51eaca29836744103de0f6a4c798d3eeb", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 248, + "comment" : "special case hash", + "msg" : "3934303437333831", + "sig" : "3065023015804429bcb5277d4f0af73bd54c8a177499a7b64f18afc566c3ce7096bdc6c275e38548edcfa0b78dd7f57b6f393e49023100d5951f243e65b82ba5c0c7552d33b11f1e90fde0c3fd014aac1bb27db2aaf09b667c8b247c4cdd5b0723fba83b4f999e", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 249, + "comment" : "special case hash", + "msg" : "33323230353639313233", + "sig" : "30650230359247c95776bb17492b7bf827f5f330fa9f9de7cc10441a1479c81776ce36cdc6a13c5f5149c4e39147a196bb02ed34023100f6ed9252a73de48516f4eabab6368fbff6875128af4e1226d54db558bd76eec369cc9b285bc196d512e531f84864d33f", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 250, + "comment" : "special case hash", + "msg" : "343134303533393934", + "sig" : "3065023100a557d1f63a2094f683429ecb35a6533bac897682775c0051e111eed6e076c48867cae005c5e0803800b050311e381cd602302a2f871efcf03cf1c8f509e076aaa2a76f1ea78d1c64804ea5b063b0324b8e98eb5825d04370106020ee15805dbedf81", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 251, + "comment" : "special case hash", + "msg" : "31393531353638363439", + "sig" : "3065023100f22bf91169b4aec84ca84041cb826f7dfc6f33d973f3c72433b8a0ca203aac93f7eed62be9bea01706402d5b5d3b0e6502307841d3bc34aa47e813a55c25203c5ec2342d838d5b4638c2705dcf4bac9c24f765b5d4c28fa3c7fda7a38ed5048c7de3", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 252, + "comment" : "special case hash", + "msg" : "35393539303731363335", + "sig" : "30660231009c196e39a2d61a3c2565f5932f357e242892737e9adfc86c6609f291e5e6fdbb23029ff915a032b0c5390ba9d15f203e023100d721e28e5269d7813e8a9aed53a37e652fec1560ca61f28f55ab4c262cc6214eee8d3c4c2ba9d1ba0ba19e5e3c7484a7", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 253, + "comment" : "special case hash", + "msg" : "323135333436393533", + "sig" : "30660231008ba1e9dec14d300b0e250ea0bcd4419c3d9559622cc7b8375bd73f7d70133242e3d5bf70bc782808734654bacd12daea023100d893d3970f72ccab35555ae91ebcfed3c5bfc5d39181071bc06ba382587a695e02ed482f1a74fe309a399eaee5f5bc52", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 254, + "comment" : "special case hash", + "msg" : "34383037313039383330", + "sig" : "306402302f521d9d83e1bff8d25255a9bdca90e15d78a8c9ea7885b884024a40de9a315bed7f746b5da4ce96b070208e9ae0cfa502304185c6f4225b8c255a4d31abb5c9b6c686a6ee50a8eb7103aaef90245a4722fc8996f266f262109c3b5957ba73289a20", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 255, + "comment" : "special case hash", + "msg" : "343932393339363930", + "sig" : "3065023100d4900f54c1bc841d38eb2f13e0bafbb12b5667393b07102db90639744f54d78960b344c8fbfbf3540b38d00278e177aa02303a16eff0399700009b6949f3f506c543495bf8e0f3a34feb8edd63648747b531adc4e75398e4da8083b88b34c2fb97a8", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 256, + "comment" : "special case hash", + "msg" : "32313132333535393630", + "sig" : "3065023100c0169e2b8b97eeb0650e27653f2e473b97a06e1e888b07c1018c730cabfdeeec4a626c3edee0767d44e8ed07080c2ac4023013f46475f955f9701928067e3982d4ba5a58a379a66f91b74fad9ac8aee30086be6f41c9c2d8fb80e0924dedbe67e968", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 257, + "comment" : "special case hash", + "msg" : "31323339323735373034", + "sig" : "306402302e868871ea8b27a8a746882152051f2b146af4ac9d8473b4b6852f80a1d0c7cab57489aa43f89024388aec0605b0263702306d8c89eed8a5a6252c5cead1c55391c6743d881609e3db24d70ead80a663570020798fbf41d4c624fcb1ce36c536fe38", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 258, + "comment" : "special case hash", + "msg" : "32303831313838373638", + "sig" : "3065023100abe6a51179ee87c957805ecad5ccebca30c6e3a3e6dbe4eb4d130b71df2bf590b9d67c8f49e81bf90ce0909d3c2dab4c02307110582fab495b21bd9dda064fbd7acc09d0544dcf7699be35ad16207ffa10e8904f9241a709487ba2ba7e34430b81c3", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 259, + "comment" : "special case hash", + "msg" : "343534363038393633", + "sig" : "3064023050252c19e60e4120b7c28b2c2e0a588e5d107518cd61e5c7999c6d465ea134f752322d8b83f5988fcdc62bd9adb36ccd0230193899352491dabfe4fc942e14ddacb200673729d61602cc0baf5732d262f36e5279865a810ce2f977f57686a0d0137a", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 260, + "comment" : "special case hash", + "msg" : "31333837363837313131", + "sig" : "3066023100eb725fdd539d7de8ea02fac8db6ec464f40c272a63e6b2718c4e0266bf1235dae330f747a6052f4319ecbe7bdade9bd0023100ae84507648ba2d1944bb67722ccd2cb94b92b59e89a1ae698c668bb57f481c42b216c23da4b1d8c0e502ef97fda05ad0", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 261, + "comment" : "special case hash", + "msg" : "32303331333831383735", + "sig" : "3064023025aa56fcbd92f2cf53bddbaa0db537de5843290731c1dd78036fcbded4a8f7187ddfed9f5ca9d98ea7b12d24b8d29d570230028f68372d66164810bf79c30a191116d496fe32314605dc1668289425fb3a15d7532dde1052a49a35866c147abde1d9", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 262, + "comment" : "special case hash", + "msg" : "323535333538333333", + "sig" : "3065023054bf7adc8548e7cae270e7b097f16b5e315158d21b0e652ce1cfe4b33126ba4a65bf227b4cddcaf22d33d82478937b20023100bfc1b8f1d02846a42f31e1bd10ba334065459f712a3bbc76005d6c6488889f88c0983f4834d0bf2249dbf0a6db760701", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 263, + "comment" : "special case hash", + "msg" : "34363138383431343732", + "sig" : "3066023100d3bb29ac0bd1f6058a5197f766d6ea3216c572ded62af46318c8c7f9547bb246553654279d69989d9af5ef4ccacf64da023100e10281122c2112a2a5a9d87ac58f64fb07c996a2d09292119e8f24d5499b2e8524ebd0570097f6cc7f9c26094a35c857", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 264, + "comment" : "special case hash", + "msg" : "31303039323435383534", + "sig" : "3066023100bc32e85e3112472408f9324586e525325128a38313c34b79700cb0a3f7262a90a1fcc40eef1f1a3884032a7a21810e0a023100c02f52541360358107a13dbea31f83d80397710901734b7adb78b1fc904454a28a378514ccef80ecc70c1d8e55f11311", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 265, + "comment" : "special case hash", + "msg" : "32373536343636353238", + "sig" : "3066023100f04b9e17c71d2d2133ea380d71b6b82c8a8e3332703e9d535b2c2bca9b0ad586d176a6049afa35edd9722edb5c33daa3023100bd44d4a6263380ca6f22e76c26d5f70f41f4d7cae7d4b9c1b8dc2ba5298d9d12408b04614e2f3796cc19c950c8c88a10", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 266, + "comment" : "special case hash", + "msg" : "313139363937313032", + "sig" : "3065023100c8807351d8e261338e750cb9a52f4be4470b63f6f181cbe0e81d43b60824ba4be1bba42b1783897a0d72b0614018b02f023052e3a598c8be982127e961eed2b04f21c86df4ebcab0d955a7c66ec7f818898798ee75367a85022276b912c0a072bff7", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 267, + "comment" : "special case hash", + "msg" : "323333313432313732", + "sig" : "306402306152841b6fb460546eeb4158a3e5ffa54f51aa6a208987be899b706055cd59d8ec7c01f4634254fe050e1d4ec525a173023073f0c5f13640d892c28f701428e8fbfb736b6478bbd972c8c684977556ed599a70d313e06b126080e13068d56e1c10be", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 268, + "comment" : "special case hash", + "msg" : "31363733343831383938", + "sig" : "3066023100842f8d2814f5b7163f4b21bd9727246e078ad1e7435dfe1bc5f9e0e7374232e686b9b98b73deab9e43b3b7f25416c2be023100852c106c412300bac3ba265990b428a26076ab3f00fd7657bbd9315fa1cd2a1230a9a60d06b7af87aa0a6cf3f48b344c", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 269, + "comment" : "special case hash", + "msg" : "31343630313539383237", + "sig" : "3066023100e13f6d638b9d4fba54aa436a945cfea66dec058fab6f026293265884457b5a86e8e927d699bc64431b71e3d41df200440231009832cd1b4177118ed247b4f31277da15f420179f45c71a237d77f599a45df68247bac3dcef0868ecd1665005c25b7c6c", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 270, + "comment" : "special case hash", + "msg" : "38393930383539393239", + "sig" : "3064023009fff1c2e4ff8643cbfad588620c2bf7aaca5cf4242969142c7145b927bd82ed14f3ae8c6e2ce2da63b990b9f1be6d640230780c816f6c86343b008235ee986abf2136123ed247e4751e4d5467334f08e5e2ca1161254f68c3e6678e2d0b87d1cc7c", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 271, + "comment" : "special case hash", + "msg" : "34333236343430393831", + "sig" : "3066023100ffae6e7d2cea71b5a9c73cbc1285a8d252949772afe1aa27fb137740fc429c2a8c8648c9a5ba678a32f7ae7689b395ca02310089d54cd13a162c34189ff524813690e79768af8ebe794cc941dfe7fdf2cb8dd0b42519f034ea4d4f1c870046d13210e1", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 272, + "comment" : "special case hash", + "msg" : "32333736343337353537", + "sig" : "3066023100efa3c5fc3c8be1007475a2dbd46e3578bb30579445909c2445f850fb8aa60aa5b1749cc3400d8ffd81cb8832b50d27b4023100b36a08db3845b3d2ebd2c335480f12fb83f2a7351841ea3842ec62ad904b098efbf9faa7828b9c185746d9c8bd047d76", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 273, + "comment" : "special case hash", + "msg" : "383630333937373230", + "sig" : "3066023100f577095f7c74594aa1c69aca9bb26e0c7475ae5163058ecc074b03af89e56b12b6a72450589dacf0d7e6b172d0017a0e023100bee756a0b5d0a677bf95f98da512854f3ecb712f94570e1ad230eab17c527b6a8bcc9ae202b657a3611ecffa94ba0d54", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 274, + "comment" : "special case hash", + "msg" : "35383037373733393837", + "sig" : "306502300ae7688c7de5882eb9c3172f5500015552f998fb53702c6cd4b03404d5a0510a8073db95db544808dbd76659fd20cf12023100bc610fe5f04d8909cc439615fb7e302d3d82992817647c50c1f467090a52b328cbbc0262f18ffb6fd9f3bd60013cea08", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 275, + "comment" : "special case hash", + "msg" : "353731383636383537", + "sig" : "306502305dc8a6d84afaaf900d78c6a91dc5e12e7d17891a52c1468253061d704b8940bef85b9fe807a0e02b56e8dd37c22fbb82023100914258de52932c4604dceb5ce7cc0a92e021edca9b819b84a9f25652f9af13f956a1139ee95c7aa7a079e3ad8317fbdb", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 276, + "comment" : "special case hash", + "msg" : "38363737333039333632", + "sig" : "3066023100da55a6dbb845205c87c995b0bbc8444ffcba6eb1f4eb9d30f721d2dacc198fb1a8296075e68eb3d25ef596a952b8ea19023100829f671dccad6d7b0b8c4b39ff3f42597965d55c645fb880a66fe198d9344c9311f1598930392470379fa5ff43c75d04", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 277, + "comment" : "special case hash", + "msg" : "32343735353135303630", + "sig" : "306402303730dfd0985de77decdd358a544b47f418d3fab42481530d5d514859894c6f23b729af72b44686058de29687b34b3b0c023065bdfaf0ac217a80b82eb09c9f59c5c8cfbf50a6eb979a8f5f63eab9bd38ee0938e4b23102112033b230a14ad2790e3f", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 278, + "comment" : "special case hash", + "msg" : "393733313736383734", + "sig" : "3065023055210df2124c170e259af1dafa73e66613aa18ced8eb40a7f66155d50d5f3124edfa55276de4797013177291e8afeff6023100c314d3a310a60647dad3318ed7f0405a64c3f94b5ac98e6be12208c8ad9835fa6b81a0ea59f476608634657b66e00ffd", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 279, + "comment" : "special case hash", + "msg" : "33363938303935313438", + "sig" : "3065023100f6c9897144b5d84964515eb0c8c3d0d9c6687c957887e93c29b2a21804b40307fb88bfd5cca11c95885d28867cb33a740230656bafca242290f7d7e9801b6cfd4bd1b07e8d7c6c1c59fd3d8e82e9846a1b2855c85420e4ee6ec2d97fec2161eeb243", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 280, + "comment" : "special case hash", + "msg" : "3130373530323638353736", + "sig" : "3065023100bfbcc5f343e2ab392ce6c1c02d91c00650c47136836a5d0622d476ac2b3274395721b1ab21882ed5cabed093b43b133f0230043e9fc64c6108df73f9eced90f91185f83d89662f5a9d810c1824fbfd97b842f784305fd6b9c28c80d32d52b1538d12", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 281, + "comment" : "special case hash", + "msg" : "383639313439353538", + "sig" : "3066023100b8f793ddd47e657a9081cbed1600fb22b38ad6a155f9c006ba98de1f383b4c0918ceea72253e0f869524b2369cd9bd8c02310096c452ff58f42e0853040a6d5c7e750b57dd4af06e2df8194e8d524e81ac000ee3315bbeabbf6a21f61b8904c55378d9", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 282, + "comment" : "special case hash", + "msg" : "32313734363535343335", + "sig" : "30640230263ab1c93567e93b5ec4e380b0d3bb5ea1ce693c14a47afccc539aaf197f099d331ea9e26f1a0057148d46727acb61880230621db07ce94110e2be74fa953a00a8a554225b3f2c0f6c56b4ebd4db2f57ca2565ed3323fd708bb56ac6e28bfb40f2e7", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 283, + "comment" : "special case hash", + "msg" : "363434353530373932", + "sig" : "306502310096f4a2b3529c65e45a0b4c19c582dc8db635d4e74f0b81309696b23be920ba8ec553d4b370df4c59d74dd654bac6df5802301573ba1b280c735a3401d957ecd3b8908e4e0b7d80239ce042594d182faf2ddf811c9056aac4c87f4f85043766a26614", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 284, + "comment" : "special case hash", + "msg" : "353332383138333338", + "sig" : "306602310096a691b19a6294b311a438f8da345e480b1deaa1e940cfbf02177d5f08479976ea58aee31011d50b5542be188c9d63df0231008f67dc9e1588aeb8be180013d41a036f9badfad9fe9340910cbf87243776f54bef7da2ebf3a7643866eb9a3b23fe59b9", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 285, + "comment" : "special case hash", + "msg" : "31313932303736333832", + "sig" : "3066023100cff27948c6d902c73d103d0802eb144dd89c1b0e3b9f9a5e498b0361dc122a0d555160d8c64d61539c1dbbd4bc18971f023100b60827488c9f16ba28378fd59b1a29c65073335a7f236131134674c62c8396f193c76f2395ddaaa4f24b69161eb69b4d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 286, + "comment" : "special case hash", + "msg" : "31353332383432323230", + "sig" : "3066023100e90e22d9e535dfdfd86e098d5d6a0ae08f69d4a3ffaa39f6930bcf5f5ad02ee0d0472ae984edd9f0bbe5e7d63fd4f6ac023100e3f57b0a4629ecaa21f2d34a7a0834d57ba20f99c6e31b43c37811cc23b9957c8f3356f4462214d3c8e58745e50f23f6", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 287, + "comment" : "special case hash", + "msg" : "313536373137373339", + "sig" : "3064023018b70e272a98cc48e1e0af73146f0f972bbfbeb6b985feb2c4acd695a7a41b99c415be9c46aedaf3ddff67a65a89e387023047d6bcea088f622ad35d88bcf46d71827bcba2f57c36d6fb8a4bf2befdc0d4e3ef366d5966c4d076d3cfa43d6626717b", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 288, + "comment" : "special case hash", + "msg" : "34333033303931313230", + "sig" : "3066023100acfd981c55fd5286cfce173726d51c3d25f65b11b7673729a62167256774f7c894b74662a212c706e00cef096074162f023100f4d471c97797c24d96aec1de85a249ef468d6036cd712563aeb65cea4995f3ee85e769b874f09a08637a44a96084be7a", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 289, + "comment" : "special case hash", + "msg" : "37373335393135353831", + "sig" : "3065023100f15fcbeea8b64dad5e8566a2c37913c82d6be9d9668df469bd0b591c3923a6e12644eaf697d466fa7cd513983d946a40023070063966801079351526999e5c5c2c5f627e4c8bc96784bcbe715fe7c7afcf69785d1c8c7ccd3725e364101638396597", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 290, + "comment" : "special case hash", + "msg" : "323433393636373430", + "sig" : "3066023100d995147939ae6d8f62bb57372227395839e25a0d4308b899d5f506cf9e0a01e8115b7e4b822f037ec95752bd9e892f5e0231009bb4d07333e468f8482a790a2a2e650e2c42da8240ec5e402506b368122f046680cd71e0117897cce3df4a1555fc8876", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 291, + "comment" : "special case hash", + "msg" : "34333237363032383233", + "sig" : "3064023043c6ce5184476f3f496afeae3cb96a3f9f038957686c93437b8266a233022371d266e904aa096c3566cb33824b88075e0230680c13245a8bc560b638d26f0c5f261964130256939552d3fffb07b658355611612c268a89541055d3c2bf9e82cf4da3", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 292, + "comment" : "special case hash", + "msg" : "32393332303032353932", + "sig" : "30630230447539941dc350767fc841083d25d9247a0807e1e22e0bb9d94f504f721981b413d521efbd75e4fe831ee26338cf3de3022f395ab27ea782cee4be53e06c7616bbd41d6926b18d219d75d5979f13cba2f52101019b0ec0a41ffdbf29ef73ddba70", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 293, + "comment" : "special case hash", + "msg" : "36343039383737323834", + "sig" : "3066023100a0ba8e8b979c20345e34fca98531900164a859923bd6986a9c39236a2f5de053a252997f35e5b84b0d48ba0f8d09aedd023100facd6df04358fcd95fa9018a6fc0828dfe319812ff65929c060b18ad4b9f06e7fc0addd1b695315d71c15e51dc51d719", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 294, + "comment" : "special case hash", + "msg" : "36303735363930343132", + "sig" : "3065023100b8378390f71f0bb6663f1846daf6908f8c84f770ae740cc8054122494cf0ffa9437ab26040ca22808fb29a810b70126e0230427636b929a500abc34d9f22977b81e734919afaf3ed2c91eeada7074e0c16bdc52f960eaec9db5a879c1e6414035101", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 295, + "comment" : "special case hash", + "msg" : "32333231363233313335", + "sig" : "3066023100f36a9048fd94803d3d6d1b11430b90b94ef8d5d2ad89018c69473ce9cfe0d6105b3c2fb2e7555ccd25f65af8c872bdc602310081254841e7ecbfd0d810afaaf5afd6d6c5d0542bb00cc183b1db01767120afbcc0006ddcba8db7baf65f302723dabc4d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 296, + "comment" : "special case hash", + "msg" : "36343130313532313731", + "sig" : "3066023100d8a4d96409c191baa9540bf35f1d5192f9352d7f0e14f92c0e8e1f19f559b42ed3c6b7bdb6becc56584fb5c09421e2e4023100d966ba13d4245e248eafb46f2a3df92c2037d5969c7db6dbcb0ff4b21850e16a18a29785267239886365cf721a212536", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 297, + "comment" : "special case hash", + "msg" : "383337323835373438", + "sig" : "306402301d5d86fd48e65b0cf0b0b46062241f89cf65785dd818f93f1162771a38a15f20febc261812ecaaf6f4f2b86b3362d7eb02300c76e363de1432513cb9dad6493931381ecd25f142e61968b6f20d7b1270cb9e38a7ae54e4778aff4025eb00c6a67aef", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 298, + "comment" : "special case hash", + "msg" : "33333234373034353235", + "sig" : "306402300508eed148f061114be18e8a86188feabf76b873b36eadcca9c2c60e24a2002fe456231decf7a8f6f032c08dbe0ab5a90230694c0ad781b2341e30e1d0739ac99672064f48821a69852c7940cf1d621738199c980d56d2a0b71b3fc6011c6b2444ba", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 299, + "comment" : "special case hash", + "msg" : "31343033393636383732", + "sig" : "30650230726ef88bb7947a043116c111cb519ddeda3e6ffbf724884a1b22c24409cdf2779d93ce610c8c07411c2b001399103d6d02310095dc1d65046caf0e8dad07b224798d6f7807278e737883e7c7bf0b446791d4ee144c26f710134861af4e6771d4082896", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 300, + "comment" : "special case hash", + "msg" : "31323237363035313238", + "sig" : "3066023100eb0e8e3c639f5eba8eccd9020d0ec62d8ac73f3fddbdfa08fdb2155deb0a536923ebd55e20020cab9f8e39a43a88be11023100c796df399fc35883dd5dae6817d02d3d67a8eec6601585e5e36fd2c134eddb1447ec12b144dddc9aae28a84f22602641", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 301, + "comment" : "special case hash", + "msg" : "34393531343838333632", + "sig" : "3065023100e8f8c69d0396ea900f9757736d2b19dbc2d2a8c01dccf490c8b9455bd63b34c095867e7cf3b84dc7c3c3d6b51bebf405023058152a7564eeb22a3e26597026d0cd7835725bd512245448cb5016eb48ea759809fd6949d0ee5d579643f72f908c16bb", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 302, + "comment" : "special case hash", + "msg" : "32343532313237303139", + "sig" : "30650230380b4e48b3ff012af7c08bf871d9f4da0c708b5494a986d3d80b1979e579d0dbee61db9bc3c04c396176410788e15a0f023100e6971c013c965a7e4df10f95620a5092fab096bd5b50828f4bc91c5e479bccf6e0daf287e7ef580fa9ea153fa1a507a2", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 303, + "comment" : "special case hash", + "msg" : "31373331353530373036", + "sig" : "30650231008061de12029e2b000d157a455ecf2301222f092df95b9551b78cf0ef3a64f12212b57ec7b16d2c0f258946f51cb1633a02300ac2ca6ad99b29ca29a0dc38b34443ee41020f81ed9087cef7681a00c4fe60653a572944ba37f1fe51d112bfffbdd701", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 304, + "comment" : "special case hash", + "msg" : "31363637303639383738", + "sig" : "3066023100e74f2a791eeb7341cff6cc1c24f459e6c0109924f7984639ae387e3ceb58758a1bc3839dea1fc3a3799562225e70a733023100d90e4d0f47343268e56bbcb011bd4734390abc9aa1304b6253e78f5a78b6905aa6bf6a3892a4ae1a875c823ae5a83e87", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 305, + "comment" : "special case hash", + "msg" : "343431353437363137", + "sig" : "306402306a1cd0ff7906be207b56862edcbc0d0bbfb26d43255c99f6ab77639f5e6103a07aa322b22ed43870d1ce6df68aa0a8c10230655558b129aa23184500bd4aab4f0355d3192e9b8860f60b05a1c29261f4486a6ae235a526339b86c05f5fac477b6723", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 306, + "comment" : "special case hash", + "msg" : "343233393434393938", + "sig" : "306602310081111fdc5f0de65583c7a5668d26c04ee52e08dac227753132cff1741cb721e112aa793c0d5fa047faf14cb45dd13e1f0231009a25cf1e6c152bc3e216e021561d194979f1c11fe17019ed7bac2c13c4010f209665e3b6f33b86641704d922b407818f", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 307, + "comment" : "special case hash", + "msg" : "34383037363230373132", + "sig" : "30660231009b66d122a315095b2b66ccb97272c476a2d760e827fdea05732d634df3d066569c984dd941aad5f5dec4c2e1b7b94a0002310096c32403c85bc3d0ee87f96a600182796dce53d54d7467ae660a42b87bb70792f14650ac28a5fa47ce9ca4d3b2c25878", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 308, + "comment" : "special case hash", + "msg" : "32313634363636323839", + "sig" : "306402302bb062a002088d62a0b7338d0484fedfe2af7e20cebf6a4788264eb27cb4ebc3cc81c816e6a35722cf9b464783094cb8023046cc21b70f2133f85ab0443bebe9c6fc62c6e2ec1fd9c4ddf4a6d5f3f48eb7abf1ee7bdf6725879fd1b7daafb44f6e04", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 309, + "comment" : "special case hash", + "msg" : "31393432383533383635", + "sig" : "3065023033e87061ee9a82eb74d8bb4ae91606563c2e4db8b09183cc00d1119ab4f5033d287a1fc90a2348163fdf68d35006fd7f02310096db97c947ee2e96e6139d3bcbf5a43606bae1ad3ca28290fbad43b281ef115ec1b98bc581ef48094f8c1aa8e36c282a", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 310, + "comment" : "special case hash", + "msg" : "32323139333833353231", + "sig" : "3064023070f80b438424ba228a7d80f26e22ff6a896243c9d49c75573489ee0de58ec60efd103838143465bd8fe34672ba9496170230115492bd9365b96f38747536318bffb819e7c146df3a5a7a46d6288c7fdf31cff570b22176aa398daba9073ab1e7b9bf", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 311, + "comment" : "special case hash", + "msg" : "393236393333343139", + "sig" : "3066023100ff16ca0389ea6948f4305b434fe0aa589f880f5aa937767c31170ee8da6c1ad620c993d40ddf141b7fda37424d51b5cd023100ba0f86985dffc61d6e35a37de06918b11e431b72403161acfb8f05c469f1fcfa6e215c6f7eb5a0a5e0cc9e7be79ce18b", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 312, + "comment" : "special case hash", + "msg" : "373639333836333634", + "sig" : "3065023100d60c24bee05f5198cd155ad095ffb956bbcfb66b82fc0d3755119915a62f2f923557b85ddc1d12e6a757f23042cb601b02302c4d968b5eac930b51d283b418fcff6df3a9d6d66e3812cd1bf5fde797fd203a7c439b1b381e4fe8b44e6f108764a7dd", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 313, + "comment" : "special case hash", + "msg" : "32373335393330353733", + "sig" : "3066023100bdf634d915a4fae7a155532ca2847c33a6babe7ef8db0af50f485db3dd2c8bffe722394583932f6eb5cd97f6db7561d9023100bb425cae2e5483174b5ed873af4329da4618c14458141850bee3c7bf1ffb3f2030159043277dacc708e9d32f63400083", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 314, + "comment" : "special case hash", + "msg" : "38333030353634303635", + "sig" : "30650230061320a3bcebac33cf399d45d1e1e1b34f37288fe4753f4fddfd496eff427e1d26b1b91d749cc34c12f4ecef837c0e8f023100fd5cf468cda319fe06e773a190c38de6e150a321ac1c416ad875432cdb7a07134c446f13068e71a1a96e35da923974ad", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 315, + "comment" : "special case hash", + "msg" : "34333037363535373338", + "sig" : "3065023100d620f063d33efa859b623f6c9a92340e4cdd854ffbe3e5e01379177aee31715ce587b00bd0aea98fddf236d2fc8a7a740230671f4b7c187297dc236c61888b6d9397e97783077cc4101807d79ee62e4a53a78c4b6a3a31b03178668af894a3d8902e", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 316, + "comment" : "special case hash", + "msg" : "39363537303138313735", + "sig" : "306502310091c556c5bddd529fe903b86afc0eb8fa1f49425b779a39114ae563bebc947e633ba4ee98948faa8940dfe2562c63e1c50230198b00079d8db072d25b0a49bc8bc36457926f3c101527528df6679f92c76f1b487e6695d4b92fe33b4ee7046a6a5df9", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "044bf4e52f958427ebb5915fb8c9595551b4d3a3fdab67badd9d6c3093f425ba43630df71f42f0eb7ceaa94d9f6448a85dd30331588249fd2fdc0b309ec7ed8481bc16f27800c13d7db700fc82e1b1c8545aa0c0d3b56e3bfe789fc18a916887c2", + "wx" : "4bf4e52f958427ebb5915fb8c9595551b4d3a3fdab67badd9d6c3093f425ba43630df71f42f0eb7ceaa94d9f6448a85d", + "wy" : "00d30331588249fd2fdc0b309ec7ed8481bc16f27800c13d7db700fc82e1b1c8545aa0c0d3b56e3bfe789fc18a916887c2" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200044bf4e52f958427ebb5915fb8c9595551b4d3a3fdab67badd9d6c3093f425ba43630df71f42f0eb7ceaa94d9f6448a85dd30331588249fd2fdc0b309ec7ed8481bc16f27800c13d7db700fc82e1b1c8545aa0c0d3b56e3bfe789fc18a916887c2", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAES/TlL5WEJ+u1kV+4yVlVUbTTo/2rZ7rd\nnWwwk/QlukNjDfcfQvDrfOqpTZ9kSKhd0wMxWIJJ/S/cCzCex+2EgbwW8ngAwT19\ntwD8guGxyFRaoMDTtW47/nifwYqRaIfC\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 317, + "comment" : "k*G has a large x-coordinate", + "msg" : "313233343030", + "sig" : "304d0218389cb27e0bc8d21fa7e5f24cb74f58851313e696333ad68b023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52970", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 318, + "comment" : "r too large", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffe023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52970", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "043623bb296b88f626d0f92656bf016f115b721277ccb4930739bfbd81f9c1e734630e0685d32e154e0b4a5c62e43851f6768356b4a5764c128c7b1105e3d778a89d1e01da297ede1bc4312c2583e0bbddd21613583dd09ab895c63be479f94576", + "wx" : "3623bb296b88f626d0f92656bf016f115b721277ccb4930739bfbd81f9c1e734630e0685d32e154e0b4a5c62e43851f6", + "wy" : "768356b4a5764c128c7b1105e3d778a89d1e01da297ede1bc4312c2583e0bbddd21613583dd09ab895c63be479f94576" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200043623bb296b88f626d0f92656bf016f115b721277ccb4930739bfbd81f9c1e734630e0685d32e154e0b4a5c62e43851f6768356b4a5764c128c7b1105e3d778a89d1e01da297ede1bc4312c2583e0bbddd21613583dd09ab895c63be479f94576", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAENiO7KWuI9ibQ+SZWvwFvEVtyEnfMtJMH\nOb+9gfnB5zRjDgaF0y4VTgtKXGLkOFH2doNWtKV2TBKMexEF49d4qJ0eAdopft4b\nxDEsJYPgu93SFhNYPdCauJXGO+R5+UV2\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 319, + "comment" : "r,s are large", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52971", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04d516cb8ac8e4457b693d5192beeb6ce7d9a46bef48eecf3ea823286f101f98d130f5a26dc6fec23662eff07f14486fd58456932e74894b7f0e3bb0dfd362502b3765dd80a3177209fb221dc9b51aaf4470b245391405bef514176b13a267a720", + "wx" : "00d516cb8ac8e4457b693d5192beeb6ce7d9a46bef48eecf3ea823286f101f98d130f5a26dc6fec23662eff07f14486fd5", + "wy" : "008456932e74894b7f0e3bb0dfd362502b3765dd80a3177209fb221dc9b51aaf4470b245391405bef514176b13a267a720" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004d516cb8ac8e4457b693d5192beeb6ce7d9a46bef48eecf3ea823286f101f98d130f5a26dc6fec23662eff07f14486fd58456932e74894b7f0e3bb0dfd362502b3765dd80a3177209fb221dc9b51aaf4470b245391405bef514176b13a267a720", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE1RbLisjkRXtpPVGSvuts59mka+9I7s8+\nqCMobxAfmNEw9aJtxv7CNmLv8H8USG/VhFaTLnSJS38OO7Df02JQKzdl3YCjF3IJ\n+yIdybUar0RwskU5FAW+9RQXaxOiZ6cg\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 320, + "comment" : "r and s^-1 have a large Hamming weight", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100d1aee55fdc2a716ba2fabcb57020b72e539bf05c7902f98e105bf83d4cc10c2a159a3cf7e01d749d2205f4da6bd8fcf1", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04a8380cd35026e13bf87be693cdb6e75a82d765b4019b529e8d277c4af6c9db27ebb5d3f86e88add9d5b61186f04c83a992a187507c737325d2cc624acef3cd036bfa99e0c1518be65c88bb51f900f94123acabad81d15130d3ade7ff7e4364e1", + "wx" : "00a8380cd35026e13bf87be693cdb6e75a82d765b4019b529e8d277c4af6c9db27ebb5d3f86e88add9d5b61186f04c83a9", + "wy" : "0092a187507c737325d2cc624acef3cd036bfa99e0c1518be65c88bb51f900f94123acabad81d15130d3ade7ff7e4364e1" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004a8380cd35026e13bf87be693cdb6e75a82d765b4019b529e8d277c4af6c9db27ebb5d3f86e88add9d5b61186f04c83a992a187507c737325d2cc624acef3cd036bfa99e0c1518be65c88bb51f900f94123acabad81d15130d3ade7ff7e4364e1", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEqDgM01Am4Tv4e+aTzbbnWoLXZbQBm1Ke\njSd8SvbJ2yfrtdP4boit2dW2EYbwTIOpkqGHUHxzcyXSzGJKzvPNA2v6meDBUYvm\nXIi7UfkA+UEjrKutgdFRMNOt5/9+Q2Th\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 321, + "comment" : "r and s^-1 have a large Hamming weight", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100b6b681dc484f4f020fd3f7e626d88edc6ded1b382ef3e143d60887b51394260832d4d8f2ef70458f9fa90e38c2e19e4f", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04554f2fd0b700a9f4568752b673d9c0d29dc96c10fe67e38c6d6d339bfafe05f970da8c3d2164e82031307a44bd32251171312b61b59113ff0bd3b8a9a4934df262aa8096f840e9d8bffa5d7491ded87b38c496f9b9e4f0ba1089f8d3ffc88a9f", + "wx" : "554f2fd0b700a9f4568752b673d9c0d29dc96c10fe67e38c6d6d339bfafe05f970da8c3d2164e82031307a44bd322511", + "wy" : "71312b61b59113ff0bd3b8a9a4934df262aa8096f840e9d8bffa5d7491ded87b38c496f9b9e4f0ba1089f8d3ffc88a9f" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004554f2fd0b700a9f4568752b673d9c0d29dc96c10fe67e38c6d6d339bfafe05f970da8c3d2164e82031307a44bd32251171312b61b59113ff0bd3b8a9a4934df262aa8096f840e9d8bffa5d7491ded87b38c496f9b9e4f0ba1089f8d3ffc88a9f", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEVU8v0LcAqfRWh1K2c9nA0p3JbBD+Z+OM\nbW0zm/r+Bflw2ow9IWToIDEwekS9MiURcTErYbWRE/8L07ippJNN8mKqgJb4QOnY\nv/pddJHe2Hs4xJb5ueTwuhCJ+NP/yIqf\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 322, + "comment" : "small r and s", + "msg" : "313233343030", + "sig" : "3006020102020101", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0444ee3335fa77d2fb02e4bd7074f45e598a879c0fa822ec718c21dc13b83440edc4e3c10a1858423e03044c9eff22591cd027c49933e5510557d6b4b2c6f66fe5dcb9302a3b13fdc68048c3fcac88ba152b6a9833c87fdc6280afc5d11ab7c107", + "wx" : "44ee3335fa77d2fb02e4bd7074f45e598a879c0fa822ec718c21dc13b83440edc4e3c10a1858423e03044c9eff22591c", + "wy" : "00d027c49933e5510557d6b4b2c6f66fe5dcb9302a3b13fdc68048c3fcac88ba152b6a9833c87fdc6280afc5d11ab7c107" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000444ee3335fa77d2fb02e4bd7074f45e598a879c0fa822ec718c21dc13b83440edc4e3c10a1858423e03044c9eff22591cd027c49933e5510557d6b4b2c6f66fe5dcb9302a3b13fdc68048c3fcac88ba152b6a9833c87fdc6280afc5d11ab7c107", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAERO4zNfp30vsC5L1wdPReWYqHnA+oIuxx\njCHcE7g0QO3E48EKGFhCPgMETJ7/Ilkc0CfEmTPlUQVX1rSyxvZv5dy5MCo7E/3G\ngEjD/KyIuhUrapgzyH/cYoCvxdEat8EH\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 323, + "comment" : "small r and s", + "msg" : "313233343030", + "sig" : "3006020102020102", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04e2f87f72e3c66c73037fe77607d42ad2d9c4cc159893b4b9b8b0365d3a7766dbe8678b02e2b68f58e5a4f7681061a390e38f2142818542bef6b2bc3a2c4f43c95e5259d6bd5401531378c7ca125a1f6cc609d4fadfc5c9a99358ee77ff780c8d", + "wx" : "00e2f87f72e3c66c73037fe77607d42ad2d9c4cc159893b4b9b8b0365d3a7766dbe8678b02e2b68f58e5a4f7681061a390", + "wy" : "00e38f2142818542bef6b2bc3a2c4f43c95e5259d6bd5401531378c7ca125a1f6cc609d4fadfc5c9a99358ee77ff780c8d" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004e2f87f72e3c66c73037fe77607d42ad2d9c4cc159893b4b9b8b0365d3a7766dbe8678b02e2b68f58e5a4f7681061a390e38f2142818542bef6b2bc3a2c4f43c95e5259d6bd5401531378c7ca125a1f6cc609d4fadfc5c9a99358ee77ff780c8d", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE4vh/cuPGbHMDf+d2B9Qq0tnEzBWYk7S5\nuLA2XTp3ZtvoZ4sC4raPWOWk92gQYaOQ448hQoGFQr72srw6LE9DyV5SWda9VAFT\nE3jHyhJaH2zGCdT638XJqZNY7nf/eAyN\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 324, + "comment" : "small r and s", + "msg" : "313233343030", + "sig" : "3006020102020103", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 325, + "comment" : "r is larger than n", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52975020103", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0405e67c44fc0cbc9a8eb343b4d6f596c7d00cac5da8594caf45b7209397496214c42d856a015ce589bc9ba865a4fab5ab88a01c7b5d09efaf878fcb9102fb3875a8381af234d1c593076e452225a56f51674f347126d3009b44dcbb003a64d95f", + "wx" : "05e67c44fc0cbc9a8eb343b4d6f596c7d00cac5da8594caf45b7209397496214c42d856a015ce589bc9ba865a4fab5ab", + "wy" : "0088a01c7b5d09efaf878fcb9102fb3875a8381af234d1c593076e452225a56f51674f347126d3009b44dcbb003a64d95f" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000405e67c44fc0cbc9a8eb343b4d6f596c7d00cac5da8594caf45b7209397496214c42d856a015ce589bc9ba865a4fab5ab88a01c7b5d09efaf878fcb9102fb3875a8381af234d1c593076e452225a56f51674f347126d3009b44dcbb003a64d95f", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEBeZ8RPwMvJqOs0O01vWWx9AMrF2oWUyv\nRbcgk5dJYhTELYVqAVzlibybqGWk+rWriKAce10J76+Hj8uRAvs4dag4GvI00cWT\nB25FIiWlb1FnTzRxJtMAm0TcuwA6ZNlf\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 326, + "comment" : "s is larger than n", + "msg" : "313233343030", + "sig" : "3036020102023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accd7fffa", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "040bb03fce3c01ebcf0873abd134a8682f5fb8dbffa22da674047e5c3e71e43de582ed6abb908c2e4faa5d96186278b6c1ba3b22123e68ccc56f17dd79ff15565706f71a0b6123c77af3cd88f0af024cc5259781516edcaf5fe990646e7b66999d", + "wx" : "0bb03fce3c01ebcf0873abd134a8682f5fb8dbffa22da674047e5c3e71e43de582ed6abb908c2e4faa5d96186278b6c1", + "wy" : "00ba3b22123e68ccc56f17dd79ff15565706f71a0b6123c77af3cd88f0af024cc5259781516edcaf5fe990646e7b66999d" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200040bb03fce3c01ebcf0873abd134a8682f5fb8dbffa22da674047e5c3e71e43de582ed6abb908c2e4faa5d96186278b6c1ba3b22123e68ccc56f17dd79ff15565706f71a0b6123c77af3cd88f0af024cc5259781516edcaf5fe990646e7b66999d", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEC7A/zjwB688Ic6vRNKhoL1+42/+iLaZ0\nBH5cPnHkPeWC7Wq7kIwuT6pdlhhieLbBujsiEj5ozMVvF915/xVWVwb3GgthI8d6\n882I8K8CTMUll4FRbtyvX+mQZG57Zpmd\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 327, + "comment" : "small r and s^-1", + "msg" : "313233343030", + "sig" : "3036020201000230489122448912244891224489122448912244891224489122347ce79bc437f4d071aaa92c7d6c882ae8734dc18cb0d553", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0458f246090d5e49863bc0bf2d501ff72f551c5f1c5e679eb49064fd02e221a2707326ec2d140bcc817afaad5065761566497c823fd736882cbf78fb92b1a5589b67e8067497c710a4cbb39dee2c5431bc45cfb96c9f8454385c9f2b3ef2d3d31a", + "wx" : "58f246090d5e49863bc0bf2d501ff72f551c5f1c5e679eb49064fd02e221a2707326ec2d140bcc817afaad5065761566", + "wy" : "497c823fd736882cbf78fb92b1a5589b67e8067497c710a4cbb39dee2c5431bc45cfb96c9f8454385c9f2b3ef2d3d31a" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000458f246090d5e49863bc0bf2d501ff72f551c5f1c5e679eb49064fd02e221a2707326ec2d140bcc817afaad5065761566497c823fd736882cbf78fb92b1a5589b67e8067497c710a4cbb39dee2c5431bc45cfb96c9f8454385c9f2b3ef2d3d31a", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEWPJGCQ1eSYY7wL8tUB/3L1UcXxxeZ560\nkGT9AuIhonBzJuwtFAvMgXr6rVBldhVmSXyCP9c2iCy/ePuSsaVYm2foBnSXxxCk\ny7Od7ixUMbxFz7lsn4RUOFyfKz7y09Ma\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 328, + "comment" : "smallish r and s^-1", + "msg" : "313233343030", + "sig" : "303c02072d9b4d347952cd023100ce751512561b6f57c75342848a3ff98ccf9c3f0219b6b68d00449e6c971a85d2e2ce73554b59219d54d2083b46327351", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04fc6984dd6830d1485fb2581a45a791d8dca2c727c73d3d44c89f0082c1868af5ca74b4ca4ae22802640a9ebfe8c7ae12998d63a5b5ad1b72b899f0b132e4952aaa19d41fdeea48b1ed6b8358dd1db207fd66e01453ad40f67b836adc802d5fe8", + "wx" : "00fc6984dd6830d1485fb2581a45a791d8dca2c727c73d3d44c89f0082c1868af5ca74b4ca4ae22802640a9ebfe8c7ae12", + "wy" : "00998d63a5b5ad1b72b899f0b132e4952aaa19d41fdeea48b1ed6b8358dd1db207fd66e01453ad40f67b836adc802d5fe8" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004fc6984dd6830d1485fb2581a45a791d8dca2c727c73d3d44c89f0082c1868af5ca74b4ca4ae22802640a9ebfe8c7ae12998d63a5b5ad1b72b899f0b132e4952aaa19d41fdeea48b1ed6b8358dd1db207fd66e01453ad40f67b836adc802d5fe8", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE/GmE3Wgw0UhfslgaRaeR2NyixyfHPT1E\nyJ8AgsGGivXKdLTKSuIoAmQKnr/ox64SmY1jpbWtG3K4mfCxMuSVKqoZ1B/e6kix\n7WuDWN0dsgf9ZuAUU61A9nuDatyALV/o\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 329, + "comment" : "100-bit r and small s^-1", + "msg" : "313233343030", + "sig" : "3041020d1033e67e37b32b445580bf4efb02302ad52ad52ad52ad52ad52ad52ad52ad52ad52ad52ad52ad5215c51b320e460542f9cc38968ccdf4263684004eb79a452", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "041b8def5922303d647e8eb07e3bad92f924b79b769eef168e7541de1f4e0d28ae9733eb98cf8a1fb6dd52ca02c8c75b51c7aa4bf679d49d8114122074da8f6044a427371796a5654a6106162d5f686abb73ebd896ab08c7062687f12171fbe4a3", + "wx" : "1b8def5922303d647e8eb07e3bad92f924b79b769eef168e7541de1f4e0d28ae9733eb98cf8a1fb6dd52ca02c8c75b51", + "wy" : "00c7aa4bf679d49d8114122074da8f6044a427371796a5654a6106162d5f686abb73ebd896ab08c7062687f12171fbe4a3" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200041b8def5922303d647e8eb07e3bad92f924b79b769eef168e7541de1f4e0d28ae9733eb98cf8a1fb6dd52ca02c8c75b51c7aa4bf679d49d8114122074da8f6044a427371796a5654a6106162d5f686abb73ebd896ab08c7062687f12171fbe4a3", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEG43vWSIwPWR+jrB+O62S+SS3m3ae7xaO\ndUHeH04NKK6XM+uYz4oftt1SygLIx1tRx6pL9nnUnYEUEiB02o9gRKQnNxeWpWVK\nYQYWLV9oartz69iWqwjHBiaH8SFx++Sj\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 330, + "comment" : "small r and 100 bit s^-1", + "msg" : "313233343030", + "sig" : "303602020100023077a172dfe37a2c53f0b92ab60f0a8f085f49dbfd930719d6f9e587ea68ae57cb49cd35a88cf8c6acec02f057a3807a5b", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "041734a039a88a16c2ff4aa97d2399121f56f52ef01ed5e50887f736f65b6e51d6e8786abb4e063da5d1ba812dff998403ccd698e6c296d5cd69178f8a82481a865da331627f1c4b324fbc02b36e8b5ed58a31f728e904d203a388755302195765", + "wx" : "1734a039a88a16c2ff4aa97d2399121f56f52ef01ed5e50887f736f65b6e51d6e8786abb4e063da5d1ba812dff998403", + "wy" : "00ccd698e6c296d5cd69178f8a82481a865da331627f1c4b324fbc02b36e8b5ed58a31f728e904d203a388755302195765" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200041734a039a88a16c2ff4aa97d2399121f56f52ef01ed5e50887f736f65b6e51d6e8786abb4e063da5d1ba812dff998403ccd698e6c296d5cd69178f8a82481a865da331627f1c4b324fbc02b36e8b5ed58a31f728e904d203a388755302195765", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEFzSgOaiKFsL/Sql9I5kSH1b1LvAe1eUI\nh/c29ltuUdboeGq7TgY9pdG6gS3/mYQDzNaY5sKW1c1pF4+Kgkgahl2jMWJ/HEsy\nT7wCs26LXtWKMfco6QTSA6OIdVMCGVdl\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 331, + "comment" : "100-bit r and s^-1", + "msg" : "313233343030", + "sig" : "3041020d062522bbd3ecbe7c39e93e7c24023077a172dfe37a2c53f0b92ab60f0a8f085f49dbfd930719d6f9e587ea68ae57cb49cd35a88cf8c6acec02f057a3807a5b", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0452ca47dda99172cb8321495acf988548295988ec973c1b4ea9462c53e5768a704a936410ee847b5dbf1e9d0c131da6c787a47027e6655792eb002d4228ee72f7c814c9a0cecbff267948f81c9903ac10eb35f6cb86369224ed609811cdf390f4", + "wx" : "52ca47dda99172cb8321495acf988548295988ec973c1b4ea9462c53e5768a704a936410ee847b5dbf1e9d0c131da6c7", + "wy" : "0087a47027e6655792eb002d4228ee72f7c814c9a0cecbff267948f81c9903ac10eb35f6cb86369224ed609811cdf390f4" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000452ca47dda99172cb8321495acf988548295988ec973c1b4ea9462c53e5768a704a936410ee847b5dbf1e9d0c131da6c787a47027e6655792eb002d4228ee72f7c814c9a0cecbff267948f81c9903ac10eb35f6cb86369224ed609811cdf390f4", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEUspH3amRcsuDIUlaz5iFSClZiOyXPBtO\nqUYsU+V2inBKk2QQ7oR7Xb8enQwTHabHh6RwJ+ZlV5LrAC1CKO5y98gUyaDOy/8m\neUj4HJkDrBDrNfbLhjaSJO1gmBHN85D0\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 332, + "comment" : "r and s^-1 are close to n", + "msg" : "313233343030", + "sig" : "3065023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc528f3023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04bd3d91f003e18adbea73079d4eba23b91fc17fcec14c9eb15a193fbc9ca39c8c747cd7a2c9623e05dd587ccbb8ab4c443adb0a0706aa5ea7a68042082fccefc979612a7a1a3d694b00793b03f89bff866a8b97c8e77990c29360ce795036c764", + "wx" : "00bd3d91f003e18adbea73079d4eba23b91fc17fcec14c9eb15a193fbc9ca39c8c747cd7a2c9623e05dd587ccbb8ab4c44", + "wy" : "3adb0a0706aa5ea7a68042082fccefc979612a7a1a3d694b00793b03f89bff866a8b97c8e77990c29360ce795036c764" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004bd3d91f003e18adbea73079d4eba23b91fc17fcec14c9eb15a193fbc9ca39c8c747cd7a2c9623e05dd587ccbb8ab4c443adb0a0706aa5ea7a68042082fccefc979612a7a1a3d694b00793b03f89bff866a8b97c8e77990c29360ce795036c764", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEvT2R8APhitvqcwedTrojuR/Bf87BTJ6x\nWhk/vJyjnIx0fNeiyWI+Bd1YfMu4q0xEOtsKBwaqXqemgEIIL8zvyXlhKnoaPWlL\nAHk7A/ib/4Zqi5fI53mQwpNgznlQNsdk\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 333, + "comment" : "s == 1", + "msg" : "313233343030", + "sig" : "3035023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326020101", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 334, + "comment" : "s == 0", + "msg" : "313233343030", + "sig" : "3035023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326020100", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04f896353cc3a8afdd543ec3aef062ca97bc32ed1724ea38b940b8c0ea0e23b34187afbe70daf8dbaa5b511557e5d2bddac4bd265da67ceeafca636f6f4c0472f22a9d02e2289184f73bbb700ae8fc921eff4920f290bfcb49fbb232cc13a21028", + "wx" : "00f896353cc3a8afdd543ec3aef062ca97bc32ed1724ea38b940b8c0ea0e23b34187afbe70daf8dbaa5b511557e5d2bdda", + "wy" : "00c4bd265da67ceeafca636f6f4c0472f22a9d02e2289184f73bbb700ae8fc921eff4920f290bfcb49fbb232cc13a21028" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004f896353cc3a8afdd543ec3aef062ca97bc32ed1724ea38b940b8c0ea0e23b34187afbe70daf8dbaa5b511557e5d2bddac4bd265da67ceeafca636f6f4c0472f22a9d02e2289184f73bbb700ae8fc921eff4920f290bfcb49fbb232cc13a21028", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+JY1PMOor91UPsOu8GLKl7wy7Rck6ji5\nQLjA6g4js0GHr75w2vjbqltRFVfl0r3axL0mXaZ87q/KY29vTARy8iqdAuIokYT3\nO7twCuj8kh7/SSDykL/LSfuyMswTohAo\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 335, + "comment" : "point at infinity during verify", + "msg" : "313233343030", + "sig" : "306402307fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294b9023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04370d9e2e31c712c8028092f802319d7fdf5b3319a8518d08bed3891508c7060cfe2236e18fa14fe077093ceae633e5430fd79aacf9d16ecc19b12d60fba4998dfc682702ec7c8bdd4a590035773b8c9c570ac7dcd414e03252f7a0e6f53b5863", + "wx" : "370d9e2e31c712c8028092f802319d7fdf5b3319a8518d08bed3891508c7060cfe2236e18fa14fe077093ceae633e543", + "wy" : "0fd79aacf9d16ecc19b12d60fba4998dfc682702ec7c8bdd4a590035773b8c9c570ac7dcd414e03252f7a0e6f53b5863" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004370d9e2e31c712c8028092f802319d7fdf5b3319a8518d08bed3891508c7060cfe2236e18fa14fe077093ceae633e5430fd79aacf9d16ecc19b12d60fba4998dfc682702ec7c8bdd4a590035773b8c9c570ac7dcd414e03252f7a0e6f53b5863", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAENw2eLjHHEsgCgJL4AjGdf99bMxmoUY0I\nvtOJFQjHBgz+Ijbhj6FP4HcJPOrmM+VDD9earPnRbswZsS1g+6SZjfxoJwLsfIvd\nSlkANXc7jJxXCsfc1BTgMlL3oOb1O1hj\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 336, + "comment" : "edge case for signature malleability", + "msg" : "313233343030", + "sig" : "306402307fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294b902307fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294b9", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04941e6cfa356e572dcccaeb594b06955d99dc4bf07958fc98ffa17de11c7521bf2c7aa8ff260952fcb7aac078ede67b4790a78a0296b041a10f003df1998da4cc4a1614ebcbf5d239431f33d90d3023edc1802e8db6dabcbae67cc314da2aabab", + "wx" : "00941e6cfa356e572dcccaeb594b06955d99dc4bf07958fc98ffa17de11c7521bf2c7aa8ff260952fcb7aac078ede67b47", + "wy" : "0090a78a0296b041a10f003df1998da4cc4a1614ebcbf5d239431f33d90d3023edc1802e8db6dabcbae67cc314da2aabab" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004941e6cfa356e572dcccaeb594b06955d99dc4bf07958fc98ffa17de11c7521bf2c7aa8ff260952fcb7aac078ede67b4790a78a0296b041a10f003df1998da4cc4a1614ebcbf5d239431f33d90d3023edc1802e8db6dabcbae67cc314da2aabab", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAElB5s+jVuVy3MyutZSwaVXZncS/B5WPyY\n/6F94Rx1Ib8seqj/JglS/LeqwHjt5ntHkKeKApawQaEPAD3xmY2kzEoWFOvL9dI5\nQx8z2Q0wI+3BgC6Nttq8uuZ8wxTaKqur\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 337, + "comment" : "edge case for signature malleability", + "msg" : "313233343030", + "sig" : "306402307fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294b902307fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294ba", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "043ecfd58a3ce583866e0471d16eb3c10a411ec3b8671f3a04769b1ed8464a71cf1c76d8d9b7e3670bbe712d6f554a9383d980d8bedf57470d6b45cc1ad0c6426dc70a0e4be901106a36663bfcab04fcb86008777b92445120d5e3641d97396362", + "wx" : "3ecfd58a3ce583866e0471d16eb3c10a411ec3b8671f3a04769b1ed8464a71cf1c76d8d9b7e3670bbe712d6f554a9383", + "wy" : "00d980d8bedf57470d6b45cc1ad0c6426dc70a0e4be901106a36663bfcab04fcb86008777b92445120d5e3641d97396362" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200043ecfd58a3ce583866e0471d16eb3c10a411ec3b8671f3a04769b1ed8464a71cf1c76d8d9b7e3670bbe712d6f554a9383d980d8bedf57470d6b45cc1ad0c6426dc70a0e4be901106a36663bfcab04fcb86008777b92445120d5e3641d97396362", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEPs/Vijzlg4ZuBHHRbrPBCkEew7hnHzoE\ndpse2EZKcc8cdtjZt+NnC75xLW9VSpOD2YDYvt9XRw1rRcwa0MZCbccKDkvpARBq\nNmY7/KsE/LhgCHd7kkRRINXjZB2XOWNi\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 338, + "comment" : "u1 == 1", + "msg" : "313233343030", + "sig" : "3065023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326023100f9b127f0d81ebcd17b7ba0ea131c660d340b05ce557c82160e0f793de07d38179023942871acb7002dfafdfffc8deace", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "044150ccd0fa45aa2ef6b5042ddbb1b87c5ffd1115a8fe5995641948acda82a7b190762d84352cd74d1ca01e79f68f9cb4eb11be9d494c181c156e23e77e532bdf0a20c3cc74ba8c29b1f3eb2bd99129ee0d70ff0d593f0d7a6d6887e7c55930d2", + "wx" : "4150ccd0fa45aa2ef6b5042ddbb1b87c5ffd1115a8fe5995641948acda82a7b190762d84352cd74d1ca01e79f68f9cb4", + "wy" : "00eb11be9d494c181c156e23e77e532bdf0a20c3cc74ba8c29b1f3eb2bd99129ee0d70ff0d593f0d7a6d6887e7c55930d2" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200044150ccd0fa45aa2ef6b5042ddbb1b87c5ffd1115a8fe5995641948acda82a7b190762d84352cd74d1ca01e79f68f9cb4eb11be9d494c181c156e23e77e532bdf0a20c3cc74ba8c29b1f3eb2bd99129ee0d70ff0d593f0d7a6d6887e7c55930d2", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEQVDM0PpFqi72tQQt27G4fF/9ERWo/lmV\nZBlIrNqCp7GQdi2ENSzXTRygHnn2j5y06xG+nUlMGBwVbiPnflMr3wogw8x0uowp\nsfPrK9mRKe4NcP8NWT8Nem1oh+fFWTDS\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 339, + "comment" : "u1 == n - 1", + "msg" : "313233343030", + "sig" : "3064023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec63260230064ed80f27e1432e84845f15ece399f2cbf4fa31aa837de9b953d44413b9f5c7c7f67989d703f07abef11b6ad0373ea5", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04e78fe2c11beac7090ee0af7fed469a8ccebd3cccc4ee9fccc8ef3fc0455b69aaa082dc13e1d84f34026cb6f0af9e992ff34ebba71bf3a4050bf28e4084b5c5f5d4098ec46f10a31b02fb4bf20cc9362f6f02a66e802f817507535fac3ec0b099", + "wx" : "00e78fe2c11beac7090ee0af7fed469a8ccebd3cccc4ee9fccc8ef3fc0455b69aaa082dc13e1d84f34026cb6f0af9e992f", + "wy" : "00f34ebba71bf3a4050bf28e4084b5c5f5d4098ec46f10a31b02fb4bf20cc9362f6f02a66e802f817507535fac3ec0b099" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004e78fe2c11beac7090ee0af7fed469a8ccebd3cccc4ee9fccc8ef3fc0455b69aaa082dc13e1d84f34026cb6f0af9e992ff34ebba71bf3a4050bf28e4084b5c5f5d4098ec46f10a31b02fb4bf20cc9362f6f02a66e802f817507535fac3ec0b099", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE54/iwRvqxwkO4K9/7UaajM69PMzE7p/M\nyO8/wEVbaaqggtwT4dhPNAJstvCvnpkv8067pxvzpAUL8o5AhLXF9dQJjsRvEKMb\nAvtL8gzJNi9vAqZugC+BdQdTX6w+wLCZ\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 340, + "comment" : "u2 == 1", + "msg" : "313233343030", + "sig" : "3064023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04ee24ab8a34d05af684939357f32759cc5a14f3c717529a20aea8e0c5965d8a41e68925f688471994b72021ba51b28c090a55693c92ad0cbae9edcf515e2b4c060b888d82c81e4a3b6a173b62ed04a46fa95db1a2f3949980fba2e371263c4fa9", + "wx" : "00ee24ab8a34d05af684939357f32759cc5a14f3c717529a20aea8e0c5965d8a41e68925f688471994b72021ba51b28c09", + "wy" : "0a55693c92ad0cbae9edcf515e2b4c060b888d82c81e4a3b6a173b62ed04a46fa95db1a2f3949980fba2e371263c4fa9" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004ee24ab8a34d05af684939357f32759cc5a14f3c717529a20aea8e0c5965d8a41e68925f688471994b72021ba51b28c090a55693c92ad0cbae9edcf515e2b4c060b888d82c81e4a3b6a173b62ed04a46fa95db1a2f3949980fba2e371263c4fa9", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE7iSrijTQWvaEk5NX8ydZzFoU88cXUpog\nrqjgxZZdikHmiSX2iEcZlLcgIbpRsowJClVpPJKtDLrp7c9RXitMBguIjYLIHko7\nahc7Yu0EpG+pXbGi85SZgPui43EmPE+p\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 341, + "comment" : "u2 == n - 1", + "msg" : "313233343030", + "sig" : "3065023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326023100aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa84ecde56a2cf73ea3abc092185cb1a51f34810f1ddd8c64d", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "043d2e916055c92e1b36133f5937b37c1b0102834eb77008a3ba9c3da446e9065971d68ba913091851e10cff5b4cd875c139aa7aadfc2caf7107b17ae1aea8b299d61bf15aca0cb3fd6f1ffde8192bfe58f0822bbbc1f55bddf6b4fe9c8f2b0eac", + "wx" : "3d2e916055c92e1b36133f5937b37c1b0102834eb77008a3ba9c3da446e9065971d68ba913091851e10cff5b4cd875c1", + "wy" : "39aa7aadfc2caf7107b17ae1aea8b299d61bf15aca0cb3fd6f1ffde8192bfe58f0822bbbc1f55bddf6b4fe9c8f2b0eac" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200043d2e916055c92e1b36133f5937b37c1b0102834eb77008a3ba9c3da446e9065971d68ba913091851e10cff5b4cd875c139aa7aadfc2caf7107b17ae1aea8b299d61bf15aca0cb3fd6f1ffde8192bfe58f0822bbbc1f55bddf6b4fe9c8f2b0eac", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEPS6RYFXJLhs2Ez9ZN7N8GwECg063cAij\nupw9pEbpBllx1oupEwkYUeEM/1tM2HXBOap6rfwsr3EHsXrhrqiymdYb8VrKDLP9\nbx/96Bkr/ljwgiu7wfVb3fa0/pyPKw6s\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 342, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd0230533b0d50480a3ef07e7e8af8b1097759bc03ac9a1c7ed6075a052869f57f12b285613162d08ee7aab9fe54aaa984a39a", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04ae596697427aa250156c05ac4338e48980a7f093ea1f1fe67098b43f6539c1b20ae74338f9bf270d33663c50abe8fd001ca6a52732db74ab15d2f249a3d839080f898367dfd64992cdce2708deaad523a2a236b43400424241c91a35b530fa50", + "wx" : "00ae596697427aa250156c05ac4338e48980a7f093ea1f1fe67098b43f6539c1b20ae74338f9bf270d33663c50abe8fd00", + "wy" : "1ca6a52732db74ab15d2f249a3d839080f898367dfd64992cdce2708deaad523a2a236b43400424241c91a35b530fa50" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004ae596697427aa250156c05ac4338e48980a7f093ea1f1fe67098b43f6539c1b20ae74338f9bf270d33663c50abe8fd001ca6a52732db74ab15d2f249a3d839080f898367dfd64992cdce2708deaad523a2a236b43400424241c91a35b530fa50", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAErllml0J6olAVbAWsQzjkiYCn8JPqHx/m\ncJi0P2U5wbIK50M4+b8nDTNmPFCr6P0AHKalJzLbdKsV0vJJo9g5CA+Jg2ff1kmS\nzc4nCN6q1SOioja0NABCQkHJGjW1MPpQ\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 343, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100d49a253986bbaa8ce9c3d3808313d39c3b950a478372edc009bc0566b73be7b05dad0737e16960257cc16db6ec6c620f", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0488738f9981dd4d1fabb60ad83c2dd6dfc9da302209ae3e53498a883b6e39a38bead9b02709f352d3e6b6578154eab2529388a05c6b9f3a4028abb9950a51f5264ecd7580a423fdec9472faeeb57f92e31c46bef2a781fe5edad026009f198262", + "wx" : "0088738f9981dd4d1fabb60ad83c2dd6dfc9da302209ae3e53498a883b6e39a38bead9b02709f352d3e6b6578154eab252", + "wy" : "009388a05c6b9f3a4028abb9950a51f5264ecd7580a423fdec9472faeeb57f92e31c46bef2a781fe5edad026009f198262" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000488738f9981dd4d1fabb60ad83c2dd6dfc9da302209ae3e53498a883b6e39a38bead9b02709f352d3e6b6578154eab2529388a05c6b9f3a4028abb9950a51f5264ecd7580a423fdec9472faeeb57f92e31c46bef2a781fe5edad026009f198262", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEiHOPmYHdTR+rtgrYPC3W38naMCIJrj5T\nSYqIO245o4vq2bAnCfNS0+a2V4FU6rJSk4igXGufOkAoq7mVClH1Jk7NdYCkI/3s\nlHL67rV/kuMcRr7yp4H+XtrQJgCfGYJi\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 344, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd0230285090b0d6a6820bbba394efbee5c24a2281e825d2f6c55fb7a85b8251db00f75ab07cc993ceaf664f3c116baf34b021", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04f421541311c94fdd79fc298f8ab1a3adfd08029fdad439a94d4cea11f7e799bc439609f2fb7be3f349d55e484d0a0d36b35330bbdbec1e75f2984483d96bf210d722c1830292ffc35a2f6a21a4b50519f565f024bbccc97228a2f8ad8fadc0d5", + "wx" : "00f421541311c94fdd79fc298f8ab1a3adfd08029fdad439a94d4cea11f7e799bc439609f2fb7be3f349d55e484d0a0d36", + "wy" : "00b35330bbdbec1e75f2984483d96bf210d722c1830292ffc35a2f6a21a4b50519f565f024bbccc97228a2f8ad8fadc0d5" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004f421541311c94fdd79fc298f8ab1a3adfd08029fdad439a94d4cea11f7e799bc439609f2fb7be3f349d55e484d0a0d36b35330bbdbec1e75f2984483d96bf210d722c1830292ffc35a2f6a21a4b50519f565f024bbccc97228a2f8ad8fadc0d5", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE9CFUExHJT915/CmPirGjrf0IAp/a1Dmp\nTUzqEffnmbxDlgny+3vj80nVXkhNCg02s1Mwu9vsHnXymESD2WvyENciwYMCkv/D\nWi9qIaS1BRn1ZfAku8zJciii+K2PrcDV\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 345, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100b39af4a81ee4ae79064ed80f27e1432e84845f15ece399f2a43d2505a0a8c72c5731f4fd967420b1000e3f75502ed7b7", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04399be4cfc439f94f2421cbd34c2cd90bae53eb60ddfafca52f7275d165d14fa659b636713b5d4b39e62fd48bae141d0e1b23e3b4f0c202ed7b59db78a35c12ac698c603eab144fd09ac2ed8f4495f607e4d2c87a23ce2ec33e410ca47ecc2555", + "wx" : "399be4cfc439f94f2421cbd34c2cd90bae53eb60ddfafca52f7275d165d14fa659b636713b5d4b39e62fd48bae141d0e", + "wy" : "1b23e3b4f0c202ed7b59db78a35c12ac698c603eab144fd09ac2ed8f4495f607e4d2c87a23ce2ec33e410ca47ecc2555" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004399be4cfc439f94f2421cbd34c2cd90bae53eb60ddfafca52f7275d165d14fa659b636713b5d4b39e62fd48bae141d0e1b23e3b4f0c202ed7b59db78a35c12ac698c603eab144fd09ac2ed8f4495f607e4d2c87a23ce2ec33e410ca47ecc2555", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEOZvkz8Q5+U8kIcvTTCzZC65T62Dd+vyl\nL3J10WXRT6ZZtjZxO11LOeYv1IuuFB0OGyPjtPDCAu17Wdt4o1wSrGmMYD6rFE/Q\nmsLtj0SV9gfk0sh6I84uwz5BDKR+zCVV\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 346, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100af4a81ee4ae79064ed80f27e1432e84845f15ece399f2cbf28df829ccd30f5ef62ec23957b837d73fe4e156edccd4465", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "041578bbff72137c4bca33d7385a892be94cb059f9091ddfe890345f712a9fba5fc77084cec11084ed048491604a07f66c76bbaa872f0710d82a08d9dddd833c7be7c7e8e265f49145157eb4e8e8280076a37ee5873271db510034da19da24415b", + "wx" : "1578bbff72137c4bca33d7385a892be94cb059f9091ddfe890345f712a9fba5fc77084cec11084ed048491604a07f66c", + "wy" : "76bbaa872f0710d82a08d9dddd833c7be7c7e8e265f49145157eb4e8e8280076a37ee5873271db510034da19da24415b" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200041578bbff72137c4bca33d7385a892be94cb059f9091ddfe890345f712a9fba5fc77084cec11084ed048491604a07f66c76bbaa872f0710d82a08d9dddd833c7be7c7e8e265f49145157eb4e8e8280076a37ee5873271db510034da19da24415b", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEFXi7/3ITfEvKM9c4Wokr6UywWfkJHd/o\nkDRfcSqful/HcITOwRCE7QSEkWBKB/Zsdruqhy8HENgqCNnd3YM8e+fH6OJl9JFF\nFX606OgoAHajfuWHMnHbUQA02hnaJEFb\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 347, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02305e9503dc95cf20c9db01e4fc2865d0908be2bd9c733e597e8a5bb7b7a62abdff6dbe3978ae56536d0fb01172ecd55f57", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0433ba451c85e729058f83041077a4695eb47df93e718b09a4618c753ac803cd75c1a91290c2ff5a635389d07149571dab1fc7d8a71776851ff244ff632fe6f92e1652e5284893c4244fe775d8efc589d823dd03f3919027f004537bd8ee09f3a3", + "wx" : "33ba451c85e729058f83041077a4695eb47df93e718b09a4618c753ac803cd75c1a91290c2ff5a635389d07149571dab", + "wy" : "1fc7d8a71776851ff244ff632fe6f92e1652e5284893c4244fe775d8efc589d823dd03f3919027f004537bd8ee09f3a3" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000433ba451c85e729058f83041077a4695eb47df93e718b09a4618c753ac803cd75c1a91290c2ff5a635389d07149571dab1fc7d8a71776851ff244ff632fe6f92e1652e5284893c4244fe775d8efc589d823dd03f3919027f004537bd8ee09f3a3", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEM7pFHIXnKQWPgwQQd6RpXrR9+T5xiwmk\nYYx1OsgDzXXBqRKQwv9aY1OJ0HFJVx2rH8fYpxd2hR/yRP9jL+b5LhZS5ShIk8Qk\nT+d12O/Fidgj3QPzkZAn8ARTe9juCfOj\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 348, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02301ee4ae79064ed80f27e1432e84845f15ece399f2cbf4fa31a3ae8edab84dc3330a39f70938e3912bd59753de5aed3088", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04040771e3390216fed2c6208bdf5bfea83ab1915b166e626569f12efd410a39b7e7c76f70f0012843a26debf4ccc33ddae5bc5f7e62d054eac31cd022afdb71b7c638f24c30cbad0ef35ed2fc9917f356e9c3f04391b21d1035274b81537fcbf3", + "wx" : "040771e3390216fed2c6208bdf5bfea83ab1915b166e626569f12efd410a39b7e7c76f70f0012843a26debf4ccc33dda", + "wy" : "00e5bc5f7e62d054eac31cd022afdb71b7c638f24c30cbad0ef35ed2fc9917f356e9c3f04391b21d1035274b81537fcbf3" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004040771e3390216fed2c6208bdf5bfea83ab1915b166e626569f12efd410a39b7e7c76f70f0012843a26debf4ccc33ddae5bc5f7e62d054eac31cd022afdb71b7c638f24c30cbad0ef35ed2fc9917f356e9c3f04391b21d1035274b81537fcbf3", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEBAdx4zkCFv7SxiCL31v+qDqxkVsWbmJl\nafEu/UEKObfnx29w8AEoQ6Jt6/TMwz3a5bxffmLQVOrDHNAir9txt8Y48kwwy60O\n817S/JkX81bpw/BDkbIdEDUnS4FTf8vz\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 349, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100bb51cd3ba8eb201f53ddb4e34e08c0ff7dff9378106784d798d5a3440bd6dc34be3a0eaef8776619a0c97fefb15720b3", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0498d3f16e1c510a933e648e78d01588319f002e9475df8942a2a89db0666bb7c88b32bb248140e44ac4ab28111b2b792399a926f4a66fbe28ff65c09f8306893aec094b89d0fe529e3577c5ecf30a7944caaf530f4575eb113fcf4c200d2dd4bd", + "wx" : "0098d3f16e1c510a933e648e78d01588319f002e9475df8942a2a89db0666bb7c88b32bb248140e44ac4ab28111b2b7923", + "wy" : "0099a926f4a66fbe28ff65c09f8306893aec094b89d0fe529e3577c5ecf30a7944caaf530f4575eb113fcf4c200d2dd4bd" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000498d3f16e1c510a933e648e78d01588319f002e9475df8942a2a89db0666bb7c88b32bb248140e44ac4ab28111b2b792399a926f4a66fbe28ff65c09f8306893aec094b89d0fe529e3577c5ecf30a7944caaf530f4575eb113fcf4c200d2dd4bd", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEmNPxbhxRCpM+ZI540BWIMZ8ALpR134lC\noqidsGZrt8iLMrskgUDkSsSrKBEbK3kjmakm9KZvvij/ZcCfgwaJOuwJS4nQ/lKe\nNXfF7PMKeUTKr1MPRXXrET/PTCANLdS9\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 350, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100e707e267ea635384a6da09823149f5cb7acbb29e910d2630c5fb5afbc42aa8436349b214a3b8fb9481ec999e005091f8", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04d1fd602feef80be9e55a19d1a9799c72a899110c6ac21fb3c21357069809d591a8775b64d1867a8cfff124f6a5e3a4f5f9548064f01b9af8868705493a37a037193b48f53b7c7973023f53e6ceff6830ca2f7a14ef51536d453af43b3058d8a9", + "wx" : "00d1fd602feef80be9e55a19d1a9799c72a899110c6ac21fb3c21357069809d591a8775b64d1867a8cfff124f6a5e3a4f5", + "wy" : "00f9548064f01b9af8868705493a37a037193b48f53b7c7973023f53e6ceff6830ca2f7a14ef51536d453af43b3058d8a9" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004d1fd602feef80be9e55a19d1a9799c72a899110c6ac21fb3c21357069809d591a8775b64d1867a8cfff124f6a5e3a4f5f9548064f01b9af8868705493a37a037193b48f53b7c7973023f53e6ceff6830ca2f7a14ef51536d453af43b3058d8a9", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE0f1gL+74C+nlWhnRqXmccqiZEQxqwh+z\nwhNXBpgJ1ZGod1tk0YZ6jP/xJPal46T1+VSAZPAbmviGhwVJOjegNxk7SPU7fHlz\nAj9T5s7/aDDKL3oU71FTbUU69DswWNip\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 351, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100acc4f2afb7f5c10f818175074ef688a643fc5365e38129f86d5e2517feb81b2cd2b8dc4f7821bfd032edc4c0234085d9", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0482f37604f66664c2883dba6d98397c281045cbf59f1d16dddb1381126a246553a8b4d2aaea48ad9185a1645f65567d318a4d7b19f1d2e4434c9a8ecad396304abc82221bbab0679935071c72fd975e7b021c04b1d16ea36fc2d051ef5a8e117c", + "wx" : "0082f37604f66664c2883dba6d98397c281045cbf59f1d16dddb1381126a246553a8b4d2aaea48ad9185a1645f65567d31", + "wy" : "008a4d7b19f1d2e4434c9a8ecad396304abc82221bbab0679935071c72fd975e7b021c04b1d16ea36fc2d051ef5a8e117c" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000482f37604f66664c2883dba6d98397c281045cbf59f1d16dddb1381126a246553a8b4d2aaea48ad9185a1645f65567d318a4d7b19f1d2e4434c9a8ecad396304abc82221bbab0679935071c72fd975e7b021c04b1d16ea36fc2d051ef5a8e117c", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEgvN2BPZmZMKIPbptmDl8KBBFy/WfHRbd\n2xOBEmokZVOotNKq6kitkYWhZF9lVn0xik17GfHS5ENMmo7K05YwSryCIhu6sGeZ\nNQcccv2XXnsCHASx0W6jb8LQUe9ajhF8\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 352, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02310083276c0793f0a19742422f8af671ccf965fa7d18d541bef4c05b90e303f891d39008439e0fda4bfad5ee9a6ace7e340c", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04f052dfc27bf8a6d36f3739f239b981f5b53fe08d999ec683b01e43e7596156206ba08b8b9f59229e2fbdce05f1e40f9990f0fdfb7029f9b3e8c6144dad0339208b7cdcb3820a554259db9d27afdd18f4a750296c59bad6b62df076f90d53be0d", + "wx" : "00f052dfc27bf8a6d36f3739f239b981f5b53fe08d999ec683b01e43e7596156206ba08b8b9f59229e2fbdce05f1e40f99", + "wy" : "0090f0fdfb7029f9b3e8c6144dad0339208b7cdcb3820a554259db9d27afdd18f4a750296c59bad6b62df076f90d53be0d" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004f052dfc27bf8a6d36f3739f239b981f5b53fe08d999ec683b01e43e7596156206ba08b8b9f59229e2fbdce05f1e40f9990f0fdfb7029f9b3e8c6144dad0339208b7cdcb3820a554259db9d27afdd18f4a750296c59bad6b62df076f90d53be0d", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE8FLfwnv4ptNvNznyObmB9bU/4I2ZnsaD\nsB5D51lhViBroIuLn1kini+9zgXx5A+ZkPD9+3Ap+bPoxhRNrQM5IIt83LOCClVC\nWdudJ6/dGPSnUClsWbrWti3wdvkNU74N\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 353, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100942848586b534105ddd1ca77df72e1251140f412e97b62afbf85d4822309176b5965453dee3fab709e14156b3dfcecca", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04f877bd6e2a9273e322a3298ea3add13d1104b32172283669ca6688f0cb591524a7f15dd41496681eda98939aae729fede85ca37c81ef19e3dc9ab16908a3720d86875a51a6a6d932e37492a6ec7a344eabc482377f14891fbd1da7faeffa1178", + "wx" : "00f877bd6e2a9273e322a3298ea3add13d1104b32172283669ca6688f0cb591524a7f15dd41496681eda98939aae729fed", + "wy" : "00e85ca37c81ef19e3dc9ab16908a3720d86875a51a6a6d932e37492a6ec7a344eabc482377f14891fbd1da7faeffa1178" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004f877bd6e2a9273e322a3298ea3add13d1104b32172283669ca6688f0cb591524a7f15dd41496681eda98939aae729fede85ca37c81ef19e3dc9ab16908a3720d86875a51a6a6d932e37492a6ec7a344eabc482377f14891fbd1da7faeffa1178", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+He9biqSc+MioymOo63RPREEsyFyKDZp\nymaI8MtZFSSn8V3UFJZoHtqYk5qucp/t6FyjfIHvGePcmrFpCKNyDYaHWlGmptky\n43SSpux6NE6rxII3fxSJH70dp/rv+hF4\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 354, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02307fffffffffffffffffffffffffffffffffffffffffffffffed2119d5fc12649fc808af3b6d9037d3a44eb32399970dd0", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0414249bbcfeeceab06c75654d361c0df8d56b320ea3bc1d4627ec0a2f4b8fa3577445694664f569a91f480741381e494a28479f2186d715a56788f67073056aa0cb0b6a7f7893e77b9a6976ef6663d80226896d7f43bb502e1b4d49558a27dd8b", + "wx" : "14249bbcfeeceab06c75654d361c0df8d56b320ea3bc1d4627ec0a2f4b8fa3577445694664f569a91f480741381e494a", + "wy" : "28479f2186d715a56788f67073056aa0cb0b6a7f7893e77b9a6976ef6663d80226896d7f43bb502e1b4d49558a27dd8b" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000414249bbcfeeceab06c75654d361c0df8d56b320ea3bc1d4627ec0a2f4b8fa3577445694664f569a91f480741381e494a28479f2186d715a56788f67073056aa0cb0b6a7f7893e77b9a6976ef6663d80226896d7f43bb502e1b4d49558a27dd8b", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEFCSbvP7s6rBsdWVNNhwN+NVrMg6jvB1G\nJ+wKL0uPo1d0RWlGZPVpqR9IB0E4HklKKEefIYbXFaVniPZwcwVqoMsLan94k+d7\nmml272Zj2AImiW1/Q7tQLhtNSVWKJ92L\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 355, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023079b95c013b0472de04d8faeec3b779c39fe729ea84fb554cd091c7178c2f054eabbc62c3e1cfbac2c2e69d7aa45d9072", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0450a438c98ee94025ce13e27d36b8280d4843585836eb47011a070cd77729245684a0db31fde980620349c796832b2c6cbdb72dba9f3f9cc878559f50b6bd1290f10a6bccbc1eeef7708b1b72059022987979e35221c51259f337c7288a2f86bc", + "wx" : "50a438c98ee94025ce13e27d36b8280d4843585836eb47011a070cd77729245684a0db31fde980620349c796832b2c6c", + "wy" : "00bdb72dba9f3f9cc878559f50b6bd1290f10a6bccbc1eeef7708b1b72059022987979e35221c51259f337c7288a2f86bc" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000450a438c98ee94025ce13e27d36b8280d4843585836eb47011a070cd77729245684a0db31fde980620349c796832b2c6cbdb72dba9f3f9cc878559f50b6bd1290f10a6bccbc1eeef7708b1b72059022987979e35221c51259f337c7288a2f86bc", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEUKQ4yY7pQCXOE+J9NrgoDUhDWFg260cB\nGgcM13cpJFaEoNsx/emAYgNJx5aDKyxsvbctup8/nMh4VZ9Qtr0SkPEKa8y8Hu73\ncIsbcgWQIph5eeNSIcUSWfM3xyiKL4a8\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 356, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100bfd40d0caa4d9d42381f3d72a25683f52b03a1ed96fb72d03f08dcb9a8bc8f23c1a459deab03bcd39396c0d1e9053c81", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "044d3fc5dcfaf741113cda3ce2f8dff4c912143e4d36314c361d7ed5656b68448bcca114ba9e8124281234660b7726ddcd680ddfef7ea07bfbcede10803d38d7211631ca11466078819eb66e11921ab7ffa3c4560c732e77595fd408e917dd9afc", + "wx" : "4d3fc5dcfaf741113cda3ce2f8dff4c912143e4d36314c361d7ed5656b68448bcca114ba9e8124281234660b7726ddcd", + "wy" : "680ddfef7ea07bfbcede10803d38d7211631ca11466078819eb66e11921ab7ffa3c4560c732e77595fd408e917dd9afc" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200044d3fc5dcfaf741113cda3ce2f8dff4c912143e4d36314c361d7ed5656b68448bcca114ba9e8124281234660b7726ddcd680ddfef7ea07bfbcede10803d38d7211631ca11466078819eb66e11921ab7ffa3c4560c732e77595fd408e917dd9afc", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETT/F3Pr3QRE82jzi+N/0yRIUPk02MUw2\nHX7VZWtoRIvMoRS6noEkKBI0Zgt3Jt3NaA3f736ge/vO3hCAPTjXIRYxyhFGYHiB\nnrZuEZIat/+jxFYMcy53WV/UCOkX3Zr8\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 357, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02304c7d219db9af94ce7fffffffffffffffffffffffffffffffef15cf1058c8d8ba1e634c4122db95ec1facd4bb13ebf09a", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0463d65cdfeb1f1a42000f43bd1ddd130537a7b6f635e8d2bd81a97da168221183da433ca78429fd2b33c5f94895a9c13aa9d1d5ea328725653a5a9d00f85a5516236f3b1428a8629287d3b0487a2e82dd57f93bb2aa3d9783dc74131e13756034", + "wx" : "63d65cdfeb1f1a42000f43bd1ddd130537a7b6f635e8d2bd81a97da168221183da433ca78429fd2b33c5f94895a9c13a", + "wy" : "00a9d1d5ea328725653a5a9d00f85a5516236f3b1428a8629287d3b0487a2e82dd57f93bb2aa3d9783dc74131e13756034" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000463d65cdfeb1f1a42000f43bd1ddd130537a7b6f635e8d2bd81a97da168221183da433ca78429fd2b33c5f94895a9c13aa9d1d5ea328725653a5a9d00f85a5516236f3b1428a8629287d3b0487a2e82dd57f93bb2aa3d9783dc74131e13756034", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEY9Zc3+sfGkIAD0O9Hd0TBTentvY16NK9\ngal9oWgiEYPaQzynhCn9KzPF+UiVqcE6qdHV6jKHJWU6Wp0A+FpVFiNvOxQoqGKS\nh9OwSHougt1X+Tuyqj2Xg9x0Ex4TdWA0\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 358, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100d219db9af94ce7ffffffffffffffffffffffffffffffffffd189bdb6d9ef7be8504ca374756ea5b8f15e44067d209b9b", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04d22c9c348b9745711f57debac3a07df90a527c06bd02a8454f41437d54224e071698f03fdc64b1d652414edc3f2239c49ae9812a4b92f099d6659a659691768d57e530ed3c91d5455781605850997a58221f22a2451c3932470606c23f3ab1b8", + "wx" : "00d22c9c348b9745711f57debac3a07df90a527c06bd02a8454f41437d54224e071698f03fdc64b1d652414edc3f2239c4", + "wy" : "009ae9812a4b92f099d6659a659691768d57e530ed3c91d5455781605850997a58221f22a2451c3932470606c23f3ab1b8" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004d22c9c348b9745711f57debac3a07df90a527c06bd02a8454f41437d54224e071698f03fdc64b1d652414edc3f2239c49ae9812a4b92f099d6659a659691768d57e530ed3c91d5455781605850997a58221f22a2451c3932470606c23f3ab1b8", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE0iycNIuXRXEfV966w6B9+QpSfAa9AqhF\nT0FDfVQiTgcWmPA/3GSx1lJBTtw/IjnEmumBKkuS8JnWZZpllpF2jVflMO08kdVF\nV4FgWFCZelgiHyKiRRw5MkcGBsI/OrG4\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 359, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100a433b735f299cfffffffffffffffffffffffffffffffffffdbb02debbfa7c9f1487f3936a22ca3f6f5d06ea22d7c0dc3", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0431f05c0c29e9da49aa2fbbedee770c68d10f85e7f77e72ac3cfa9c8623a2bb42eeb2f24ac8f2aef7ab0c4b47823140035bb32fc1ec04bbff5eab96e070c938ba1b53fe63970f649ae02e2a4ada420a249b6f7c525e2c4b9b0d5562ae26f2278c", + "wx" : "31f05c0c29e9da49aa2fbbedee770c68d10f85e7f77e72ac3cfa9c8623a2bb42eeb2f24ac8f2aef7ab0c4b4782314003", + "wy" : "5bb32fc1ec04bbff5eab96e070c938ba1b53fe63970f649ae02e2a4ada420a249b6f7c525e2c4b9b0d5562ae26f2278c" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000431f05c0c29e9da49aa2fbbedee770c68d10f85e7f77e72ac3cfa9c8623a2bb42eeb2f24ac8f2aef7ab0c4b47823140035bb32fc1ec04bbff5eab96e070c938ba1b53fe63970f649ae02e2a4ada420a249b6f7c525e2c4b9b0d5562ae26f2278c", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEMfBcDCnp2kmqL7vt7ncMaNEPhef3fnKs\nPPqchiOiu0LusvJKyPKu96sMS0eCMUADW7MvwewEu/9eq5bgcMk4uhtT/mOXD2Sa\n4C4qStpCCiSbb3xSXixLmw1VYq4m8ieM\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 360, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100b9af94ce7fffffffffffffffffffffffffffffffffffffffd6efeefc876c9f23217b443c80637ef939e911219f96c179", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04bc26eec95e26c980bc0334264cbcfc26b897c3571c96ce9ab2a67b49bb0f26a6272fdc27806d7a4c572ae0f78149f1f3c8af5f41b99d2066018165513fb3b55e4255dcd0659647ed55e1e2602cae4efbd6eae1dfe2ff63e2c748d4acc7430139", + "wx" : "00bc26eec95e26c980bc0334264cbcfc26b897c3571c96ce9ab2a67b49bb0f26a6272fdc27806d7a4c572ae0f78149f1f3", + "wy" : "00c8af5f41b99d2066018165513fb3b55e4255dcd0659647ed55e1e2602cae4efbd6eae1dfe2ff63e2c748d4acc7430139" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004bc26eec95e26c980bc0334264cbcfc26b897c3571c96ce9ab2a67b49bb0f26a6272fdc27806d7a4c572ae0f78149f1f3c8af5f41b99d2066018165513fb3b55e4255dcd0659647ed55e1e2602cae4efbd6eae1dfe2ff63e2c748d4acc7430139", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEvCbuyV4myYC8AzQmTLz8JriXw1ccls6a\nsqZ7SbsPJqYnL9wngG16TFcq4PeBSfHzyK9fQbmdIGYBgWVRP7O1XkJV3NBllkft\nVeHiYCyuTvvW6uHf4v9j4sdI1KzHQwE5\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 361, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100a276276276276276276276276276276276276276276276273d7228d4f84b769be0fd57b97e4c1ebcae9a5f635e80e9df", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "046fa0964dd054250af176891c0c822b013b70f059c347172cafc6b36cd16cf3b0f9d19f2598bd0d580ac16c46acb167d4375bef701c002dcc040fd54824b14cc2df0154eb20e74464e1fe7b833426dd7d636bf2d79603fdde5ddaab23ab0cf426", + "wx" : "6fa0964dd054250af176891c0c822b013b70f059c347172cafc6b36cd16cf3b0f9d19f2598bd0d580ac16c46acb167d4", + "wy" : "375bef701c002dcc040fd54824b14cc2df0154eb20e74464e1fe7b833426dd7d636bf2d79603fdde5ddaab23ab0cf426" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200046fa0964dd054250af176891c0c822b013b70f059c347172cafc6b36cd16cf3b0f9d19f2598bd0d580ac16c46acb167d4375bef701c002dcc040fd54824b14cc2df0154eb20e74464e1fe7b833426dd7d636bf2d79603fdde5ddaab23ab0cf426", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEb6CWTdBUJQrxdokcDIIrATtw8FnDRxcs\nr8azbNFs87D50Z8lmL0NWArBbEassWfUN1vvcBwALcwED9VIJLFMwt8BVOsg50Rk\n4f57gzQm3X1ja/LXlgP93l3aqyOrDPQm\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 362, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023073333333333333333333333333333333333333333333333316e4d9f42d4eca22df403a0c578b86f0a9a93fe89995c7ed", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04baa4e712ee0786a5ab0e5a5dafdcdcf87b38830ab2ec86faedda9fdf65332f6a9688269412f050356530d4664a7fb8cdecc46a901b016e6bb8a336ad9aa6f19abf9ada69705d1c905beafb95a44f52af43de4bf80c050cf996b7796dfcee8e1b", + "wx" : "00baa4e712ee0786a5ab0e5a5dafdcdcf87b38830ab2ec86faedda9fdf65332f6a9688269412f050356530d4664a7fb8cd", + "wy" : "00ecc46a901b016e6bb8a336ad9aa6f19abf9ada69705d1c905beafb95a44f52af43de4bf80c050cf996b7796dfcee8e1b" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004baa4e712ee0786a5ab0e5a5dafdcdcf87b38830ab2ec86faedda9fdf65332f6a9688269412f050356530d4664a7fb8cdecc46a901b016e6bb8a336ad9aa6f19abf9ada69705d1c905beafb95a44f52af43de4bf80c050cf996b7796dfcee8e1b", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEuqTnEu4HhqWrDlpdr9zc+Hs4gwqy7Ib6\n7dqf32UzL2qWiCaUEvBQNWUw1GZKf7jN7MRqkBsBbmu4ozatmqbxmr+a2mlwXRyQ\nW+r7laRPUq9D3kv4DAUM+Za3eW387o4b\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 363, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02307fffffffffffffffffffffffffffffffffffffffffffffffda4233abf824c93f90115e76db206fa7489d6647332e1ba3", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0481e78a52ae0695583f7a601ab9b6fbfaf434f2befa1f8c833d59deb627a927c2f42d48eb617fe042f584e105c23c2317cf22d565f5f3b425ef7937df629b6864dac71264b288c1a987210f523071319ce3f64411910ac23765c4266e615112bc", + "wx" : "0081e78a52ae0695583f7a601ab9b6fbfaf434f2befa1f8c833d59deb627a927c2f42d48eb617fe042f584e105c23c2317", + "wy" : "00cf22d565f5f3b425ef7937df629b6864dac71264b288c1a987210f523071319ce3f64411910ac23765c4266e615112bc" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000481e78a52ae0695583f7a601ab9b6fbfaf434f2befa1f8c833d59deb627a927c2f42d48eb617fe042f584e105c23c2317cf22d565f5f3b425ef7937df629b6864dac71264b288c1a987210f523071319ce3f64411910ac23765c4266e615112bc", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEgeeKUq4GlVg/emAaubb7+vQ08r76H4yD\nPVnetiepJ8L0LUjrYX/gQvWE4QXCPCMXzyLVZfXztCXveTffYptoZNrHEmSyiMGp\nhyEPUjBxMZzj9kQRkQrCN2XEJm5hURK8\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 364, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02303fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294bb", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0441fa8765b19d3108031e28c9a781a385c9c10b2bfd42e6437e5c4bd711cf2a031750847d17a82f9376a30ae182a6d6e71c20af96324147d4155a4d0c867ca8e36eba204fbed2087e0fcbdc8baabe07bb3123f9f7259e771cd9f1ad17d1a23787", + "wx" : "41fa8765b19d3108031e28c9a781a385c9c10b2bfd42e6437e5c4bd711cf2a031750847d17a82f9376a30ae182a6d6e7", + "wy" : "1c20af96324147d4155a4d0c867ca8e36eba204fbed2087e0fcbdc8baabe07bb3123f9f7259e771cd9f1ad17d1a23787" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000441fa8765b19d3108031e28c9a781a385c9c10b2bfd42e6437e5c4bd711cf2a031750847d17a82f9376a30ae182a6d6e71c20af96324147d4155a4d0c867ca8e36eba204fbed2087e0fcbdc8baabe07bb3123f9f7259e771cd9f1ad17d1a23787", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEQfqHZbGdMQgDHijJp4GjhcnBCyv9QuZD\nflxL1xHPKgMXUIR9F6gvk3ajCuGCptbnHCCvljJBR9QVWk0Mhnyo4266IE++0gh+\nD8vci6q+B7sxI/n3JZ53HNnxrRfRojeH\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 365, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100dfea06865526cea11c0f9eb9512b41fa9581d0f6cb7db9680336151dce79de818cdf33c879da322740416d1e5ae532fa", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04e585a067d6dff37ae7f17f81583119b61291597345f107acffe237a08f4886d4fdf94fe63182e6143c99be25a7b7d86b572c1e06dd2c7b94b873f0578fcb2b99d60e246e51245d0804edd44b32f0f000c8f8f88f1d4a65fea51dbbb4ab1e2823", + "wx" : "00e585a067d6dff37ae7f17f81583119b61291597345f107acffe237a08f4886d4fdf94fe63182e6143c99be25a7b7d86b", + "wy" : "572c1e06dd2c7b94b873f0578fcb2b99d60e246e51245d0804edd44b32f0f000c8f8f88f1d4a65fea51dbbb4ab1e2823" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004e585a067d6dff37ae7f17f81583119b61291597345f107acffe237a08f4886d4fdf94fe63182e6143c99be25a7b7d86b572c1e06dd2c7b94b873f0578fcb2b99d60e246e51245d0804edd44b32f0f000c8f8f88f1d4a65fea51dbbb4ab1e2823", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE5YWgZ9bf83rn8X+BWDEZthKRWXNF8Qes\n/+I3oI9IhtT9+U/mMYLmFDyZviWnt9hrVyweBt0se5S4c/BXj8srmdYOJG5RJF0I\nBO3USzLw8ADI+PiPHUpl/qUdu7SrHigj\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 366, + "comment" : "point duplication during verification", + "msg" : "313233343030", + "sig" : "3065023100b37699e0d518a4d370dbdaaaea3788850fa03f8186d1f78fdfbae6540aa670b31c8ada0fff3e737bd69520560fe0ce60023064adb4d51a93f96bed4665de2d4e1169cc95819ec6e9333edfd5c07ca134ceef7c95957b719ae349fc439eaa49fbbe34", + "result" : "valid", + "flags" : [ + "PointDuplication" + ] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04e585a067d6dff37ae7f17f81583119b61291597345f107acffe237a08f4886d4fdf94fe63182e6143c99be25a7b7d86ba8d3e1f922d3846b478c0fa87034d46629f1db91aedba2f7fb122bb4cd0f0ffe3707076fe2b59a015ae2444c54e1d7dc", + "wx" : "00e585a067d6dff37ae7f17f81583119b61291597345f107acffe237a08f4886d4fdf94fe63182e6143c99be25a7b7d86b", + "wy" : "00a8d3e1f922d3846b478c0fa87034d46629f1db91aedba2f7fb122bb4cd0f0ffe3707076fe2b59a015ae2444c54e1d7dc" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004e585a067d6dff37ae7f17f81583119b61291597345f107acffe237a08f4886d4fdf94fe63182e6143c99be25a7b7d86ba8d3e1f922d3846b478c0fa87034d46629f1db91aedba2f7fb122bb4cd0f0ffe3707076fe2b59a015ae2444c54e1d7dc", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE5YWgZ9bf83rn8X+BWDEZthKRWXNF8Qes\n/+I3oI9IhtT9+U/mMYLmFDyZviWnt9hrqNPh+SLThGtHjA+ocDTUZinx25Gu26L3\n+xIrtM0PD/43Bwdv4rWaAVriRExU4dfc\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 367, + "comment" : "duplication bug", + "msg" : "313233343030", + "sig" : "3065023100b37699e0d518a4d370dbdaaaea3788850fa03f8186d1f78fdfbae6540aa670b31c8ada0fff3e737bd69520560fe0ce60023064adb4d51a93f96bed4665de2d4e1169cc95819ec6e9333edfd5c07ca134ceef7c95957b719ae349fc439eaa49fbbe34", + "result" : "invalid", + "flags" : [ + "PointDuplication" + ] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04b4d78cccbced8065c0ebdc330b4670ec99309273e442b9be341196c1043e4441fc57b914085595bfc755c64fc409f0ba01fee31cbbbaed5c1323f09c87df9b0712c12e99733fa23ef91b4e6ca666b09dd7540ebf1068a15155bc069e3d595c8c", + "wx" : "00b4d78cccbced8065c0ebdc330b4670ec99309273e442b9be341196c1043e4441fc57b914085595bfc755c64fc409f0ba", + "wy" : "01fee31cbbbaed5c1323f09c87df9b0712c12e99733fa23ef91b4e6ca666b09dd7540ebf1068a15155bc069e3d595c8c" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004b4d78cccbced8065c0ebdc330b4670ec99309273e442b9be341196c1043e4441fc57b914085595bfc755c64fc409f0ba01fee31cbbbaed5c1323f09c87df9b0712c12e99733fa23ef91b4e6ca666b09dd7540ebf1068a15155bc069e3d595c8c", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEtNeMzLztgGXA69wzC0Zw7JkwknPkQrm+\nNBGWwQQ+REH8V7kUCFWVv8dVxk/ECfC6Af7jHLu67VwTI/Cch9+bBxLBLplzP6I+\n+RtObKZmsJ3XVA6/EGihUVW8Bp49WVyM\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 368, + "comment" : "point with x-coordinate 0", + "msg" : "313233343030", + "sig" : "3035020101023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "046e3c68be53aade81ef89e096d841e2845a23331e7ec8a6a839d58d07fa016c0973ed75de4f99177bfdc74db566e9d15a4972ea08e577ce1f61c13a6ca1bad1deef2982ee01a2826f002b769f2c46098d3baff068a405d09ca3840d2fafe4e46e", + "wx" : "6e3c68be53aade81ef89e096d841e2845a23331e7ec8a6a839d58d07fa016c0973ed75de4f99177bfdc74db566e9d15a", + "wy" : "4972ea08e577ce1f61c13a6ca1bad1deef2982ee01a2826f002b769f2c46098d3baff068a405d09ca3840d2fafe4e46e" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200046e3c68be53aade81ef89e096d841e2845a23331e7ec8a6a839d58d07fa016c0973ed75de4f99177bfdc74db566e9d15a4972ea08e577ce1f61c13a6ca1bad1deef2982ee01a2826f002b769f2c46098d3baff068a405d09ca3840d2fafe4e46e", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEbjxovlOq3oHvieCW2EHihFojMx5+yKao\nOdWNB/oBbAlz7XXeT5kXe/3HTbVm6dFaSXLqCOV3zh9hwTpsobrR3u8pgu4BooJv\nACt2nyxGCY07r/BopAXQnKOEDS+v5ORu\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 369, + "comment" : "point with x-coordinate 0", + "msg" : "313233343030", + "sig" : "3065023101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023033333333333333333333333333333333333333333333333327e0a919fda4a2c644d202bd41bcee4bc8fc05155c276eb0", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04b101cdb3eba20e112adbb4bbd2cb479a69e590a44ea902631832abfab8af2c3041b3df7f1665b2c6eb533f546217100a1a61aa9951578ad4f00ae17339a8a6f1359bbd0ac355678ed4df21338f08763c1d3702ec132b634c7bcc0118efb1d0dd", + "wx" : "00b101cdb3eba20e112adbb4bbd2cb479a69e590a44ea902631832abfab8af2c3041b3df7f1665b2c6eb533f546217100a", + "wy" : "1a61aa9951578ad4f00ae17339a8a6f1359bbd0ac355678ed4df21338f08763c1d3702ec132b634c7bcc0118efb1d0dd" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004b101cdb3eba20e112adbb4bbd2cb479a69e590a44ea902631832abfab8af2c3041b3df7f1665b2c6eb533f546217100a1a61aa9951578ad4f00ae17339a8a6f1359bbd0ac355678ed4df21338f08763c1d3702ec132b634c7bcc0118efb1d0dd", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEsQHNs+uiDhEq27S70stHmmnlkKROqQJj\nGDKr+rivLDBBs99/FmWyxutTP1RiFxAKGmGqmVFXitTwCuFzOaim8TWbvQrDVWeO\n1N8hM48IdjwdNwLsEytjTHvMARjvsdDd\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 370, + "comment" : "comparison with point at infinity ", + "msg" : "313233343030", + "sig" : "3064023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326023033333333333333333333333333333333333333333333333327e0a919fda4a2c644d202bd41bcee4bc8fc05155c276eb0", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "046761044a040a4979db269b4a377e42f11b4be0ce24611f677674dcf770f5887ca4db565303283809e6d65f7fc6bc273605c7daa403fca53549f75ff3372909642d02b7fdcac1e68242814d6e925ab01a80836cfbb35581960079e2fb44c0d186", + "wx" : "6761044a040a4979db269b4a377e42f11b4be0ce24611f677674dcf770f5887ca4db565303283809e6d65f7fc6bc2736", + "wy" : "05c7daa403fca53549f75ff3372909642d02b7fdcac1e68242814d6e925ab01a80836cfbb35581960079e2fb44c0d186" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200046761044a040a4979db269b4a377e42f11b4be0ce24611f677674dcf770f5887ca4db565303283809e6d65f7fc6bc273605c7daa403fca53549f75ff3372909642d02b7fdcac1e68242814d6e925ab01a80836cfbb35581960079e2fb44c0d186", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEZ2EESgQKSXnbJptKN35C8RtL4M4kYR9n\ndnTc93D1iHyk21ZTAyg4CebWX3/GvCc2BcfapAP8pTVJ91/zNykJZC0Ct/3KweaC\nQoFNbpJasBqAg2z7s1WBlgB54vtEwNGG\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 371, + "comment" : "extreme value for k and edgecase s", + "msg" : "313233343030", + "sig" : "3064023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df61023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "046922c591502f01046fee5617bf16496f58398822e69afa8335308f36c09a8ed437209fefcffbbdf0a4876b35a3c7ab2655854db825b94b3f27e5f892d3bbb6c7240ec922894dd3598e91fcc6134a2b8fd154e1790466906206f0f623416e63a1", + "wx" : "6922c591502f01046fee5617bf16496f58398822e69afa8335308f36c09a8ed437209fefcffbbdf0a4876b35a3c7ab26", + "wy" : "55854db825b94b3f27e5f892d3bbb6c7240ec922894dd3598e91fcc6134a2b8fd154e1790466906206f0f623416e63a1" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200046922c591502f01046fee5617bf16496f58398822e69afa8335308f36c09a8ed437209fefcffbbdf0a4876b35a3c7ab2655854db825b94b3f27e5f892d3bbb6c7240ec922894dd3598e91fcc6134a2b8fd154e1790466906206f0f623416e63a1", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEaSLFkVAvAQRv7lYXvxZJb1g5iCLmmvqD\nNTCPNsCajtQ3IJ/vz/u98KSHazWjx6smVYVNuCW5Sz8n5fiS07u2xyQOySKJTdNZ\njpH8xhNKK4/RVOF5BGaQYgbw9iNBbmOh\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 372, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3064023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df6102302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04892dac0e700fc29d1802d9a449a6f56b2172cb1b7d881013cd3b31c0edb052f2d340c8995a4477bcb9225fec15667233cc6c34ae17445444516fd8fd22ee83f79eb0771ebff6677ac5d4e089f87a1c72df957acb24492adcd7c3816b8e0c75b1", + "wx" : "00892dac0e700fc29d1802d9a449a6f56b2172cb1b7d881013cd3b31c0edb052f2d340c8995a4477bcb9225fec15667233", + "wy" : "00cc6c34ae17445444516fd8fd22ee83f79eb0771ebff6677ac5d4e089f87a1c72df957acb24492adcd7c3816b8e0c75b1" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004892dac0e700fc29d1802d9a449a6f56b2172cb1b7d881013cd3b31c0edb052f2d340c8995a4477bcb9225fec15667233cc6c34ae17445444516fd8fd22ee83f79eb0771ebff6677ac5d4e089f87a1c72df957acb24492adcd7c3816b8e0c75b1", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEiS2sDnAPwp0YAtmkSab1ayFyyxt9iBAT\nzTsxwO2wUvLTQMiZWkR3vLkiX+wVZnIzzGw0rhdEVERRb9j9Iu6D956wdx6/9md6\nxdTgifh6HHLflXrLJEkq3NfDgWuODHWx\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 373, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3064023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df6102306666666666666666666666666666666666666666666666664fc15233fb49458c89a4057a8379dc9791f80a2ab84edd61", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0401634117e6478ce0568b0a2469237bbac6ff096acb7e514072bf77123cb51ba0cc3e8d69284d534d8e6d1e876cecf22231e5ef04dc96762ce7d5ef3348ad1e241ac797ae3b630ea249afc5139af49b8ef68b32f812d6b514210363d498efc28c", + "wx" : "01634117e6478ce0568b0a2469237bbac6ff096acb7e514072bf77123cb51ba0cc3e8d69284d534d8e6d1e876cecf222", + "wy" : "31e5ef04dc96762ce7d5ef3348ad1e241ac797ae3b630ea249afc5139af49b8ef68b32f812d6b514210363d498efc28c" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000401634117e6478ce0568b0a2469237bbac6ff096acb7e514072bf77123cb51ba0cc3e8d69284d534d8e6d1e876cecf22231e5ef04dc96762ce7d5ef3348ad1e241ac797ae3b630ea249afc5139af49b8ef68b32f812d6b514210363d498efc28c", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEAWNBF+ZHjOBWiwokaSN7usb/CWrLflFA\ncr93Ejy1G6DMPo1pKE1TTY5tHods7PIiMeXvBNyWdizn1e8zSK0eJBrHl647Yw6i\nSa/FE5r0m472izL4Eta1FCEDY9SY78KM\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 374, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3065023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df6102310099999999999999999999999999999999999999999999999977a1fb4df8ede852ce760837c536cae35af40f4014764c12", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04675bdc79d8243887fe1b305d12ac10d2e9c0bde070a6e3394cd5f6adfbceda75498b0e7a794c7212f42be93f616744563e96d1bf6f95cdbefa774911ba06463d8a90a0c9d73c9699b061d779dc52496e8ee9b9ae9c5d4d90e89cd1157d811895", + "wx" : "675bdc79d8243887fe1b305d12ac10d2e9c0bde070a6e3394cd5f6adfbceda75498b0e7a794c7212f42be93f61674456", + "wy" : "3e96d1bf6f95cdbefa774911ba06463d8a90a0c9d73c9699b061d779dc52496e8ee9b9ae9c5d4d90e89cd1157d811895" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004675bdc79d8243887fe1b305d12ac10d2e9c0bde070a6e3394cd5f6adfbceda75498b0e7a794c7212f42be93f616744563e96d1bf6f95cdbefa774911ba06463d8a90a0c9d73c9699b061d779dc52496e8ee9b9ae9c5d4d90e89cd1157d811895", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEZ1vcedgkOIf+GzBdEqwQ0unAveBwpuM5\nTNX2rfvO2nVJiw56eUxyEvQr6T9hZ0RWPpbRv2+Vzb76d0kRugZGPYqQoMnXPJaZ\nsGHXedxSSW6O6bmunF1NkOic0RV9gRiV\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 375, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3065023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df61023100db6db6db6db6db6db6db6db6db6db6db6db6db6db6db6db6aae76701acc1950894a89e068772d8b281eef136f8a8fef5", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "040fd1aab89f47b565b8160dfcc433b6408adeb1473c036b26b7ddec714fb4d0e7dd756c88469e86e218813ead8e8e7676f1cc955c4139e0071c0079ec1d77164e0569bdf453837e8b33c98535a0e7c9c61ef24762067bb46b6116ea7909a69b23", + "wx" : "0fd1aab89f47b565b8160dfcc433b6408adeb1473c036b26b7ddec714fb4d0e7dd756c88469e86e218813ead8e8e7676", + "wy" : "00f1cc955c4139e0071c0079ec1d77164e0569bdf453837e8b33c98535a0e7c9c61ef24762067bb46b6116ea7909a69b23" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200040fd1aab89f47b565b8160dfcc433b6408adeb1473c036b26b7ddec714fb4d0e7dd756c88469e86e218813ead8e8e7676f1cc955c4139e0071c0079ec1d77164e0569bdf453837e8b33c98535a0e7c9c61ef24762067bb46b6116ea7909a69b23", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAED9GquJ9HtWW4Fg38xDO2QIresUc8A2sm\nt93scU+00OfddWyIRp6G4hiBPq2OjnZ28cyVXEE54AccAHnsHXcWTgVpvfRTg36L\nM8mFNaDnycYe8kdiBnu0a2EW6nkJppsj\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 376, + "comment" : "extreme value for k", + "msg" : "313233343030", + "sig" : "3064023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df6102300eb10e5ab95f2f26a40700b1300fb8c3e754d5c453d9384ecce1daa38135a48a0a96c24efc2a76d00bde1d7aeedf7f6a", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0434d74ec088bab6c6323968d1f468993812f690d6edca5b97604d718e12b8cdfdd96d42e57d33afe312f0ee3c3d0a13f786f4922bb2c13bdf7752a3ecb69393e997bd65461c46867ebeef6296b23f2c56df63acfde648f3f5002dbc239ffd1582", + "wx" : "34d74ec088bab6c6323968d1f468993812f690d6edca5b97604d718e12b8cdfdd96d42e57d33afe312f0ee3c3d0a13f7", + "wy" : "0086f4922bb2c13bdf7752a3ecb69393e997bd65461c46867ebeef6296b23f2c56df63acfde648f3f5002dbc239ffd1582" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000434d74ec088bab6c6323968d1f468993812f690d6edca5b97604d718e12b8cdfdd96d42e57d33afe312f0ee3c3d0a13f786f4922bb2c13bdf7752a3ecb69393e997bd65461c46867ebeef6296b23f2c56df63acfde648f3f5002dbc239ffd1582", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAENNdOwIi6tsYyOWjR9GiZOBL2kNbtyluX\nYE1xjhK4zf3ZbULlfTOv4xLw7jw9ChP3hvSSK7LBO993UqPstpOT6Ze9ZUYcRoZ+\nvu9ilrI/LFbfY6z95kjz9QAtvCOf/RWC\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 377, + "comment" : "extreme value for k and edgecase s", + "msg" : "313233343030", + "sig" : "3065023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "044376c9893e9277296c766a83abbe36b34da7a631f8cbfd32a1888de0dd1455a21a153ea2d61cfa5071fc6be12a658f6b290ba1a8ee8c78b5dd58f9ffcacb22955682eea02429c3fa8cdcb649fa4d007c8693e3f8f3c0a5f3c4de7a51beaa9809", + "wx" : "4376c9893e9277296c766a83abbe36b34da7a631f8cbfd32a1888de0dd1455a21a153ea2d61cfa5071fc6be12a658f6b", + "wy" : "290ba1a8ee8c78b5dd58f9ffcacb22955682eea02429c3fa8cdcb649fa4d007c8693e3f8f3c0a5f3c4de7a51beaa9809" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200044376c9893e9277296c766a83abbe36b34da7a631f8cbfd32a1888de0dd1455a21a153ea2d61cfa5071fc6be12a658f6b290ba1a8ee8c78b5dd58f9ffcacb22955682eea02429c3fa8cdcb649fa4d007c8693e3f8f3c0a5f3c4de7a51beaa9809", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEQ3bJiT6SdylsdmqDq742s02npjH4y/0y\noYiN4N0UVaIaFT6i1hz6UHH8a+EqZY9rKQuhqO6MeLXdWPn/yssilVaC7qAkKcP6\njNy2SfpNAHyGk+P488Cl88TeelG+qpgJ\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 378, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3065023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab702302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0410878fc4807f6732a23c883e838e38c787f7088f94c1824b84673e8b9eab16de1544ae4bf2c6fe3fe4fb343b7487e2b43036ff439533d22f951dae966584bafb23b217dcad2f8f4e0e6999c0c4d0f076634be805f676fd2a59c27f9fe7c5d95b", + "wx" : "10878fc4807f6732a23c883e838e38c787f7088f94c1824b84673e8b9eab16de1544ae4bf2c6fe3fe4fb343b7487e2b4", + "wy" : "3036ff439533d22f951dae966584bafb23b217dcad2f8f4e0e6999c0c4d0f076634be805f676fd2a59c27f9fe7c5d95b" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000410878fc4807f6732a23c883e838e38c787f7088f94c1824b84673e8b9eab16de1544ae4bf2c6fe3fe4fb343b7487e2b43036ff439533d22f951dae966584bafb23b217dcad2f8f4e0e6999c0c4d0f076634be805f676fd2a59c27f9fe7c5d95b", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEIePxIB/ZzKiPIg+g444x4f3CI+UwYJL\nhGc+i56rFt4VRK5L8sb+P+T7NDt0h+K0MDb/Q5Uz0i+VHa6WZYS6+yOyF9ytL49O\nDmmZwMTQ8HZjS+gF9nb9KlnCf5/nxdlb\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 379, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3065023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab702306666666666666666666666666666666666666666666666664fc15233fb49458c89a4057a8379dc9791f80a2ab84edd61", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04036b253e3b4ac88bb8585a2b32b978766a931e5ad0d0e653a2e34b44d6ddcc0d386e20c4def2d8bb3f8da128c1eac69f9c8e3b5ff5dde2205af359b3974d52758d7abae812b8b275e1452c4e59cb62e9b6771d347dbd1dea761c70291cc5e0a6", + "wx" : "036b253e3b4ac88bb8585a2b32b978766a931e5ad0d0e653a2e34b44d6ddcc0d386e20c4def2d8bb3f8da128c1eac69f", + "wy" : "009c8e3b5ff5dde2205af359b3974d52758d7abae812b8b275e1452c4e59cb62e9b6771d347dbd1dea761c70291cc5e0a6" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004036b253e3b4ac88bb8585a2b32b978766a931e5ad0d0e653a2e34b44d6ddcc0d386e20c4def2d8bb3f8da128c1eac69f9c8e3b5ff5dde2205af359b3974d52758d7abae812b8b275e1452c4e59cb62e9b6771d347dbd1dea761c70291cc5e0a6", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEA2slPjtKyIu4WForMrl4dmqTHlrQ0OZT\nouNLRNbdzA04biDE3vLYuz+NoSjB6safnI47X/Xd4iBa81mzl01SdY16uugSuLJ1\n4UUsTlnLYum2dx00fb0d6nYccCkcxeCm\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 380, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3066023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab702310099999999999999999999999999999999999999999999999977a1fb4df8ede852ce760837c536cae35af40f4014764c12", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "042783c1be922fce155864ecb41d0a316e193a55843e80192f1fe556772f3debd04b9fc93c27bc6f353938886a404419941a352cec336946424fa3c208ea7105f5549edde8688abd305344bf4f66dda7eabcda6f8557c9af88109804d702e9670b", + "wx" : "2783c1be922fce155864ecb41d0a316e193a55843e80192f1fe556772f3debd04b9fc93c27bc6f353938886a40441994", + "wy" : "1a352cec336946424fa3c208ea7105f5549edde8688abd305344bf4f66dda7eabcda6f8557c9af88109804d702e9670b" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200042783c1be922fce155864ecb41d0a316e193a55843e80192f1fe556772f3debd04b9fc93c27bc6f353938886a404419941a352cec336946424fa3c208ea7105f5549edde8688abd305344bf4f66dda7eabcda6f8557c9af88109804d702e9670b", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEJ4PBvpIvzhVYZOy0HQoxbhk6VYQ+gBkv\nH+VWdy8969BLn8k8J7xvNTk4iGpARBmUGjUs7DNpRkJPo8II6nEF9VSe3ehoir0w\nU0S/T2bdp+q82m+FV8mviBCYBNcC6WcL\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 381, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3066023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7023100db6db6db6db6db6db6db6db6db6db6db6db6db6db6db6db6aae76701acc1950894a89e068772d8b281eef136f8a8fef5", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04fa92538cdc740368caf16480ff1304cebbbe59a46a7a84603726b9592d105be069df1c61b5974f27e7552f797de97cdb620e03a46da862e4b089bafbb80df8f055c8f47991b3a3ddb2b089aedb2f15841a6a5b5e14c1dc36b3c155c4f74d3409", + "wx" : "00fa92538cdc740368caf16480ff1304cebbbe59a46a7a84603726b9592d105be069df1c61b5974f27e7552f797de97cdb", + "wy" : "620e03a46da862e4b089bafbb80df8f055c8f47991b3a3ddb2b089aedb2f15841a6a5b5e14c1dc36b3c155c4f74d3409" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004fa92538cdc740368caf16480ff1304cebbbe59a46a7a84603726b9592d105be069df1c61b5974f27e7552f797de97cdb620e03a46da862e4b089bafbb80df8f055c8f47991b3a3ddb2b089aedb2f15841a6a5b5e14c1dc36b3c155c4f74d3409", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+pJTjNx0A2jK8WSA/xMEzru+WaRqeoRg\nNya5WS0QW+Bp3xxhtZdPJ+dVL3l96XzbYg4DpG2oYuSwibr7uA348FXI9HmRs6Pd\nsrCJrtsvFYQaalteFMHcNrPBVcT3TTQJ\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 382, + "comment" : "extreme value for k", + "msg" : "313233343030", + "sig" : "3065023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab702300eb10e5ab95f2f26a40700b1300fb8c3e754d5c453d9384ecce1daa38135a48a0a96c24efc2a76d00bde1d7aeedf7f6a", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab73617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f", + "wx" : "00aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7", + "wy" : "3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab73617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEqofKIr6LBTeOscce8yCtdG4dO2KLp5uY\nWfdB4IJUKjhVAvJdv1UpbDpUXjhydgq3NhfeSpYmLG9dnpi/kpLcKfj0Hb0omhR8\n6doxE7XwuMAKYLHOHX6BnXpDHXyQ6g5f\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 383, + "comment" : "testing point duplication", + "msg" : "313233343030", + "sig" : "3065023100f9b127f0d81ebcd17b7ba0ea131c660d340b05ce557c82160e0f793de07d38179023942871acb7002dfafdfffc8deace02302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 384, + "comment" : "testing point duplication", + "msg" : "313233343030", + "sig" : "30640230064ed80f27e1432e84845f15ece399f2cbf4fa31aa837de9b953d44413b9f5c7c7f67989d703f07abef11b6ad0373ea502302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7c9e821b569d9d390a26167406d6d23d6070be242d765eb831625ceec4a0f473ef59f4e30e2817e6285bce2846f15f1a0", + "wx" : "00aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7", + "wy" : "00c9e821b569d9d390a26167406d6d23d6070be242d765eb831625ceec4a0f473ef59f4e30e2817e6285bce2846f15f1a0" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7c9e821b569d9d390a26167406d6d23d6070be242d765eb831625ceec4a0f473ef59f4e30e2817e6285bce2846f15f1a0", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEqofKIr6LBTeOscce8yCtdG4dO2KLp5uY\nWfdB4IJUKjhVAvJdv1UpbDpUXjhydgq3yeghtWnZ05CiYWdAbW0j1gcL4kLXZeuD\nFiXO7EoPRz71n04w4oF+YoW84oRvFfGg\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 385, + "comment" : "testing point duplication", + "msg" : "313233343030", + "sig" : "3065023100f9b127f0d81ebcd17b7ba0ea131c660d340b05ce557c82160e0f793de07d38179023942871acb7002dfafdfffc8deace02302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 386, + "comment" : "testing point duplication", + "msg" : "313233343030", + "sig" : "30640230064ed80f27e1432e84845f15ece399f2cbf4fa31aa837de9b953d44413b9f5c7c7f67989d703f07abef11b6ad0373ea502302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0429bdb76d5fa741bfd70233cb3a66cc7d44beb3b0663d92a8136650478bcefb61ef182e155a54345a5e8e5e88f064e5bc9a525ab7f764dad3dae1468c2b419f3b62b9ba917d5e8c4fb1ec47404a3fc76474b2713081be9db4c00e043ada9fc4a3", + "wx" : "29bdb76d5fa741bfd70233cb3a66cc7d44beb3b0663d92a8136650478bcefb61ef182e155a54345a5e8e5e88f064e5bc", + "wy" : "009a525ab7f764dad3dae1468c2b419f3b62b9ba917d5e8c4fb1ec47404a3fc76474b2713081be9db4c00e043ada9fc4a3" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000429bdb76d5fa741bfd70233cb3a66cc7d44beb3b0663d92a8136650478bcefb61ef182e155a54345a5e8e5e88f064e5bc9a525ab7f764dad3dae1468c2b419f3b62b9ba917d5e8c4fb1ec47404a3fc76474b2713081be9db4c00e043ada9fc4a3", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEKb23bV+nQb/XAjPLOmbMfUS+s7BmPZKo\nE2ZQR4vO+2HvGC4VWlQ0Wl6OXojwZOW8mlJat/dk2tPa4UaMK0GfO2K5upF9XoxP\nsexHQEo/x2R0snEwgb6dtMAOBDran8Sj\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 387, + "comment" : "pseudorandom signature", + "msg" : "", + "sig" : "3064023032401249714e9091f05a5e109d5c1216fdc05e98614261aa0dbd9e9cd4415dee29238afbd3b103c1e40ee5c9144aee0f02304326756fb2c4fd726360dd6479b5849478c7a9d054a833a58c1631c33b63c3441336ddf2c7fe0ed129aae6d4ddfeb753", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 388, + "comment" : "pseudorandom signature", + "msg" : "4d7367", + "sig" : "3066023100d7143a836608b25599a7f28dec6635494c2992ad1e2bbeecb7ef601a9c01746e710ce0d9c48accb38a79ede5b9638f3402310080f9e165e8c61035bf8aa7b5533960e46dd0e211c904a064edb6de41f797c0eae4e327612ee3f816f4157272bb4fabc9", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 389, + "comment" : "pseudorandom signature", + "msg" : "313233343030", + "sig" : "30650230234503fcca578121986d96be07fbc8da5d894ed8588c6dbcdbe974b4b813b21c52d20a8928f2e2fdac14705b0705498c023100cd7b9b766b97b53d1a80fc0b760af16a11bf4a59c7c367c6c7275dfb6e18a88091eed3734bf5cf41b3dc6fecd6d3baaf", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 390, + "comment" : "pseudorandom signature", + "msg" : "0000000000000000000000000000000000000000", + "sig" : "306502305cad9ae1565f2588f86d821c2cc1b4d0fdf874331326568f5b0e130e4e0c0ec497f8f5f564212bd2a26ecb782cf0a18d023100bf2e9d0980fbb00696673e7fbb03e1f854b9d7596b759a17bf6e6e67a95ea6c1664f82dc449ae5ea779abd99c78e6840", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04ffffffffaa63f1a239ac70197c6ebfcea5756dc012123f82c51fa874d66028be00e976a1080606737cc75c40bdfe4aacacbd85389088a62a6398384c22b52d492f23f46e4a27a4724ad55551da5c483438095a247cb0c3378f1f52c3425ff9f1", + "wx" : "00ffffffffaa63f1a239ac70197c6ebfcea5756dc012123f82c51fa874d66028be00e976a1080606737cc75c40bdfe4aac", + "wy" : "00acbd85389088a62a6398384c22b52d492f23f46e4a27a4724ad55551da5c483438095a247cb0c3378f1f52c3425ff9f1" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004ffffffffaa63f1a239ac70197c6ebfcea5756dc012123f82c51fa874d66028be00e976a1080606737cc75c40bdfe4aacacbd85389088a62a6398384c22b52d492f23f46e4a27a4724ad55551da5c483438095a247cb0c3378f1f52c3425ff9f1", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE/////6pj8aI5rHAZfG6/zqV1bcASEj+C\nxR+odNZgKL4A6XahCAYGc3zHXEC9/kqsrL2FOJCIpipjmDhMIrUtSS8j9G5KJ6Ry\nStVVUdpcSDQ4CVokfLDDN48fUsNCX/nx\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 391, + "comment" : "x-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "3065023007648b6660d01ba2520a09d298adf3b1a02c32744bd2877208f5a4162f6c984373139d800a4cdc1ffea15bce4871a0ed02310099fd367012cb9e02cde2749455e0d495c52818f3c14f6e6aad105b0925e2a7290ac4a06d9fadf4b15b578556fe332a5f", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 392, + "comment" : "x-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "3065023100a049dcd96c72e4f36144a51bba30417b451a305dd01c9e30a5e04df94342617dc383f17727708e3277cd7246ca44074102303970e264d85b228bf9e9b9c4947c5dd041ea8b5bde30b93aa59fedf2c428d3e2540a54e0530688acccb83ac7b29b79a2", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 393, + "comment" : "x-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "30650230441800ea9377c27865be000ad008eb3d7502bdd105824b26d15cf3d06452969a9d0607a915a8fe989215fc4d61af6e05023100dce29faa5137f75ad77e03918c8ee6747cc7a39b0a69f8b915654cac4cf4bfd9c87cc46ae1631b5c6baebd4fc08ff8fd", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04d1827fc6f6f12f21992c5a409a0653b121d2ef02b2b0ab01a9161ce956280740b1e356b255701b0a6ddc9ec2ca8a9422c6ed5d2ced8d8ab7560fa5bb88c738e74541883d8a2b1c0e2ba7e36d030fc4d9bfb8b22f24db897ebac49dd400000000", + "wx" : "00d1827fc6f6f12f21992c5a409a0653b121d2ef02b2b0ab01a9161ce956280740b1e356b255701b0a6ddc9ec2ca8a9422", + "wy" : "00c6ed5d2ced8d8ab7560fa5bb88c738e74541883d8a2b1c0e2ba7e36d030fc4d9bfb8b22f24db897ebac49dd400000000" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004d1827fc6f6f12f21992c5a409a0653b121d2ef02b2b0ab01a9161ce956280740b1e356b255701b0a6ddc9ec2ca8a9422c6ed5d2ced8d8ab7560fa5bb88c738e74541883d8a2b1c0e2ba7e36d030fc4d9bfb8b22f24db897ebac49dd400000000", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE0YJ/xvbxLyGZLFpAmgZTsSHS7wKysKsB\nqRYc6VYoB0Cx41ayVXAbCm3cnsLKipQixu1dLO2NirdWD6W7iMc450VBiD2KKxwO\nK6fjbQMPxNm/uLIvJNuJfrrEndQAAAAA\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 394, + "comment" : "y-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "306402303244768016457c463b74f2097f216d9670b191f76281c74bc6a1a1971d19f209bf4696468f5eb75d6326a0a43c0a65290230501e0ad985ed9f95697bd17fdbe3f9ca92e0f76426d3664e6896648d9c750bf588d0ce7d011c1a1e8d6c2e082422dc93", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 395, + "comment" : "y-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "306402305e1af40f2480e3d97c4ae4bfd34a9f45269241356f3a46becd86a4a7c9716d73ca5aebdb3db1a7765650666683bc856b02307e7c4b473a2baaa4953785be8aa2a10006f6d36b400ab981864d69cecec046718d0404b9647454b159aa5a92d76d7955", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 396, + "comment" : "y-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "306502306688e36a26f15bdc1c3f91367f8a7667f7bb3e30a335d6f0900e9534eb88b260cb29344c723fedfbe7ac9c5a33f4bf0d023100aa35fddf0fdc9017860b378f801cd806f3e2d754cd2fd94eb7bb36a46ce828cef87e9ebbf447068e630b87fee385ad8f", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "041099bb45100f55f5a85cca3de2b3bd5e250f4f6fad6631a3156c2e52a33d7d615dd279f79f8b4baff7c713ac00000000e6c9b736a8929f2ed7be0c753a54cbb48b8469e0411eaf93a4a82459ba0b681bba8f5fb383b4906d4901a3303e2f1557", + "wx" : "1099bb45100f55f5a85cca3de2b3bd5e250f4f6fad6631a3156c2e52a33d7d615dd279f79f8b4baff7c713ac00000000", + "wy" : "00e6c9b736a8929f2ed7be0c753a54cbb48b8469e0411eaf93a4a82459ba0b681bba8f5fb383b4906d4901a3303e2f1557" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200041099bb45100f55f5a85cca3de2b3bd5e250f4f6fad6631a3156c2e52a33d7d615dd279f79f8b4baff7c713ac00000000e6c9b736a8929f2ed7be0c753a54cbb48b8469e0411eaf93a4a82459ba0b681bba8f5fb383b4906d4901a3303e2f1557", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEJm7RRAPVfWoXMo94rO9XiUPT2+tZjGj\nFWwuUqM9fWFd0nn3n4tLr/fHE6wAAAAA5sm3NqiSny7Xvgx1OlTLtIuEaeBBHq+T\npKgkWboLaBu6j1+zg7SQbUkBozA+LxVX\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 397, + "comment" : "x-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "3065023100d4a8f3b0b4d3a5769e3a0bbc644b35f1d509355ed1fe401e170f667b661f693b32598e8c143a817a958982845042bb48023004cc07578bbd1981dbf6e8a97a354c98d41b8b6f6e8a2c2b1763c7c2a29d79e24f8476075c9aed9aec6c64dff50461ae", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 398, + "comment" : "x-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "3065023100c286d1928e9c79fdd3bebdf22a1dbd37c8105e8ecf41e9e3777fe341b6b8d5a89b9d986827d6d1dbb381cd8239484a220230201119ae305b9360aa9b5e5d1567e0674c09e4f025556ebf81b987466b0f421b8d31f72bbe95f3ce2aa9874a84edfd40", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 399, + "comment" : "x-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "3065023100d9c678550167f10c511e62acb4bd0a3f7f336bc090c94e6c6b02622439c348a2159c5f41f9b5aa4b470590d40dcd7cc202301fd5eaee295abb4081cb626745f4ad279ceb44604062830b58e6c0465c562d41f02ba588fc0db1ebbe339cdc008d7a1b", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04000000002b089edd754169010145f263f334fc167cc19dae8225970ae19cc8cb7ec73593d6a465c370f5478b0e539d69d1951d597b56a67345acb25809581f07cd0eb78d9538a3f8a65f300e68a1eb78507df76de650e8f8ee63a5f0c5687c98", + "wx" : "2b089edd754169010145f263f334fc167cc19dae8225970ae19cc8cb7ec73593d6a465c370f5478b0e539d69", + "wy" : "00d1951d597b56a67345acb25809581f07cd0eb78d9538a3f8a65f300e68a1eb78507df76de650e8f8ee63a5f0c5687c98" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004000000002b089edd754169010145f263f334fc167cc19dae8225970ae19cc8cb7ec73593d6a465c370f5478b0e539d69d1951d597b56a67345acb25809581f07cd0eb78d9538a3f8a65f300e68a1eb78507df76de650e8f8ee63a5f0c5687c98", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEAAAAACsInt11QWkBAUXyY/M0/BZ8wZ2u\ngiWXCuGcyMt+xzWT1qRlw3D1R4sOU51p0ZUdWXtWpnNFrLJYCVgfB80Ot42VOKP4\npl8wDmih63hQffdt5lDo+O5jpfDFaHyY\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 400, + "comment" : "x-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "3065023020fee7c71b6cb0d1da3641ec6622c055a3b16a1f596c64b34da1b2d0b868b66a8f0a0d0db983b3dc7e53bb7295da81970231008141a931d3579aec1cac9887d2fff9c6f12d47a27e4aab8cf262a9d14a715bca0b2057cbc3f18b6fd3d1df76f7410f16", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 401, + "comment" : "x-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "3065023100913eecc559b3cf7108a65d6cc3076bfdf36c6f94dcc6693d06690470f34a2e81564241e1de5f5f51421de30af467f10f0230649bd3717244e8ef3c6b0eda983f84dca5ea86d1bec15386b9c473ec43a8cd0ba558eee819f791d9ff9272b9afd59551", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 402, + "comment" : "x-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "3064023023855c46403a97b76cbb316ec3fe7e2c422b818387604bda8c3d91121b4f20179d9107c5f92dedc8b620d7db87fccccd023050f57343ab148e50662320c4161e44543c35bc992011ea5b1680b94382cf224ea0ec5da511e102f566cb67201f30a2ee", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b33600000000208b3f5ad3b3937acc9d606cc5ececab4a701f75ed42957ea4d7858d33f5c26c6ae20a9cccda56996700d6b4", + "wx" : "00fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b336", + "wy" : "208b3f5ad3b3937acc9d606cc5ececab4a701f75ed42957ea4d7858d33f5c26c6ae20a9cccda56996700d6b4" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b33600000000208b3f5ad3b3937acc9d606cc5ececab4a701f75ed42957ea4d7858d33f5c26c6ae20a9cccda56996700d6b4", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+wG6rV8Lj3m5zRBNEqq5MQFGrdfWtMAi\n2HrmcRF4uU1hjKezrxOFSxxYiHnod7M2AAAAACCLP1rTs5N6zJ1gbMXs7KtKcB91\n7UKVfqTXhY0z9cJsauIKnMzaVplnANa0\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 403, + "comment" : "y-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "3066023100d200958d491fcebde667cd736c9dba0961c70db2ecaf573c31dd7fa41ecca32b40b5896f9a0ddf272110e3d21e84593a023100c2ecf73943b9adce596bac14fce62495ae93825c5ff6f61c247d1d8afcba52082fc96f63a26e55bccfc3779f88cfd799", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 404, + "comment" : "y-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "306402306ac17d71260c79f81a7566124738cb3ee5d0aa690e73a98ae9e766f1336691e500cad51ba1302366c09cc06b8f7049e0023032ca965d6d7012ec187c7cab9544334d66c2a7658ddefa67e4ad40429815518ecc87b1492ddd57333bd2300b4660a835", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 405, + "comment" : "y-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "3065023100e19a4646f0ed8a271fe86ba533f8be4fd81bbf4674716f668efa89a40cac51eec2a6cfbd92327d25efe91ca4ff712bc502304a86b2e8e12378e633dec2691e3b1eed4e932cc48b28e45fa3d464cc0e948c02cc9decf2bb43b25937fcf37e9ad86ef0", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b336ffffffffdf74c0a52c4c6c8533629f933a131354b58fe08a12bd6a815b287a71cc0a3d92951df5633325a96798ff294b", + "wx" : "00fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b336", + "wy" : "00ffffffffdf74c0a52c4c6c8533629f933a131354b58fe08a12bd6a815b287a71cc0a3d92951df5633325a96798ff294b" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b336ffffffffdf74c0a52c4c6c8533629f933a131354b58fe08a12bd6a815b287a71cc0a3d92951df5633325a96798ff294b", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+wG6rV8Lj3m5zRBNEqq5MQFGrdfWtMAi\n2HrmcRF4uU1hjKezrxOFSxxYiHnod7M2/////990wKUsTGyFM2KfkzoTE1S1j+CK\nEr1qgVsoenHMCj2SlR31YzMlqWeY/ylL\n-----END PUBLIC KEY-----", + "sha" : "SHA-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 406, + "comment" : "y-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "3064023015aac6c0f435cb662d110db5cf686caee53c64fe2d6d600a83ebe505a0e6fc62dc5705160477c47528c8c903fa865b5d02307f94ddc01a603f9bec5d10c9f2c89fb23b3ffab6b2b68d0f04336d499085e32d22bf3ab67a49a74c743f72473172b59f", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 407, + "comment" : "y-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "306602310090b95a7d194b73498fba5afc95c1aea9be073162a9edc57c4d12f459f0a1730baf2f87d7d6624aea7b931ec53370fe47023100cbc1ef470e666010604c609384b872db7fa7b8a5a9f20fdefd656be2fcc75db53948102f7ab203ea1860a6a32af246a1", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 408, + "comment" : "y-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "3066023100dd4391ce7557cbd005e3d5d727cd264399dcc3c6501e4547505b6d57b40bbf0a7fac794dcc8d4233159dd0aa40d4e0b9023100a77fa1374fd60aa91600912200fc83c6aa447f8171ecea72ae322df32dccd68951dc5caf6c50380e400e45bf5c0e626b", + "result" : "valid", + "flags" : [] + } + ] + } + ] +} diff --git a/vendor/pasetors/test_vectors/wycheproof/ecdsa_secp384r1_sha3_384_test.json b/vendor/pasetors/test_vectors/wycheproof/ecdsa_secp384r1_sha3_384_test.json new file mode 100644 index 000000000..13759a309 --- /dev/null +++ b/vendor/pasetors/test_vectors/wycheproof/ecdsa_secp384r1_sha3_384_test.json @@ -0,0 +1,4711 @@ +{ + "algorithm" : "ECDSA", + "generatorVersion" : "0.8r12", + "numberOfTests" : 418, + "header" : [ + "Test vectors of type EcdsaVerify are meant for the verification", + "of ASN encoded ECDSA signatures." + ], + "notes" : { + "BER" : "This is a signature with correct values for (r, s) but using some alternative BER encoding instead of DER encoding. Implementations should not accept such signatures to limit signature malleability.", + "EdgeCase" : "Edge case values such as r=1 and s=0 can lead to forgeries if the ECDSA implementation does not check boundaries and computes s^(-1)==0.", + "PointDuplication" : "Some implementations of ECDSA do not handle duplication and points at infinity correctly. This is a test vector that has been specially crafted to check for such an omission." + }, + "schema" : "ecdsa_verify_schema.json", + "testGroups" : [ + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "042da57dda1089276a543f9ffdac0bff0d976cad71eb7280e7d9bfd9fee4bdb2f20f47ff888274389772d98cc5752138aa4b6d054d69dcf3e25ec49df870715e34883b1836197d76f8ad962e78f6571bbc7407b0d6091f9e4d88f014274406174f", + "wx" : "2da57dda1089276a543f9ffdac0bff0d976cad71eb7280e7d9bfd9fee4bdb2f20f47ff888274389772d98cc5752138aa", + "wy" : "4b6d054d69dcf3e25ec49df870715e34883b1836197d76f8ad962e78f6571bbc7407b0d6091f9e4d88f014274406174f" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200042da57dda1089276a543f9ffdac0bff0d976cad71eb7280e7d9bfd9fee4bdb2f20f47ff888274389772d98cc5752138aa4b6d054d69dcf3e25ec49df870715e34883b1836197d76f8ad962e78f6571bbc7407b0d6091f9e4d88f014274406174f", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAELaV92hCJJ2pUP5/9rAv/DZdsrXHrcoDn\n2b/Z/uS9svIPR/+IgnQ4l3LZjMV1ITiqS20FTWnc8+JexJ34cHFeNIg7GDYZfXb4\nrZYuePZXG7x0B7DWCR+eTYjwFCdEBhdP\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 1, + "comment" : "signature malleability", + "msg" : "313233343030", + "sig" : "3065023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c023100c0bb0ee1bffc6c7b74609ec20c460ec47f4d068f33d601870778e5e474860d77834d744db219e6abae9c32912907efd2", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 2, + "comment" : "valid", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 3, + "comment" : "long form encoding of length of sequence", + "msg" : "313233343030", + "sig" : "308164023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 4, + "comment" : "length of sequence contains leading 0", + "msg" : "313233343030", + "sig" : "30820064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 5, + "comment" : "wrong length of sequence", + "msg" : "313233343030", + "sig" : "3065023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 6, + "comment" : "wrong length of sequence", + "msg" : "313233343030", + "sig" : "3063023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 7, + "comment" : "uint32 overflow in length of sequence", + "msg" : "313233343030", + "sig" : "30850100000064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 8, + "comment" : "uint64 overflow in length of sequence", + "msg" : "313233343030", + "sig" : "3089010000000000000064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 9, + "comment" : "length of sequence = 2**31 - 1", + "msg" : "313233343030", + "sig" : "30847fffffff023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 10, + "comment" : "length of sequence = 2**32 - 1", + "msg" : "313233343030", + "sig" : "3084ffffffff023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 11, + "comment" : "length of sequence = 2**40 - 1", + "msg" : "313233343030", + "sig" : "3085ffffffffff023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 12, + "comment" : "length of sequence = 2**64 - 1", + "msg" : "313233343030", + "sig" : "3088ffffffffffffffff023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 13, + "comment" : "incorrect length of sequence", + "msg" : "313233343030", + "sig" : "30ff023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 14, + "comment" : "indefinite length without termination", + "msg" : "313233343030", + "sig" : "3080023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 15, + "comment" : "indefinite length without termination", + "msg" : "313233343030", + "sig" : "3064028034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 16, + "comment" : "indefinite length without termination", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02803f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 17, + "comment" : "removing sequence", + "msg" : "313233343030", + "sig" : "", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 18, + "comment" : "lonely sequence tag", + "msg" : "313233343030", + "sig" : "30", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 19, + "comment" : "appending 0's to sequence", + "msg" : "313233343030", + "sig" : "3066023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 20, + "comment" : "prepending 0's to sequence", + "msg" : "313233343030", + "sig" : "30660000023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 21, + "comment" : "appending unused 0's to sequence", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 22, + "comment" : "appending null value to sequence", + "msg" : "313233343030", + "sig" : "3066023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10500", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 23, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "30694981773064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 24, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "306825003064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 25, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "30663064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10004deadbeef", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 26, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "30692235498177023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 27, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "306822342500023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 28, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "306c2232023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0004deadbeef02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 29, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "3069023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c223549817702303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 30, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "3068023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c2234250002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 31, + "comment" : "including garbage", + "msg" : "313233343030", + "sig" : "306c023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c223202303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10004deadbeef", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 32, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306caa00bb00cd003064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 33, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306aaa02aabb3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 34, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306c2238aa00bb00cd00023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 35, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306a2236aa02aabb023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 36, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306c023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c2238aa00bb00cd0002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 37, + "comment" : "including undefined tags", + "msg" : "313233343030", + "sig" : "306a023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c2236aa02aabb02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 38, + "comment" : "truncated length of sequence", + "msg" : "313233343030", + "sig" : "3081", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 39, + "comment" : "using composition with indefinite length", + "msg" : "313233343030", + "sig" : "30803064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 40, + "comment" : "using composition with indefinite length", + "msg" : "313233343030", + "sig" : "30682280023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c000002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 41, + "comment" : "using composition with indefinite length", + "msg" : "313233343030", + "sig" : "3068023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c228002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 42, + "comment" : "using composition with wrong tag", + "msg" : "313233343030", + "sig" : "30803164023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 43, + "comment" : "using composition with wrong tag", + "msg" : "313233343030", + "sig" : "30682280033034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c000002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 44, + "comment" : "using composition with wrong tag", + "msg" : "313233343030", + "sig" : "3068023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c228003303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 45, + "comment" : "Replacing sequence with NULL", + "msg" : "313233343030", + "sig" : "0500", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 46, + "comment" : "changing tag value of sequence", + "msg" : "313233343030", + "sig" : "2e64023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 47, + "comment" : "changing tag value of sequence", + "msg" : "313233343030", + "sig" : "2f64023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 48, + "comment" : "changing tag value of sequence", + "msg" : "313233343030", + "sig" : "3164023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 49, + "comment" : "changing tag value of sequence", + "msg" : "313233343030", + "sig" : "3264023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 50, + "comment" : "changing tag value of sequence", + "msg" : "313233343030", + "sig" : "ff64023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 51, + "comment" : "dropping value of sequence", + "msg" : "313233343030", + "sig" : "3000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 52, + "comment" : "using composition for sequence", + "msg" : "313233343030", + "sig" : "306830010230633034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 53, + "comment" : "truncated sequence", + "msg" : "313233343030", + "sig" : "3063023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 54, + "comment" : "truncated sequence", + "msg" : "313233343030", + "sig" : "30633034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 55, + "comment" : "indefinite length", + "msg" : "313233343030", + "sig" : "3080023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10000", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 56, + "comment" : "indefinite length with truncated delimiter", + "msg" : "313233343030", + "sig" : "3080023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a100", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 57, + "comment" : "indefinite length with additional element", + "msg" : "313233343030", + "sig" : "3080023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a105000000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 58, + "comment" : "indefinite length with truncated element", + "msg" : "313233343030", + "sig" : "3080023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1060811220000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 59, + "comment" : "indefinite length with garbage", + "msg" : "313233343030", + "sig" : "3080023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10000fe02beef", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 60, + "comment" : "indefinite length with nonempty EOC", + "msg" : "313233343030", + "sig" : "3080023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10002beef", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 61, + "comment" : "prepend empty sequence", + "msg" : "313233343030", + "sig" : "30663000023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 62, + "comment" : "append empty sequence", + "msg" : "313233343030", + "sig" : "3066023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a13000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 63, + "comment" : "append garbage with high tag number", + "msg" : "313233343030", + "sig" : "3067023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1bf7f00", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 64, + "comment" : "sequence of sequence", + "msg" : "313233343030", + "sig" : "30663064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 65, + "comment" : "truncated sequence: removed last 1 elements", + "msg" : "313233343030", + "sig" : "3032023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 66, + "comment" : "repeating element in sequence", + "msg" : "313233343030", + "sig" : "308196023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a102303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 67, + "comment" : "long form encoding of length of integer", + "msg" : "313233343030", + "sig" : "306502813034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 68, + "comment" : "long form encoding of length of integer", + "msg" : "313233343030", + "sig" : "3065023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0281303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 69, + "comment" : "length of integer contains leading 0", + "msg" : "313233343030", + "sig" : "30660282003034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 70, + "comment" : "length of integer contains leading 0", + "msg" : "313233343030", + "sig" : "3066023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c028200303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 71, + "comment" : "wrong length of integer", + "msg" : "313233343030", + "sig" : "3064023134a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 72, + "comment" : "wrong length of integer", + "msg" : "313233343030", + "sig" : "3064022f34a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 73, + "comment" : "wrong length of integer", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02313f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 74, + "comment" : "wrong length of integer", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c022f3f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 75, + "comment" : "uint32 overflow in length of integer", + "msg" : "313233343030", + "sig" : "30690285010000003034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 76, + "comment" : "uint32 overflow in length of integer", + "msg" : "313233343030", + "sig" : "3069023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c028501000000303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 77, + "comment" : "uint64 overflow in length of integer", + "msg" : "313233343030", + "sig" : "306d028901000000000000003034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 78, + "comment" : "uint64 overflow in length of integer", + "msg" : "313233343030", + "sig" : "306d023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02890100000000000000303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 79, + "comment" : "length of integer = 2**31 - 1", + "msg" : "313233343030", + "sig" : "306802847fffffff34a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 80, + "comment" : "length of integer = 2**31 - 1", + "msg" : "313233343030", + "sig" : "3068023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02847fffffff3f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 81, + "comment" : "length of integer = 2**32 - 1", + "msg" : "313233343030", + "sig" : "30680284ffffffff34a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 82, + "comment" : "length of integer = 2**32 - 1", + "msg" : "313233343030", + "sig" : "3068023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0284ffffffff3f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 83, + "comment" : "length of integer = 2**40 - 1", + "msg" : "313233343030", + "sig" : "30690285ffffffffff34a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 84, + "comment" : "length of integer = 2**40 - 1", + "msg" : "313233343030", + "sig" : "3069023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0285ffffffffff3f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 85, + "comment" : "length of integer = 2**64 - 1", + "msg" : "313233343030", + "sig" : "306c0288ffffffffffffffff34a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 86, + "comment" : "length of integer = 2**64 - 1", + "msg" : "313233343030", + "sig" : "306c023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0288ffffffffffffffff3f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 87, + "comment" : "incorrect length of integer", + "msg" : "313233343030", + "sig" : "306402ff34a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 88, + "comment" : "incorrect length of integer", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02ff3f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 89, + "comment" : "removing integer", + "msg" : "313233343030", + "sig" : "303202303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 90, + "comment" : "lonely integer tag", + "msg" : "313233343030", + "sig" : "30330202303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 91, + "comment" : "lonely integer tag", + "msg" : "313233343030", + "sig" : "3033023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 92, + "comment" : "appending 0's to integer", + "msg" : "313233343030", + "sig" : "3066023234a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c000002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 93, + "comment" : "appending 0's to integer", + "msg" : "313233343030", + "sig" : "3066023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02323f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10000", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 94, + "comment" : "prepending 0's to integer", + "msg" : "313233343030", + "sig" : "30660232000034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 95, + "comment" : "prepending 0's to integer", + "msg" : "313233343030", + "sig" : "3066023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c023200003f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [ + "BER" + ] + }, + { + "tcId" : 96, + "comment" : "appending unused 0's to integer", + "msg" : "313233343030", + "sig" : "3066023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c000002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 97, + "comment" : "appending null value to integer", + "msg" : "313233343030", + "sig" : "3066023234a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c050002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 98, + "comment" : "appending null value to integer", + "msg" : "313233343030", + "sig" : "3066023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02323f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a10500", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 99, + "comment" : "truncated length of integer", + "msg" : "313233343030", + "sig" : "3034028102303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 100, + "comment" : "truncated length of integer", + "msg" : "313233343030", + "sig" : "3034023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0281", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 101, + "comment" : "Replacing integer with NULL", + "msg" : "313233343030", + "sig" : "3034050002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 102, + "comment" : "Replacing integer with NULL", + "msg" : "313233343030", + "sig" : "3034023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0500", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 103, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3064003034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 104, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3064013034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 105, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3064033034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 106, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3064043034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 107, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3064ff3034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 108, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c00303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 109, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c01303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 110, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c03303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 111, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c04303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 112, + "comment" : "changing tag value of integer", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44cff303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 113, + "comment" : "dropping value of integer", + "msg" : "313233343030", + "sig" : "3034020002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 114, + "comment" : "dropping value of integer", + "msg" : "313233343030", + "sig" : "3034023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0200", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 115, + "comment" : "using composition for integer", + "msg" : "313233343030", + "sig" : "30682234020134022fa42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 116, + "comment" : "using composition for integer", + "msg" : "313233343030", + "sig" : "3068023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c223402013f022f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 117, + "comment" : "modify first byte of integer", + "msg" : "313233343030", + "sig" : "3064023036a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 118, + "comment" : "modify first byte of integer", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303d44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 119, + "comment" : "modify last byte of integer", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db4cc02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 120, + "comment" : "modify last byte of integer", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd3921", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 121, + "comment" : "truncated integer", + "msg" : "313233343030", + "sig" : "3063022f34a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db402303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 122, + "comment" : "truncated integer", + "msg" : "313233343030", + "sig" : "3063022fa42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 123, + "comment" : "truncated integer", + "msg" : "313233343030", + "sig" : "3063023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c022f3f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 124, + "comment" : "truncated integer", + "msg" : "313233343030", + "sig" : "3063023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c022f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 125, + "comment" : "leading ff in integer", + "msg" : "313233343030", + "sig" : "30650231ff34a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 126, + "comment" : "leading ff in integer", + "msg" : "313233343030", + "sig" : "3065023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0231ff3f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 127, + "comment" : "replaced integer by infinity", + "msg" : "313233343030", + "sig" : "303509018002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 128, + "comment" : "replaced integer by infinity", + "msg" : "313233343030", + "sig" : "3035023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c090180", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 129, + "comment" : "replacing integer with zero", + "msg" : "313233343030", + "sig" : "303502010002303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 130, + "comment" : "replacing integer with zero", + "msg" : "313233343030", + "sig" : "3035023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c020100", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 131, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "306502310134a42eda6d8a881c6a3369fd89db629c9b61904c86019726b4f0fdd1ba4eeb869ab3182345a88754178a3e92aa12ddbf02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 132, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "30650231ff34a42eda6d8a881c6a3369fd89db629c9b61904c86019727262a62cdd1e08fc7ea7efcbeb447385e3db20bbd10888ad902303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 133, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "30640230cb5bd125927577e395cc960276249d63649e6fb379fe68d912724fb039e84258bd66f58f03082026d561dad822b24bb402303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 134, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3065023100cb5bd125927577e395cc960276249d63649e6fb379fe68d8d9d59d322e1f7038158103414bb8c7a1c24df442ef77752702303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 135, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "30650231fecb5bd125927577e395cc960276249d63649e6fb379fe68d94b0f022e45b11479654ce7dcba5778abe875c16d55ed224102303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 136, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "306502310134a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c02303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 137, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3065023100cb5bd125927577e395cc960276249d63649e6fb379fe68d912724fb039e84258bd66f58f03082026d561dad822b24bb402303f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 138, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3065023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0231013f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78874db51f73e84e472ce6a716df47684a2b3c004470826314", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 139, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3065023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0231ff3f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78f8871a1b8b79f2887cb28bb24de619545163cd6ed6f8102e", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 140, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3064023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0230c0bb0ee1bffc6c7b74609ec20c460ec47f4d068f33d6018740159862804edf982b33669b69693f30c1b019265c42c65f", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 141, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3065023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0231fec0bb0ee1bffc6c7b74609ec20c460ec47f4d068f33d6018778b24ae08c17b1b8d31958e920b897b5d4c3ffbb8f7d9cec", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 142, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3065023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c0231013f44f11e400393848b9f613df3b9f13b80b2f970cc29fe78bfea679d7fb12067d4cc99649696c0cf3e4fe6d9a3bd39a1", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 143, + "comment" : "Modified r or s, e.g. by adding or subtracting the order of the group", + "msg" : "313233343030", + "sig" : "3065023034a42eda6d8a881c6a3369fd89db629c9b61904c86019726ed8db04fc617bda742990a70fcf7dfd92a9e2527dd4db44c023100c0bb0ee1bffc6c7b74609ec20c460ec47f4d068f33d6018740159862804edf982b33669b69693f30c1b019265c42c65f", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 144, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020100020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 145, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020100020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 146, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201000201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 147, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020100023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 148, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020100023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 149, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020100023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 150, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020100023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 151, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020100023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 152, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3008020100090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 153, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020100090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 154, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020101020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 155, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020101020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 156, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201010201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 157, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020101023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 158, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020101023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 159, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020101023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 160, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020101023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 161, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036020101023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 162, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3008020101090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 163, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3006020101090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 164, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201ff020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 165, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201ff020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 166, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201ff0201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 167, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30360201ff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 168, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30360201ff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 169, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30360201ff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 170, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30360201ff023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 171, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30360201ff023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 172, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30080201ff090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 173, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "30060201ff090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 174, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 175, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 176, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc529730201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 177, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 178, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 179, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 180, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 181, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 182, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3038023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 183, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 184, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 185, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 186, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc529720201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 187, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 188, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 189, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 190, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 191, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 192, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3038023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 193, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 194, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 195, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 196, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc529740201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 197, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 198, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 199, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 200, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 201, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 202, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3038023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 203, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 204, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 205, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 206, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff0201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 207, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 208, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 209, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 210, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 211, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 212, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3038023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 213, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 214, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000020100", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 215, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000020101", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 216, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000001000000000201ff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 217, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 218, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 219, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52974", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 220, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 221, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 222, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3038023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000090380fe01", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 223, + "comment" : "Signature with special case values for r and s", + "msg" : "313233343030", + "sig" : "3036023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff000000000000000100000000090142", + "result" : "invalid", + "flags" : [ + "EdgeCase" + ] + }, + { + "tcId" : 224, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "30060201010c0130", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 225, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "30050201010c00", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 226, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "30090c0225730c03732573", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 227, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "30080201013003020100", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 228, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "3003020101", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 229, + "comment" : "Signature encoding contains wrong types.", + "msg" : "313233343030", + "sig" : "3006020101010100", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 230, + "comment" : "Edge case for Shamir multiplication", + "msg" : "3337333130", + "sig" : "3066023100ac042e13ab83394692019170707bc21dd3d7b8d233d11b651757085bdd5767eabbb85322984f14437335de0cdf565684023100c1045ed26ae9e8aabf5307db317f60e8c2842f67df81da26633d831ae5e061a5ef850d7d49f085d566d92cfd9f152d46", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 231, + "comment" : "special case hash", + "msg" : "3131353534393035383139", + "sig" : "306402300c0b82be4c36d506063fc963133c14d5014d65c9eb796ee8a8387120119ccc16b57302b6ccb19a846b7762375b3c97180230285919259f684f56f89cbaa789ef13e185fd24d09dcd46ce794aedc4e5b4a3820535213abb7c4e605b02200fbeb3227c", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 232, + "comment" : "special case hash", + "msg" : "32363831393031303832", + "sig" : "306502307da99d7e8bb505cc5f12706d5eb7669336a61a726a5b376ff96d678a621f38681bc78592cd06717cb87753daf0d39b77023100ca91cdb78f21950877b69db1418a3e9b5799b3464f1fa223c7ac8d6fa9f647f2a08109935ad67477c96bbf1a2a127a1d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 233, + "comment" : "special case hash", + "msg" : "38333336353438363931", + "sig" : "30640230204d322af7178ac20b39a42723fb1f8329b105993e09dbdcabf3e0eaa0a08d54719e06ba704691295a56be7765b5fd7402303b526de3e47e69518d4fbc0833a5785074c3f4eef27b9f0fc48481514931e43235b81e51d2b577b1739964ef25d8faad", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 234, + "comment" : "special case hash", + "msg" : "33363235303538313232", + "sig" : "30650231009d4adb54f52349cc73322ffc946bf44a1a1bb954bd4b58f912be068ce05272a12479bbb0f778a9faf8f9f2e9324bd5e902301eee2f98406c30728da3b2b533c387108cc67fc24abdb6bdab686f207f0a75cc9c3b4d4ea9427d881c47d419ed7a1b95", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 235, + "comment" : "special case hash", + "msg" : "33323739333237313834", + "sig" : "3066023100ae50b1aaad54efbe007f1da7d50ec00cf1100f904fd8f4940ef48f364031dc1284ab984e018105e6d368bb5a47c25022023100a803fb0156a10e42d4294a764a1da9c3e0c8320bd1a83544ff46751a777bbce23985669e43ff63fcdbac34d68f42de56", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 236, + "comment" : "special case hash", + "msg" : "383836363432313439", + "sig" : "3066023100bc65644acb7dcf72bbf937e781d6de7bca052adcad474e3a2b06795a18db7b89d246a485d696b2b8d07c07d2ba2e2929023100af811cb9772b4b3f1eed358b722a5b28a21617aea7eb6f9371b68a8d1eb7232def267ba56a6220f66a03c3ed7cd322e1", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 237, + "comment" : "special case hash", + "msg" : "32333737393036313539", + "sig" : "3066023100f6205c154a9cd38a1fc9a18c7bf6350699c95144268ba4ca182a5c8d50b780d468aa9beb8115f8ec489558891ecd6d65023100863f41412ab418fe037fd688a9f6c509bc5535b2c6b5ad7bf9486fb0e5b02136219aca2cdd9d5d63f9140e6d1d054201", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 238, + "comment" : "special case hash", + "msg" : "38303833323436363234", + "sig" : "3066023100aedf7382965359c9abff67f0fad2be6b84d760ac95da1c656989f19938b046371e101e8bab9a0ae9b9ad2bc242a982010231009175511515a01096b4d77cc505c60facfceb1841948442448e5c9f24204f817eb20d12479305e82ee5a34bd73ebb04ad", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 239, + "comment" : "special case hash", + "msg" : "31343832353634393539", + "sig" : "3066023100bcc696d8d3445960e00c9f76f277e5fa3267224d0187ad120f9c074597eeafcb6c7f22f51900351848855b20072afdae023100935dfc4f7b48ac01116e5cf194fd2feed3cb28e72cba8485f1d94e5d20f5f4147a1ca3d6496bbe915913d21c4f5afbaf", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 240, + "comment" : "special case hash", + "msg" : "33303635303732353033", + "sig" : "3066023100c029e49048921647659a042eb533004ea3487f22a7f2c471c43a5a2326dd03ac24386242c05698194b5c6171f08bb7cc023100a92ed5f2c736e27711384a131c464f73852a7dd167b27c63020040d8de991a390ad76627d597ccfebed809f2f7f57b26", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 241, + "comment" : "special case hash", + "msg" : "31343932313138323033", + "sig" : "306402300f5e1771ba1957fe8794c23776832ea40ec4fda999186f6c365f4749f07893cb55e972658c2d3b39a7b485193ff1d71902303967983d1da9dcf0105ddc383f599539d4b32b1bb8dae1a6fe0afbc9bff1e0952a32f08d161b3979a60bb6e49b6c7d7a", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 242, + "comment" : "special case hash", + "msg" : "353535333230313336", + "sig" : "306502300939874c2f67090a900ad7399df78c6005fc4673e23b155df7471b31debd2174fea94e00180ddc1a86609eda8830b449023100c9d71934a7222e415a01692c7274e5097d580dfe74175dfc0055feddfb414c1ae857051ce12c0ff25d5372751456622a", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 243, + "comment" : "special case hash", + "msg" : "333331373032303036", + "sig" : "3066023100c35b9eaa9a03a36ba52b7ab207ff48925a0188d288b1ed25d7de8bc203e8ef912a01891eab8f8e3a7d0a948a26d35ab1023100cf04105208f10af61240da6073cc39278fdadc0578bf40bbd0b0f601ed791e041a90a09d7c423a83f6cd047d745c4f24", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 244, + "comment" : "special case hash", + "msg" : "373531313832333938", + "sig" : "306502306c1fffcc270c9bf108289b42514e57e3f29ea0f1b3fbfc10ea283b3e6d2a4438d591fb7274c9ffee15009cd9e340f106023100de38043b47c7d5ab21d8ec5a35758f1a69ee59ea6df525884a04210172e7421f2a49f5921a4eac40b278f6e7c49474f4", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 245, + "comment" : "special case hash", + "msg" : "3737303439353436343831", + "sig" : "3065023100ecc637f3d32bc9a1ec20f025af72eb03df49f27901fef6b58d226b6eaa9faa6374f87c2aaaecd69946f3777fb9d4581e023048f6a06b296a17d84dd26ffded0c5dccf177e6df9a7710b0406fedfd269b2c220f11c1e02cea42c18ccac768c64ba7eb", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 246, + "comment" : "special case hash", + "msg" : "34323539303733303333", + "sig" : "306502307dcf9ded94532d50e9a2ac971642da0de95a1ca95500621174113c1d554f21bb2d175b5beacdd73443043c6cc8eaf105023100d4da518de6b8c05c640a3e7a1540482d935c4dfdca7544daf94ac8135804127b93665e1191b66bdb0089c49802c33fb1", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 247, + "comment" : "special case hash", + "msg" : "31343139373133353036", + "sig" : "30660231008209054bb408eed6ab65f4bb76223d509ea24d02cbbc5273145bcb40189052540e565fbf50474f83db3da054a793c863023100b8169b12568ffa03c0e37d4a19911e9f4af7cd256343a36e41cd7b41395524235e86d55c647f288fe5cef2b5401e4413", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 248, + "comment" : "special case hash", + "msg" : "3231393238333534363838", + "sig" : "30660231009fe969770d630bb938ca2282536f71f3dc461071186216d940eca10fc53c4e7ef067bca237bd6a82eafef0fb8d38050e023100b23a042178fdea5da86229c08a51227f23e31b1e2345defa12ed7041bec31f87837ba4764721823ea9f1e652d536c5ed", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 249, + "comment" : "special case hash", + "msg" : "36363235393934383739", + "sig" : "30640230459be510bca760f75aca10e41efb7ff64b78fb9711e72f224373b9af14f2c042b68b15bb189b3d7ccaed9318936543c90230579c07e99fc9891498ef3109360017052cb20bafb290ca2ffa64a72cf01e38e12770ba0ad5e190d2ef10c2d294e099a2", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 250, + "comment" : "special case hash", + "msg" : "393538343937303836", + "sig" : "306502302bc3bb18191a5bfe6d13c735104d78dd947854cf1d93017695119c8f04ebb44d7a7fffe71d15b78e0c2c28765bbdfc38023100a9051dd102b20e3c69a01a36b85a1ccea670da784038989145e3cd9108b064d6d54f7df21164adb91b3850cd005ff68d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 251, + "comment" : "special case hash", + "msg" : "32353939333434393638", + "sig" : "3065023100fe2c0567483ecbc6086a24160200a9ce91e6cf52df6d25b2ab08fedcc4ca95cbb6be68b58870c10169264f3b3e8d552e023034b7ef7c580506d29b1ef8223e2131602dad9fbcbce6f846de42519faecfa612a82e999cbfed45f377b77ae5ef0b4835", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 252, + "comment" : "special case hash", + "msg" : "36323332343733393531", + "sig" : "3064023009296917f12fb3bbe2c69c9bbbccf8a400d7e0b31c453ff7e928a7e4347a185435490790f56a5a819271192d64d612da0230163860e1f6390c0ada261d2d0346b49f18ec3b17e0389e4c3b2296382bc23d6576bb968120cfd24ce735a14d3167f203", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 253, + "comment" : "special case hash", + "msg" : "3737363033313033323137", + "sig" : "30650231009bf980d1d91fa0daf73e3bcc02c7773503f291b3378c96700ecd71aed81fb8ff47d4baa8b6782842f227a9314f343e4402304342d335dd870f4a1b817b519ab184710c2c79b6329ae3f87b735e48874b6e47950db7c8f0fba59a349112bd2b3d9eba", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 254, + "comment" : "special case hash", + "msg" : "38393534383338363735", + "sig" : "306502303f9b09855b47d180d60fe6ac427458a452ad72678d13818d1a28a376b31fd7d1c67e70ec234c40fab7d17719f7caa27c023100dc1d5765bc5c266a39e1a94085983ccc63cb41556e3733330c98934c329eb7e724e12cadd082da23952b831bcc197f18", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 255, + "comment" : "special case hash", + "msg" : "32343533383530303035", + "sig" : "30650231008c6910c012fb1a5b45032b09f2cfdbc7c3b22b0e18a0cc0ec4adc296cbfca66832379456b867ad1a0184ab1a80af59ee02303d87fec6feb833d01e4f77a306441fd27f328d01f6c20eef9b185ad4723c46f5d15e7be0db1c496018b4fa1987ac6b78", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 256, + "comment" : "special case hash", + "msg" : "32363934383137303236", + "sig" : "30650231008cb0ad263557318156ffde6b45cb6ca8633c3b50b51454605dd01242dda44c9cc5b59b327e919629a9f73720e53a5e6302304f2a0cd11c7ac03425e25d84bb44149117903cc4638e2f64450e2a915b14c6d9c74f70c4f85d6036bc604a92f9b97166", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 257, + "comment" : "special case hash", + "msg" : "343331323036323937", + "sig" : "3065023017d2c9d32253234b36a02e59f99163913a7c11a723f7122c521dba2cdec36bdcd1837c8b60a916aa64ed32b2c400d23a023100821fb503cb89385bf9a6288ce6559cb69652e8bf940ccd0fa88aae2e72d31ac7d7cf51433ee45889094f51a4cc17272d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 258, + "comment" : "special case hash", + "msg" : "33323031313936373336", + "sig" : "3065023100b2e6fbb2a70af41654fb5d632fcbf9dc8a8a362394e42d13e086e7da261aa980b49c4a610a367973f798b9aa9df6d0d102306d237b3161ec602529eecb5c7c706020f82b8040ccf7082576e3caef5e8d6cd87c46a8f3ea9947b18d1a35c83494d849", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 259, + "comment" : "special case hash", + "msg" : "32383330303038353932", + "sig" : "3065023100a6927125459e31afc31810117677c6ec2ba27c3ee5cc5fafbbd74153d3d2b2f7c7411e564c09d582dd2d5a201ec2b0fa02306e14a3955d24c4ac4f8c035f5edaf74e45ebd95a27954bb1c11fdb00fbc7156e96318d33725c0666006ae0573f7df785", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 260, + "comment" : "special case hash", + "msg" : "383834323632353236", + "sig" : "3065023100d0f8e8a570a0462ea8ccb980789acbf243cbe946522ae4e9e6fa7e5e8e1bc006c8b84915355f00f39a61dbe77d2b4b9a02300f1ed97929bd7cd633f835086d2241a7b7d8f857b94f71e30b3e9bd19863a401834d01d29d32399006e8f84e0852e3d3", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 261, + "comment" : "special case hash", + "msg" : "3132333434393638393037", + "sig" : "3064023019e5a38c81ae167c70ef4a1879b7dba0dfaf5dc8a841269e82b106c6ea3f9e3f7e162b8c561d8f1b7b4a2cfba4c8a925023008c41e654d262ea6e1d2f74cd99ef479cb36476b2dac5bf0f250d87f7115bdcb59ddda54abf3b3b77471348facc0c8de", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 262, + "comment" : "special case hash", + "msg" : "353439323433353935", + "sig" : "3066023100e47a0dd0507717c29d0e482037d7fd001eff3b80013688085ae430d46edb23cab8df8716d078c6503e38a1cf6a9e74f2023100edaf65e609db0925dff88d252791db4a008d9b46e5e6da98e23a766a8a35b8df79ec189d272429dd64ca60983462daef", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 263, + "comment" : "special case hash", + "msg" : "33303832383235333337", + "sig" : "3065023035d47a723521553ea0440e6dea660439c51b80e896877b03b0c02ffabcecd86e6cfed2e4fcd80d76c97ef945b626b025023100dd61311a4d0eb024288fae55abef6f0fdaf71a55cd3ccb2f8ba8d43ef36dd5562c07d2b4ef60e04ec4c696fcd052185e", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 264, + "comment" : "special case hash", + "msg" : "38303337353732353536", + "sig" : "306502305319f4a01c4e88261146de213d65e55c2532d9a535bc8c47cd940fd2b7b5bb363e1932bdacc9a196cde39368d86a14f50231008afea330d833a1f3310aafef6bc27b684838ef3e57ac7e36c02e0dbf9e33b934dc7afa7418aabc3e6b0841eff09bc470", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 265, + "comment" : "special case hash", + "msg" : "373734343739383034", + "sig" : "306402305c51106927cb275b54a7c90f6ba69902f1b1a19e2ac4b76b8d1e41b86f14ff32bbc66f07d4be610ccde84af4e14011810230551d9901408a4d9a1a85fa17de0c7bc49b15bccfae095247fc256a048582610b6ba87bd89dc98859dba2df76d77aff2e", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 266, + "comment" : "special case hash", + "msg" : "3133333732303536333833", + "sig" : "3066023100e931ac049c0b7bd9060a58b0f78d8d0b60f57caf647fe6476802c9baae7e06062fe3d1a1f0c6345dc7c530db32cad843023100b83867f656b9fea099ca0678bd62f2013238bbd6969a2384e0cb2488dad615a4d91dbdf7908426c9ea9ecf17b872a25e", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 267, + "comment" : "special case hash", + "msg" : "35313832373036353336", + "sig" : "3065023100d4ccc6e89e85ffcca4b9e32fd45c5be1585d20c35ec83253f3080b0705746f0f5e7e92043b5ae8fd95963e45b4199213023048448f45ad0fc8d20fd1dbd088bdf6d51577f79a1e5e55432ea79d84eefe0b9b55ba145d637be5a686477fe00e1fb481", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 268, + "comment" : "special case hash", + "msg" : "34303337363939303936", + "sig" : "306402306d3ea919365f9f39fe1f9b8c17415766f4c2b77c8393dc8cef321af5b4aa955646643ac32b2220b7590deadec15b88af02304d64a4fb9e26aaeec0d92270becbb5e2f04d812b2bb8b86cb1744437e62e58dc72f98ecafeadae69aef3328953143490", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 269, + "comment" : "special case hash", + "msg" : "3131343230303039363832", + "sig" : "306402307774080a80e32087c8e923c65522c76648205d9804805bdf05977c4559eeacc518560920e55f626748ae12034745f7bc02301bfbb5bcaff2b70298456fd8145bbcc6d150d9f2c3d91d6ed0f3d7eacc16456f698138ab34a546195941a68d7e92f3be", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 270, + "comment" : "special case hash", + "msg" : "33323037353534303132", + "sig" : "3065023100b8232417c371ecc56ef6342abecfa42afe479ad1cfcb18f8945ab0e2076621c185c2821a8028c36f1f2a8d3be7fc3442023017a0f7c15403a3fba3d8f095cd7eea597df761dc46e5c8122a3fffabb9fe37c52232e7f49af7e7cbaad8ed62dee8a371", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 271, + "comment" : "special case hash", + "msg" : "32383536323335373531", + "sig" : "30650231009a5e7ac2a195f5859a0753087da0a2ac20a8bacc551d4c19b10fffe6b7acdd3ca6543957c9f7be8bedd33e89df7ba5940230106cb9821f8aadaf7a7c411df6ca3bde9b6d4a267e4a43ffa9d5d29cc973f3ca4d776351b82586be7d6e2c251726b3ec", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 272, + "comment" : "special case hash", + "msg" : "32363736343535323539", + "sig" : "306502301cdc96cc7892322075399aac7e0a86d4ffdb6e45153c0afa98bfd912941c22d05f360fba6f8734542eb55375b26d38aa0231008ec452f8acbbef3ebbff11e6bf349032b610e87946a6221cccb5055c18d1f1188b6254a60113ed8adc6d0b09fb2f3fd4", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 273, + "comment" : "special case hash", + "msg" : "32313832323433303137", + "sig" : "3065023100937d4df90d09299bd32bf354e1121a311a77ba0274e7b847804a40d5b72ecb8e9e441afc5289e0337ca1195a4951c1e902307e442371b9991905f417e4e67ead31621bc068964097a46d5bda507a804f5b3bb142ff66d07012549fc42cec38754d11", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 274, + "comment" : "special case hash", + "msg" : "353232393434373333", + "sig" : "3064023065210ed179af3b99c09b9e95dc81f77007a32002ee7d53eed567086a68a62f1c08543c85f7d1e1f081bae477ff3613fa0230025ce6efa2fe24732fe11f5b1f1232d48fa5dbcfbd62f96776302b1ac52f0d0d40549f2b2f67299569cd14fb7ead4c45", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 275, + "comment" : "special case hash", + "msg" : "343535383431313936", + "sig" : "3065023100e6a4518771467967e264a9b736aa1f8bc6f421de607fec7e93fc62d91082c979930e6a3ffdcc54d5f0f4b4a2f0665d4902304c6c625b60ab3230e6d190f37a6f14e574f8dc7595467fe89ce62d6d1f2fd198368769fc84b556a3847be26841351408", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 276, + "comment" : "special case hash", + "msg" : "3132393134353430363938", + "sig" : "306502306388afc6cae9421ba6c52a640a0ebcb9c547505f500307194c8c1eb41cac959686ffa7b3a2adda65136030cba17d1695023100cb1e148645580dea5a87c60db7c818942d55f169fc59eda9a2177a001ecc1bcbf2d519d67d79fba44daa2945bd380c52", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 277, + "comment" : "special case hash", + "msg" : "32323730323132343635", + "sig" : "306402302d7f29f767ba2f21619347bf29494a318eee949e91181ed7d2cf61162b92f0747c308885891b1734e9b6d5d3705475a902301c34c2ce61e3dca2bb3202b6c4320155f764fc58d318ba44df9a7c06a0a453ee43b633353dbcfe129a54ddc8b6a27e13", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 278, + "comment" : "special case hash", + "msg" : "35313732353737303635", + "sig" : "3064023068a8758fb66c0ee50309490852f214f6bd09dd888f35390163defa70647202983ebabff3791287d016164c945494edf90230099a2c1073815916cebd4a41448e1b8dc9bb150465adf99c8a965b5fb327bb879e1b34f8d7c509aa1b018f98c9e13e40", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 279, + "comment" : "special case hash", + "msg" : "31333835393530373037", + "sig" : "306402307ff134c055bda5bba91fa53da5ff90c501a6264abd8db5ced03e9eb88ee63325f267a8fe483b0f7f129434d2e2114705023011649294f067d415681ca6cf6245b0beadcb4095b8e9c9d18bf11ebae41ecafde7529796286ec2efa9073de2f9025e3d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 280, + "comment" : "special case hash", + "msg" : "3634333837383033373037", + "sig" : "30660231009dfc836f6a993e1aeba9fe4b4e09901b83a5439a0ede150ab583c217fc22154050eb9c4a2f1f0f75c06139549d3013ee023100ed83ee554777a5086ac90b9654f724507a54e5651b4d38153ac7576cf8dc9487be7d3efca544ff4b4804981efbda10d7", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 281, + "comment" : "special case hash", + "msg" : "34383637313133303632", + "sig" : "3065023100fd614924d6325daf270efbff4db11d645ec9b1f903fd36e1543bbd536ee010d07dd154fdc945a57f52f239439279f42f0230079edf2f7ab361f7542bfd9175dd41ec137bc00d997943720e164e7187585a487a1893cde536b1dc52cdc0baa1fc2183", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 282, + "comment" : "special case hash", + "msg" : "3133343239363139303533", + "sig" : "3066023100eb55101d2d489c0151d991b0e486016222997b917363f8c48386683091297819662ccc34381d5e5ec1c0c43d137232e0023100d8bd992c2e0ab4fe46a4b43dc3b5103c123ca38e88e3c555385a6fc8ece7d9c957776667f389a950bca4b2ad6503c48b", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 283, + "comment" : "special case hash", + "msg" : "35303634343932363338", + "sig" : "3065023100f29aea476f19eacc44749f6057d39c6da903ba5c5b5667694145a6fe053ee08abed1d6869d3830036a29b063b295e67f02302decfc3e7d8cf0391f8e21714eeef04fa4f660a404294bcab6cdf23e4fa9e44997694781c49f4539a8d5b0dfa55603f1", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 284, + "comment" : "special case hash", + "msg" : "3232373339393133", + "sig" : "306402304b55c6c5f0264ddd31b88a92072d3a8f33b28306716d5430c0ff8fbc37d9ddf1e4a60e4e496b355f77ed005b51e352be023054d6da5a6385fa10e97c21b5bdb732a9a9c0685883da74f1f8dea0ae497b7609b3aa4ee92f448144ea2c5529ec2fc016", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 285, + "comment" : "special case hash", + "msg" : "32333932353736393433", + "sig" : "306402306024ed7ee8ef3edc593a9d07856b9aa78972ff33b82608c93e7068bcac05e0c5048889c8d520351047fa80f050abf83a02300d221dba3ef2d3c14923a651bd2b803603fbc94634033d52a66d80ea6120976c8fadc7274d05ccd47e1d06a63310b6c6", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 286, + "comment" : "special case hash", + "msg" : "32343435323032373632", + "sig" : "3066023100fab3f2cf338bd7bf46dada597a4f66cbeb336393e4a289e21f8a02a6428bcd5fe66e87bdd3b5072997f94b76f04d9aa6023100ad0c0f1d9c4f8a4b5100e183dee6d5d6825296784cb8205d448204237f5d3435f4c8f0a4fef81890c5a5a028405330da", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 287, + "comment" : "special case hash", + "msg" : "37353934393639363532", + "sig" : "3065023015cd4339b568212b20856d8397e5c5aebf3b4e4eafd8c90adc2dfe93f928e8a8bf17ec307064ba866491d4b44440d116023100ba9357237d9d6b22be6761f63d91a265d1dc08cc693ae14576200d6aa7322eca439eea414634f5666c22ab29c67fbcdb", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 288, + "comment" : "special case hash", + "msg" : "31303134363536343631", + "sig" : "30660231009d2deb753b8e16e6f24e1b718000daa0d4617242225f1b91192b1ea8acdca607b05f1c0da8e3cdbdc52f448a376f13b10231008654d2738725423c0934c20b28327f7a5ac53a61f296a5ce562c8684d2f3090d19811fe70dbce71f106c4060740981ec", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 289, + "comment" : "special case hash", + "msg" : "39373034363738313139", + "sig" : "306402301c7c8d1c493bdb1f1290f04aed3c4a7cb0a83c36330a4fab50e68f235777579dd06a073a3857f226dae511a2569e928d023014e5058d70b7cfb04cfb0c3c1d3d6fe500328340860e4b7cc2b5f11cab09cba0c7b887274453ab30d9164c73fc1f6f36", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 290, + "comment" : "special case hash", + "msg" : "343131303338333134", + "sig" : "3066023100cade486e6a8e78141b15dbe60095e42d8196fafd843c722c8c686a60063e701f30d8a488c2a18a63635a13bc8ff0a787023100ed7aa0208952d2d452432ffa1bbf7146080911cf7e87aa848ee90314b2afe427a80cd70187b3ac3572a360d4db6b17e5", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 291, + "comment" : "special case hash", + "msg" : "353437383438353336", + "sig" : "306502302787240e7fd6d895098d1773733727ee5792fe644b0774b8530ddd758b347143d1939bb7c9a3312774cf7126e499f5ab023100ad215cb6681f287ffb96a6e7c41331a2e773e68791391c658f2e5c95cf82e3871e49c9fff08f7b540848c1a7cee2ab85", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 292, + "comment" : "special case hash", + "msg" : "33333738363732383631", + "sig" : "3066023100aa92d0b7d6046210024b962fd79d1a27ee69c25936e5895cd92224b3f560829c11de20e7f52320bba91b87c4c7ef4962023100816c95ee54c677c4be1ba70317a90aaf1c1d2f233fd480d22cab453d9539657ce695e21952e6157ce3460680dc2fdbf2", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 293, + "comment" : "special case hash", + "msg" : "313636353734353639", + "sig" : "306502304eda9fc1e0df8ef24f3148f8a737a76eceddfa6057441c877816ac402349f32571c8074611179968e6fe7cfc1f41a80b023100e0549e78e774377dffb9e742f05f5b1a1a2198571d0f2243fd25703029e0effac2808fad1c82efbdf0063d6032df33dc", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 294, + "comment" : "special case hash", + "msg" : "363431343037363435", + "sig" : "3065023018a83b96dbd10de3a62fdab7142f201f9f480447bf000f6ee314da64d2351bbc7bb94cd1c551dee4828a603e6a853fca0231008fbf2a1a7ad4ed76a08748f41f5b3468a9a7cda57503aa71c455292bde2dc88a2580a65a6859d20f924aa7a5cea3743d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 295, + "comment" : "special case hash", + "msg" : "32303833363036303631", + "sig" : "306502302fb5726226521d1105cdd22e84ff46a36768ee4d71e6f5cfe720ddbd36ad645c05a7207c9f7cae2d8236d965ff64f943023100ac3f8b7841b31c95f27e99a86413b6aa9086fcdbd176f7de65a696d76edcb0775f2e257db75fa5aa716946f3d80b1cea", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 296, + "comment" : "special case hash", + "msg" : "32383235303436303231", + "sig" : "306502302a38f4cc1da426f15d8c8dbed58608eec86862554f4d6d503dc6e162e72754b1298ad4508ae2a93d493c836b19548c4c0231009b51610514136d5dcfda3c4736a839288bc1f043ea362cf6e56dce3f4337204d5bdf92160a034f459b30410872dbeb0d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 297, + "comment" : "special case hash", + "msg" : "313432323938323834", + "sig" : "306502303407844641a75ba72ed05f9b7289ea2c8f9015c97e8d7aacec4a88b374a255371b19e7a2e7949f4b78b63334b4984434023100cee117c6fb8f8e47ce33357d7ed1a82b1ed912be3778eda9de303b2ee910c014eee3cf03e27f16fd94d7ed5a8e8c7b05", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 298, + "comment" : "special case hash", + "msg" : "32313636343232303939", + "sig" : "3066023100b98e1313e62ff0155158059e422cb6e8ce70d103f1a95a77e1795ef2ae38a42596732405602299ee730b81e948083adf0231008a34134e86354d26f343343c05cdb46350b610ad16883f234e847fad97047ee4b8dfecd0bf77479b65643f9c35b74441", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 299, + "comment" : "special case hash", + "msg" : "31343830313930313632", + "sig" : "306502300ae0a9cbd0de42e6590835374548708df9671208ab72e23bf7aa4329bbd0d4a696e99d04d36534e895737b468cff08ea0231008c8b6bb101ee844bc75cd2b3b32ea9c3b6c2ac5408c26f6a444335d730af2dce6f4bf1bf4585428e902f901eed10da62", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 300, + "comment" : "special case hash", + "msg" : "35323138393734303738", + "sig" : "3066023100cf0310487690de93d344bba957a1ba380f72c2ae44975f69716b2aa2a866787dfc46629825ef19e5528395d872ff9367023100ff60a995865b6f5e6ffc15884e5901d55f384ffc62982e54a9c2dccaf7543246673c5bfe710f2a29daca77de766ee9ee", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 301, + "comment" : "special case hash", + "msg" : "3130343538383435393733", + "sig" : "306502304a0f3d91ef6b9b6e512cd9c996f8e896717ea8c6d685834e4c31bcaf592a93d0f0b169efeb0ea52a5bea6be361d7a7b3023100c3d429d0daf1ee7c2bf4a0bc8f10cd7ce453b8e2a762b31885d36f5e03cdae3adb693bc2efe8a64d6e7bbc17f23b5500", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 302, + "comment" : "special case hash", + "msg" : "343839323235333334", + "sig" : "3065023040f82935328e34e31f1966bd0bc1dfc2adf1d71d86fc6dd0f9e9e1930dfc357e30fa67722c562dd84cdb73fb715b622d023100cf40658591f34527587b0969a45ca5a30f87dbcf0b058f75c158ac883d52119030881c0aeb1f8e12682d06d072705550", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 303, + "comment" : "special case hash", + "msg" : "35303433393832313335", + "sig" : "3065023100a3434df3d065f4b32957077f429bccdaa8875981006ce880585c160fca1f552dc6334583d7698226e650e95d86a896b7023054e2eb28c70796e3bea9f2fdc3799f7d6dde5b3cc84de7448296d65fd8a44260b0666cefa416adda5046f45a5b8a9ae7", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 304, + "comment" : "special case hash", + "msg" : "3132393833353030363939", + "sig" : "3066023100b54b004489e12ec91e875f3062dff1f1bd0407e216162b4913a34f19943c8f967c1f7250ff0ce5f43a0b250bb9fae16b02310095c13a702ca6269ed8cac69291e01767c0f862648b0961238ef0b6be88cd316973a290bae4f50147816a49ab014a7d69", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 305, + "comment" : "special case hash", + "msg" : "3131333236373331343032", + "sig" : "3066023100ea28a6b9158328d0711bfd10019643648e695c1fa9df2a7c2e1a6d3b03b6703bc763f8f0c701d7b925d35075da783f38023100b4bb6b034288af213ecabdcc2d55610181ba77b26673b1490e7e08a43f6e57fe20618a5adc7fbfcbe255fa79655aaeb1", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 306, + "comment" : "special case hash", + "msg" : "33353733323839303232", + "sig" : "3065023100d973f5fa26a7069dac82790097db0d93dfc52a490ac2a84960c6dc52c2e84d2df1917c8d194789fe8981be40fbefb00602301dc1ab55752add3952ee3f5d86bb167ed1fdf20e19d5c893c1a6031c1a2b70701ba03cf7d78b89331d524c5dcf38462a", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 307, + "comment" : "special case hash", + "msg" : "3131373339353634333738", + "sig" : "306402303d4ed5e71127a0da4aa63cc1d7ce517a450370dff65ef95b4185a44199181ec5ff70f80f6d7435e6bec4d6e58e73591b023027b2d65bf08ab8e745544225181638af5df08b85c9f7a9057e1605f145b3a1389661d9c990d0f4d82636dc6332b6941d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 308, + "comment" : "special case hash", + "msg" : "3733383230373935303035", + "sig" : "3065023100e36ffc2ca7e62c2fe35c7761a78ae2839d1503b437cc7a89eee28ec74d75d2948c7a3148070ad715f7ce8260c160611d02300c18edef913d63ac220cd4b28aef1cd43aa9acf7b0fe889c4a28ac22934e46aa2a99a5b803a61471bd5bfeef8c86b17b", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 309, + "comment" : "special case hash", + "msg" : "34353233333738383430", + "sig" : "30640230148906bcfc686aa3f608321d17a425373bd9ce2f47a35a6a01124992cba56e744daef2b00dececff63ed96d5d7c2e15802304303a5c7049766956679f204e655301dc16fe9cd85f6ebb1997410e0d2029240181c946d86800cc6ba882f276603db29", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 310, + "comment" : "special case hash", + "msg" : "39303239363535323738", + "sig" : "306502305264c26ceb0481b74472f26ecca4459785a2d63c9494d8744e42e9eea5799bfb0fa95ff3c8a5de2868098a025110bbe9023100e1858d96c814dbd39ca5dbde824be0894b4e418fe51306784a8fd0680850a5b32958714ae9124e9ad6372412212df1be", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 311, + "comment" : "special case hash", + "msg" : "36363030353238363330", + "sig" : "30650230273e229dddfaa7ba5763c8563f3a05c7d2d2471331225e8f26a20e0ae656115c62ddfac3895f10012253ba7bb79a65ca02310089a6ab6fd5bca31659278ac3f3e79ded9a47a6fd166fc746b79fc3bd9d21e5f332bb1e89a14efcd3647f94aff9715aba", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 312, + "comment" : "special case hash", + "msg" : "38333639343536343136", + "sig" : "3066023100f447dcc8ce6573a2da5fd58a3974f46a8d76608e477742b68c2e93245f359567a953cd18dc1d95fa7e3c5d02210cfc0e023100b273a9ce5a021a66f6a44f2ae94f2f5fab6e3b5016648c9df38756a5b7e71d07aa453240d39bef0d22afab1e19095694", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 313, + "comment" : "special case hash", + "msg" : "3130303139393230373030", + "sig" : "30660231009378874a38f221b27d8b7ab06d827130d0db2e9c43f443e9cdd254ef77a4f7aae589a6c1499970dd5acf516802688aa6023100f94a6319379598119bddf9f787e74b135ad193b692e44a848ac6d1d0443d49adcdcf1a9f530686e76080840e1b647be2", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 314, + "comment" : "special case hash", + "msg" : "31373032333133323830", + "sig" : "3065023100a48cc74a1d39a0b8cfcd12768277535389790c9ad2638aca42401a44e80ff0ceb40e193cd9e27e39443a1d2665de485c02301569ca82e563df78feb1d704953b8c35b7eda09259fc16ab262304d0c09383f550cfdc97ce549874212e3fc7b83f6d4b", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 315, + "comment" : "special case hash", + "msg" : "31383038393439383431", + "sig" : "3066023100e6049a43aa5761ad4193a739da84c734f39f2f79f8d97241982082185fe9cef7747b68c59ef3909f18af6c5df48ee559023100bb7800436791bae910fbfc6b69c0b7e6972dea1bd5ad82aaf97ebb85d920a15f9f5f280fd813281f36b2ae3c53fd6e41", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 316, + "comment" : "special case hash", + "msg" : "31373438323839333135", + "sig" : "30640230148d734104a52c9d58ca1ad7ba56fd35147e8d324a0923ebc9c5d8b393f492bce1da6c9d1fa68d4faeebf0868e03f17102304629809043f228f0f3adfc0696c2e9d800791ee82034c5fac37fc521e40f9bf2250c53036b8286e032959ed5f3a58483", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 317, + "comment" : "special case hash", + "msg" : "36363232313031303338", + "sig" : "3065023016762ba4645c905590e6a3dd4b1e2af693cc4e64153812f93b80ed4d1c07e664e5b22880f24a120d4b48e1400fcd3afb023100d481c2f9b255bba2ac29fe055536c3c7fa92e4f34cfdc5b5f5227f582736c87c1350bcb760069c4004ac33fbe2ed3549", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 318, + "comment" : "special case hash", + "msg" : "3132313833363339", + "sig" : "3066023100830c8c92465fc7f1a654d22eaeadf62b5fa29bebc8e184ca104913eb8bea234d287961900f308d88f9bb7387c8de58b2023100960eb635db967cd69f80123e0a43501c6161cbd9e8058f5bb7506cc24fba3a3694688b5b0e066bf2ccaecbb5a9eb0c9d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 319, + "comment" : "special case hash", + "msg" : "393535323437333036", + "sig" : "306402301377906f42629010e79bc60142234a44c78e8887f6dc4086bdc7e9bf94c92c84aaf48efb0269205b8bd6e324224df17802306f430a1937fc0463143c80a0e132074a64acc825c2f4ed8b0de03204a681bf171e9e002a88431fd388c7a906511171a4", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 320, + "comment" : "special case hash", + "msg" : "31393531393636303731", + "sig" : "3066023100d1d335dca83a7ef4770e68ff82d2bb75341abf72a362c88d8a176020db37bfd5874e14c0cb011cb316bc6e6d1322a893023100c61fc7dd9f66b8cf2f8c9a780089fe31a20608b458ea12a246a1cba34566c2d833a71bbe09482ad3c26bf9bb6088fd5a", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 321, + "comment" : "special case hash", + "msg" : "32383830303734303635", + "sig" : "30650230536183374fa37f210723fe3aabde18997be247be006e20c5d17d8e4c79790ddfe4e6f17f8823d36aceeea22c9e44ba9d023100b6a0f63b27876d1686b9e601c273c20530c765e506605cea39d9accba9a7007bb10d64333e5e22125f34d1dfc8e60461", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 322, + "comment" : "special case hash", + "msg" : "3136373937333631323130", + "sig" : "306402302fa6073fd290a699ff0a4bd425a69d4e151a3ec3faa65c504d5e41b45c2a738d343a99865690bcc22c03230c3949ce3f02303989dd2d632007c498ed830d277cc1193590f23fe5e778deeffdbb2c135258327b121a81313a0bcc9f77db206afddd8f", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 323, + "comment" : "special case hash", + "msg" : "323235353833343239", + "sig" : "3065023100cf60fb9789b449ac9b9f022dc83481777675e55f09b4cba5d8349c0e16907f8929e3b538cce4d71c01b010a633807997023067654a0bebf3a63fa93cf9906c846cf5edbb03968c86eef5e7555a14d606009006f9f9e4569be3375a9a8aa04aa20c45", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 324, + "comment" : "special case hash", + "msg" : "3236393238343433343334", + "sig" : "306402306ab23c76784d003ec508233f7f5e6461d6806c66af62c4769d45ec8751d276bdb68b2efc4fcf83f675a3101941f9adec02306f306bd6f782aba3c7d0c0d6c0e0e8897f967f0de2a84db1d67e477378ea425dcc6fc6113e5a5f67ac34eca2c69d0bdf", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 325, + "comment" : "special case hash", + "msg" : "36323734383032323238", + "sig" : "30650230526365e36472883664eb011bdf9a1503397f0e3509066665f9c276e367cf2730774d4525125cadccfef0c0cf28949a2b023100948cbaf1c0e7f0ccca5f5d2a7e4a94f4a7ec43d2cf69ae5ebecb41521daa9e618615208cb62b35809fc40401670ae3b5", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 326, + "comment" : "special case hash", + "msg" : "31313439323431363433", + "sig" : "3066023100b1cf39b023502a1aa3daca372c295c1eb3c5fee2a841ef2cfd4087ffdd4e35e8804b8d879a939216d24fae1bd1e7f19a0231008b8bea55a9625efb9733d1dcfad8d426b81c9e71fb53b246ae54c3196972d284172e6b1911bafe6b631e5e48344c4409", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04d7dea8ac1e4b9aea2d3d1ad7d6a877e116a8bcdb87c8463c69ad78f8074f33b2c179ac0580af901d21851cf15b3a5e342a088198c090b9e367695a1c7fa110b66828d8f07bafe6eb2521dd20e517cebd295cc9cce52e0c0081b4cf7fe5ea884e", + "wx" : "00d7dea8ac1e4b9aea2d3d1ad7d6a877e116a8bcdb87c8463c69ad78f8074f33b2c179ac0580af901d21851cf15b3a5e34", + "wy" : "2a088198c090b9e367695a1c7fa110b66828d8f07bafe6eb2521dd20e517cebd295cc9cce52e0c0081b4cf7fe5ea884e" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004d7dea8ac1e4b9aea2d3d1ad7d6a877e116a8bcdb87c8463c69ad78f8074f33b2c179ac0580af901d21851cf15b3a5e342a088198c090b9e367695a1c7fa110b66828d8f07bafe6eb2521dd20e517cebd295cc9cce52e0c0081b4cf7fe5ea884e", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE196orB5LmuotPRrX1qh34RaovNuHyEY8\naa14+AdPM7LBeawFgK+QHSGFHPFbOl40KgiBmMCQueNnaVocf6EQtmgo2PB7r+br\nJSHdIOUXzr0pXMnM5S4MAIG0z3/l6ohO\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 327, + "comment" : "k*G has a large x-coordinate", + "msg" : "313233343030", + "sig" : "304d0218389cb27e0bc8d21fa7e5f24cb74f58851313e696333ad68b023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52970", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 328, + "comment" : "r too large", + "msg" : "313233343030", + "sig" : "3066023100fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffe023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52970", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04cba0cc097c795cd467d835977764b7740fa480c3cad83a726d68bbfe8dbb752934eb4fb6c767dc09bdda6d0d2d057ae8e277c7ad56d6f21099d998e7bfded8c8d2d100c8ebd9f57681a633b91ad0890c020e724689c6b1b4b8f35b49679a4fa3", + "wx" : "00cba0cc097c795cd467d835977764b7740fa480c3cad83a726d68bbfe8dbb752934eb4fb6c767dc09bdda6d0d2d057ae8", + "wy" : "00e277c7ad56d6f21099d998e7bfded8c8d2d100c8ebd9f57681a633b91ad0890c020e724689c6b1b4b8f35b49679a4fa3" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004cba0cc097c795cd467d835977764b7740fa480c3cad83a726d68bbfe8dbb752934eb4fb6c767dc09bdda6d0d2d057ae8e277c7ad56d6f21099d998e7bfded8c8d2d100c8ebd9f57681a633b91ad0890c020e724689c6b1b4b8f35b49679a4fa3", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEy6DMCXx5XNRn2DWXd2S3dA+kgMPK2Dpy\nbWi7/o27dSk060+2x2fcCb3abQ0tBXro4nfHrVbW8hCZ2Zjnv97YyNLRAMjr2fV2\ngaYzuRrQiQwCDnJGicaxtLjzW0lnmk+j\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 329, + "comment" : "r,s are large", + "msg" : "313233343030", + "sig" : "3066023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52972023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52971", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04ffc271e311cefc1c133202448e2ee74457bb68951b0e575747cc6ee9c0691720bcf9eba23c18f96e845cda05e06d4f7bdc7c5d17e91f12abf3638fc8e87866f0373f0ffa90c2c759712d3fb163730a184e4707ef424ef833079c0ed5e1498344", + "wx" : "00ffc271e311cefc1c133202448e2ee74457bb68951b0e575747cc6ee9c0691720bcf9eba23c18f96e845cda05e06d4f7b", + "wy" : "00dc7c5d17e91f12abf3638fc8e87866f0373f0ffa90c2c759712d3fb163730a184e4707ef424ef833079c0ed5e1498344" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004ffc271e311cefc1c133202448e2ee74457bb68951b0e575747cc6ee9c0691720bcf9eba23c18f96e845cda05e06d4f7bdc7c5d17e91f12abf3638fc8e87866f0373f0ffa90c2c759712d3fb163730a184e4707ef424ef833079c0ed5e1498344", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE/8Jx4xHO/BwTMgJEji7nRFe7aJUbDldX\nR8xu6cBpFyC8+euiPBj5boRc2gXgbU973HxdF+kfEqvzY4/I6Hhm8Dc/D/qQwsdZ\ncS0/sWNzChhORwfvQk74MwecDtXhSYNE\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 330, + "comment" : "r and s^-1 have a large Hamming weight", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100d1aee55fdc2a716ba2fabcb57020b72e539bf05c7902f98e105bf83d4cc10c2a159a3cf7e01d749d2205f4da6bd8fcf1", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0474ae987af3a0ebd9f9a4f57be2d7d1c079c9ec7928a1da8c38ff0c2b9bd9822fa7603decc1becabd3f6ceebb353cb798e0c9ac6f4f575fa1ed2daf36224d09aa569f8b1d25b62fbaeddf766a34b9309000cce2447017a5cd8a3ce76dd5428ff1", + "wx" : "74ae987af3a0ebd9f9a4f57be2d7d1c079c9ec7928a1da8c38ff0c2b9bd9822fa7603decc1becabd3f6ceebb353cb798", + "wy" : "00e0c9ac6f4f575fa1ed2daf36224d09aa569f8b1d25b62fbaeddf766a34b9309000cce2447017a5cd8a3ce76dd5428ff1" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000474ae987af3a0ebd9f9a4f57be2d7d1c079c9ec7928a1da8c38ff0c2b9bd9822fa7603decc1becabd3f6ceebb353cb798e0c9ac6f4f575fa1ed2daf36224d09aa569f8b1d25b62fbaeddf766a34b9309000cce2447017a5cd8a3ce76dd5428ff1", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEdK6YevOg69n5pPV74tfRwHnJ7HkoodqM\nOP8MK5vZgi+nYD3swb7KvT9s7rs1PLeY4Mmsb09XX6HtLa82Ik0Jqlafix0lti+6\n7d92ajS5MJAAzOJEcBelzYo8523VQo/x\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 331, + "comment" : "r and s^-1 have a large Hamming weight", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100b6b681dc484f4f020fd3f7e626d88edc6ded1b382ef3e143d60887b51394260832d4d8f2ef70458f9fa90e38c2e19e4f", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04dc23280ae627109b86d60be0e70cec0582a5b318fa8254dfcb97045eefdf1aa272937de99c6b3972c4cd108b4fc681cc0ec5438a5d44908c479da428e5b2e4f5ae93bf82b427d8dca996e23d930700082828112faac7f710928daa670b7576cb", + "wx" : "00dc23280ae627109b86d60be0e70cec0582a5b318fa8254dfcb97045eefdf1aa272937de99c6b3972c4cd108b4fc681cc", + "wy" : "0ec5438a5d44908c479da428e5b2e4f5ae93bf82b427d8dca996e23d930700082828112faac7f710928daa670b7576cb" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004dc23280ae627109b86d60be0e70cec0582a5b318fa8254dfcb97045eefdf1aa272937de99c6b3972c4cd108b4fc681cc0ec5438a5d44908c479da428e5b2e4f5ae93bf82b427d8dca996e23d930700082828112faac7f710928daa670b7576cb", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE3CMoCuYnEJuG1gvg5wzsBYKlsxj6glTf\ny5cEXu/fGqJyk33pnGs5csTNEItPxoHMDsVDil1EkIxHnaQo5bLk9a6Tv4K0J9jc\nqZbiPZMHAAgoKBEvqsf3EJKNqmcLdXbL\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 332, + "comment" : "small r and s", + "msg" : "313233343030", + "sig" : "3006020102020101", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "049bdf0a7793d0375a896a7f3084d3c45f8dfcd7f73d045484e71128713cab49b4c218af17e048fa6dbe32f2e289ee83950be28a090c2f6769f85e5ff1cfb300bd0ae907b5d5367ede98dfd3e6a81c4b4903289973285a4ef91b790ad12761321c", + "wx" : "009bdf0a7793d0375a896a7f3084d3c45f8dfcd7f73d045484e71128713cab49b4c218af17e048fa6dbe32f2e289ee8395", + "wy" : "0be28a090c2f6769f85e5ff1cfb300bd0ae907b5d5367ede98dfd3e6a81c4b4903289973285a4ef91b790ad12761321c" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200049bdf0a7793d0375a896a7f3084d3c45f8dfcd7f73d045484e71128713cab49b4c218af17e048fa6dbe32f2e289ee83950be28a090c2f6769f85e5ff1cfb300bd0ae907b5d5367ede98dfd3e6a81c4b4903289973285a4ef91b790ad12761321c", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEm98Kd5PQN1qJan8whNPEX4381/c9BFSE\n5xEocTyrSbTCGK8X4Ej6bb4y8uKJ7oOVC+KKCQwvZ2n4Xl/xz7MAvQrpB7XVNn7e\nmN/T5qgcS0kDKJlzKFpO+Rt5CtEnYTIc\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 333, + "comment" : "small r and s", + "msg" : "313233343030", + "sig" : "3006020102020102", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0490770515f27351111e56d3bf14fe392d42186cb870374a8d40870830057bf52da8c2e27691236a0de2876893f9b77ab2fb1cb5dcfd30e3a2a0056a5dbbc1c5d626ba669cbbfe8bdb121de7cc394a61721d5c3c73a3f5dea9388cad7fbca72649", + "wx" : "0090770515f27351111e56d3bf14fe392d42186cb870374a8d40870830057bf52da8c2e27691236a0de2876893f9b77ab2", + "wy" : "00fb1cb5dcfd30e3a2a0056a5dbbc1c5d626ba669cbbfe8bdb121de7cc394a61721d5c3c73a3f5dea9388cad7fbca72649" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000490770515f27351111e56d3bf14fe392d42186cb870374a8d40870830057bf52da8c2e27691236a0de2876893f9b77ab2fb1cb5dcfd30e3a2a0056a5dbbc1c5d626ba669cbbfe8bdb121de7cc394a61721d5c3c73a3f5dea9388cad7fbca72649", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEkHcFFfJzUREeVtO/FP45LUIYbLhwN0qN\nQIcIMAV79S2owuJ2kSNqDeKHaJP5t3qy+xy13P0w46KgBWpdu8HF1ia6Zpy7/ovb\nEh3nzDlKYXIdXDxzo/XeqTiMrX+8pyZJ\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 334, + "comment" : "small r and s", + "msg" : "313233343030", + "sig" : "3006020102020103", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 335, + "comment" : "r is larger than n", + "msg" : "313233343030", + "sig" : "3036023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52975020103", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04f7f5f9382da5dd3d41cc2d4e62570b581b67dc2ad456de3af75ad1ce7be27af8a77771e67a08f2dc87ac91c5a744886cf7194e819162862cb7c39e39445da63adfe10704ef7407f1fcef062c8f86729c700da4f9e747c5c77e32dd25e7f867af", + "wx" : "00f7f5f9382da5dd3d41cc2d4e62570b581b67dc2ad456de3af75ad1ce7be27af8a77771e67a08f2dc87ac91c5a744886c", + "wy" : "00f7194e819162862cb7c39e39445da63adfe10704ef7407f1fcef062c8f86729c700da4f9e747c5c77e32dd25e7f867af" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004f7f5f9382da5dd3d41cc2d4e62570b581b67dc2ad456de3af75ad1ce7be27af8a77771e67a08f2dc87ac91c5a744886cf7194e819162862cb7c39e39445da63adfe10704ef7407f1fcef062c8f86729c700da4f9e747c5c77e32dd25e7f867af", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE9/X5OC2l3T1BzC1OYlcLWBtn3CrUVt46\n91rRznvievind3Hmegjy3IeskcWnRIhs9xlOgZFihiy3w545RF2mOt/hBwTvdAfx\n/O8GLI+GcpxwDaT550fFx34y3SXn+Gev\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 336, + "comment" : "s is larger than n", + "msg" : "313233343030", + "sig" : "3036020102023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accd7fffa", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0424f0d59e6bab85cce63823e4b075c91520e0f7090c58dbae24774ef25917cf9fab1030513f4a10b84c59df529bc1d3b12469f23a674bf49a0383d239ca15676704eab86bd3149ea041a274643866643b786bb17c5d0f10dbf2bfc775c7087cc1", + "wx" : "24f0d59e6bab85cce63823e4b075c91520e0f7090c58dbae24774ef25917cf9fab1030513f4a10b84c59df529bc1d3b1", + "wy" : "2469f23a674bf49a0383d239ca15676704eab86bd3149ea041a274643866643b786bb17c5d0f10dbf2bfc775c7087cc1" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000424f0d59e6bab85cce63823e4b075c91520e0f7090c58dbae24774ef25917cf9fab1030513f4a10b84c59df529bc1d3b12469f23a674bf49a0383d239ca15676704eab86bd3149ea041a274643866643b786bb17c5d0f10dbf2bfc775c7087cc1", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEJPDVnmurhczmOCPksHXJFSDg9wkMWNuu\nJHdO8lkXz5+rEDBRP0oQuExZ31KbwdOxJGnyOmdL9JoDg9I5yhVnZwTquGvTFJ6g\nQaJ0ZDhmZDt4a7F8XQ8Q2/K/x3XHCHzB\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 337, + "comment" : "small r and s^-1", + "msg" : "313233343030", + "sig" : "3036020201000230489122448912244891224489122448912244891224489122347ce79bc437f4d071aaa92c7d6c882ae8734dc18cb0d553", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0439833aec7515dacd9546bab8dc740417f14d200bd26041bbf43266a8644628da82dbf53097fe43dca1c92b09832466ec67f862c02c8911343a146fddc8246c168376e4166e32bad39db5be2b74e58410b4e9cc4701dd0b97ba544142e66d7715", + "wx" : "39833aec7515dacd9546bab8dc740417f14d200bd26041bbf43266a8644628da82dbf53097fe43dca1c92b09832466ec", + "wy" : "67f862c02c8911343a146fddc8246c168376e4166e32bad39db5be2b74e58410b4e9cc4701dd0b97ba544142e66d7715" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000439833aec7515dacd9546bab8dc740417f14d200bd26041bbf43266a8644628da82dbf53097fe43dca1c92b09832466ec67f862c02c8911343a146fddc8246c168376e4166e32bad39db5be2b74e58410b4e9cc4701dd0b97ba544142e66d7715", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEOYM67HUV2s2VRrq43HQEF/FNIAvSYEG7\n9DJmqGRGKNqC2/Uwl/5D3KHJKwmDJGbsZ/hiwCyJETQ6FG/dyCRsFoN25BZuMrrT\nnbW+K3TlhBC06cxHAd0Ll7pUQULmbXcV\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 338, + "comment" : "smallish r and s^-1", + "msg" : "313233343030", + "sig" : "303c02072d9b4d347952cd023100ce751512561b6f57c75342848a3ff98ccf9c3f0219b6b68d00449e6c971a85d2e2ce73554b59219d54d2083b46327351", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "046cc5f5640d396de25e6b81331c1d4feba418319f984d8a1e179da59739d0d40971585e7c02d68c9a62d426ca59128e0ffeab57963b965302cffe9645cf3ee449846381d82d5814e8ca77167ccf4c20ec54278e874f834725d22e82b910c24c2a", + "wx" : "6cc5f5640d396de25e6b81331c1d4feba418319f984d8a1e179da59739d0d40971585e7c02d68c9a62d426ca59128e0f", + "wy" : "00feab57963b965302cffe9645cf3ee449846381d82d5814e8ca77167ccf4c20ec54278e874f834725d22e82b910c24c2a" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200046cc5f5640d396de25e6b81331c1d4feba418319f984d8a1e179da59739d0d40971585e7c02d68c9a62d426ca59128e0ffeab57963b965302cffe9645cf3ee449846381d82d5814e8ca77167ccf4c20ec54278e874f834725d22e82b910c24c2a", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEbMX1ZA05beJea4EzHB1P66QYMZ+YTYoe\nF52llznQ1AlxWF58AtaMmmLUJspZEo4P/qtXljuWUwLP/pZFzz7kSYRjgdgtWBTo\nyncWfM9MIOxUJ46HT4NHJdIugrkQwkwq\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 339, + "comment" : "100-bit r and small s^-1", + "msg" : "313233343030", + "sig" : "3041020d1033e67e37b32b445580bf4efb02302ad52ad52ad52ad52ad52ad52ad52ad52ad52ad52ad52ad5215c51b320e460542f9cc38968ccdf4263684004eb79a452", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04567e0986a89e4a51ff44efdf924e9970cbdaf5796dea617f93e6e513f73cb529e7a666bd4338465c90ddd3f61823d6185b252f20921f66a72dfcd4d1e323aa05487abb16c797820f349daa04724f6a0e81423ddf74fdb17f0801d635d7af213d", + "wx" : "567e0986a89e4a51ff44efdf924e9970cbdaf5796dea617f93e6e513f73cb529e7a666bd4338465c90ddd3f61823d618", + "wy" : "5b252f20921f66a72dfcd4d1e323aa05487abb16c797820f349daa04724f6a0e81423ddf74fdb17f0801d635d7af213d" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004567e0986a89e4a51ff44efdf924e9970cbdaf5796dea617f93e6e513f73cb529e7a666bd4338465c90ddd3f61823d6185b252f20921f66a72dfcd4d1e323aa05487abb16c797820f349daa04724f6a0e81423ddf74fdb17f0801d635d7af213d", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEVn4JhqieSlH/RO/fkk6ZcMva9Xlt6mF/\nk+blE/c8tSnnpma9QzhGXJDd0/YYI9YYWyUvIJIfZqct/NTR4yOqBUh6uxbHl4IP\nNJ2qBHJPag6BQj3fdP2xfwgB1jXXryE9\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 340, + "comment" : "small r and 100 bit s^-1", + "msg" : "313233343030", + "sig" : "303602020100023077a172dfe37a2c53f0b92ab60f0a8f085f49dbfd930719d6f9e587ea68ae57cb49cd35a88cf8c6acec02f057a3807a5b", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0495512f92e55b5d18003397b822c1173f4e25a2640a4a68bb880a6ca8605cbfb83c75dbddc4937ed822e56acde8f47c7348e4ff027a1b0a2d5790f68c69923f3231ac61074caad2a022f6eabf8c258bdb8142be43ffa16a6f2c52f33cba006400", + "wx" : "0095512f92e55b5d18003397b822c1173f4e25a2640a4a68bb880a6ca8605cbfb83c75dbddc4937ed822e56acde8f47c73", + "wy" : "48e4ff027a1b0a2d5790f68c69923f3231ac61074caad2a022f6eabf8c258bdb8142be43ffa16a6f2c52f33cba006400" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000495512f92e55b5d18003397b822c1173f4e25a2640a4a68bb880a6ca8605cbfb83c75dbddc4937ed822e56acde8f47c7348e4ff027a1b0a2d5790f68c69923f3231ac61074caad2a022f6eabf8c258bdb8142be43ffa16a6f2c52f33cba006400", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAElVEvkuVbXRgAM5e4IsEXP04lomQKSmi7\niApsqGBcv7g8ddvdxJN+2CLlas3o9HxzSOT/AnobCi1XkPaMaZI/MjGsYQdMqtKg\nIvbqv4wli9uBQr5D/6FqbyxS8zy6AGQA\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 341, + "comment" : "100-bit r and s^-1", + "msg" : "313233343030", + "sig" : "3041020d062522bbd3ecbe7c39e93e7c24023077a172dfe37a2c53f0b92ab60f0a8f085f49dbfd930719d6f9e587ea68ae57cb49cd35a88cf8c6acec02f057a3807a5b", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0474d5679e10edc41eb06ba54a1de2c9c71820bbac14f3758bb7fb593dddbb2e573e0d7a785344961399da18c8f615ae1df71e1c0ea892931571da09432ac46f6cbf53129e1e3e74c567180c037df59da84c8374b295b5a0ec6100ce9d800cd05e", + "wx" : "74d5679e10edc41eb06ba54a1de2c9c71820bbac14f3758bb7fb593dddbb2e573e0d7a785344961399da18c8f615ae1d", + "wy" : "00f71e1c0ea892931571da09432ac46f6cbf53129e1e3e74c567180c037df59da84c8374b295b5a0ec6100ce9d800cd05e" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000474d5679e10edc41eb06ba54a1de2c9c71820bbac14f3758bb7fb593dddbb2e573e0d7a785344961399da18c8f615ae1df71e1c0ea892931571da09432ac46f6cbf53129e1e3e74c567180c037df59da84c8374b295b5a0ec6100ce9d800cd05e", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEdNVnnhDtxB6wa6VKHeLJxxggu6wU83WL\nt/tZPd27Llc+DXp4U0SWE5naGMj2Fa4d9x4cDqiSkxVx2glDKsRvbL9TEp4ePnTF\nZxgMA331nahMg3SylbWg7GEAzp2ADNBe\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 342, + "comment" : "r and s^-1 are close to n", + "msg" : "313233343030", + "sig" : "3065023100ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc528f3023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "041764c83ff4c28f7b690ca1c4b05832d78394f0aa48de452eb7b470526f4099d45de563b506c1570eb9b0f899a5f03f5aff89e562385d77b2c5d48dbb54501960997566bca5dcdee15848b907ee7457f8e46a221f64091c36f8d3053147c1a628", + "wx" : "1764c83ff4c28f7b690ca1c4b05832d78394f0aa48de452eb7b470526f4099d45de563b506c1570eb9b0f899a5f03f5a", + "wy" : "00ff89e562385d77b2c5d48dbb54501960997566bca5dcdee15848b907ee7457f8e46a221f64091c36f8d3053147c1a628" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200041764c83ff4c28f7b690ca1c4b05832d78394f0aa48de452eb7b470526f4099d45de563b506c1570eb9b0f899a5f03f5aff89e562385d77b2c5d48dbb54501960997566bca5dcdee15848b907ee7457f8e46a221f64091c36f8d3053147c1a628", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEF2TIP/TCj3tpDKHEsFgy14OU8KpI3kUu\nt7RwUm9AmdRd5WO1BsFXDrmw+Jml8D9a/4nlYjhdd7LF1I27VFAZYJl1Zryl3N7h\nWEi5B+50V/jkaiIfZAkcNvjTBTFHwaYo\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 343, + "comment" : "s == 1", + "msg" : "313233343030", + "sig" : "3035023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326020101", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 344, + "comment" : "s == 0", + "msg" : "313233343030", + "sig" : "3035023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326020100", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04100fd7ac4ae442ab989f94a10a1f310f799d76980d00a14418db067b144bf45fa7639446fad508b76fd3ad9c9fe55810693598529b8349a28dd1d0632039ff0897523fed9af2356c0e36612135ed629369448b97d165ae5b2fe5c5ad396d2b06", + "wx" : "100fd7ac4ae442ab989f94a10a1f310f799d76980d00a14418db067b144bf45fa7639446fad508b76fd3ad9c9fe55810", + "wy" : "693598529b8349a28dd1d0632039ff0897523fed9af2356c0e36612135ed629369448b97d165ae5b2fe5c5ad396d2b06" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004100fd7ac4ae442ab989f94a10a1f310f799d76980d00a14418db067b144bf45fa7639446fad508b76fd3ad9c9fe55810693598529b8349a28dd1d0632039ff0897523fed9af2356c0e36612135ed629369448b97d165ae5b2fe5c5ad396d2b06", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEA/XrErkQquYn5ShCh8xD3mddpgNAKFE\nGNsGexRL9F+nY5RG+tUIt2/TrZyf5VgQaTWYUpuDSaKN0dBjIDn/CJdSP+2a8jVs\nDjZhITXtYpNpRIuX0WWuWy/lxa05bSsG\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 345, + "comment" : "point at infinity during verify", + "msg" : "313233343030", + "sig" : "306402307fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294b9023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04d9a08d4f9f8708471e2e6b04ce08750c395b80f4a14169123e2fd97556c1171d82e87165a77b2dfd089ad25382ef4251517d0c26bebfce8483bfb089243d82eb0e712a7d2e7f71f9abb82ddf16c2e525146c7dc5686fb7ad334022ad092d32a4", + "wx" : "00d9a08d4f9f8708471e2e6b04ce08750c395b80f4a14169123e2fd97556c1171d82e87165a77b2dfd089ad25382ef4251", + "wy" : "517d0c26bebfce8483bfb089243d82eb0e712a7d2e7f71f9abb82ddf16c2e525146c7dc5686fb7ad334022ad092d32a4" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004d9a08d4f9f8708471e2e6b04ce08750c395b80f4a14169123e2fd97556c1171d82e87165a77b2dfd089ad25382ef4251517d0c26bebfce8483bfb089243d82eb0e712a7d2e7f71f9abb82ddf16c2e525146c7dc5686fb7ad334022ad092d32a4", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE2aCNT5+HCEceLmsEzgh1DDlbgPShQWkS\nPi/ZdVbBFx2C6HFlp3st/Qia0lOC70JRUX0MJr6/zoSDv7CJJD2C6w5xKn0uf3H5\nq7gt3xbC5SUUbH3FaG+3rTNAIq0JLTKk\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 346, + "comment" : "edge case for signature malleability", + "msg" : "313233343030", + "sig" : "306402307fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294b902307fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294b9", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0468133653284ee7e9a8cccf584a9e4f06bc31a3eb031999f0229db7c2b10630424c7ee7513e40319e3972c1a5152d5d28a547a17df730d86278de44cc099643ebe1f07e48618de255bc672dff63c58f86b2db29c89f109147d8d6be1f03c466e5", + "wx" : "68133653284ee7e9a8cccf584a9e4f06bc31a3eb031999f0229db7c2b10630424c7ee7513e40319e3972c1a5152d5d28", + "wy" : "00a547a17df730d86278de44cc099643ebe1f07e48618de255bc672dff63c58f86b2db29c89f109147d8d6be1f03c466e5" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000468133653284ee7e9a8cccf584a9e4f06bc31a3eb031999f0229db7c2b10630424c7ee7513e40319e3972c1a5152d5d28a547a17df730d86278de44cc099643ebe1f07e48618de255bc672dff63c58f86b2db29c89f109147d8d6be1f03c466e5", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEaBM2UyhO5+mozM9YSp5PBrwxo+sDGZnw\nIp23wrEGMEJMfudRPkAxnjlywaUVLV0opUehffcw2GJ43kTMCZZD6+HwfkhhjeJV\nvGct/2PFj4ay2ynInxCRR9jWvh8DxGbl\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 347, + "comment" : "edge case for signature malleability", + "msg" : "313233343030", + "sig" : "306402307fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294b902307fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294ba", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04233c399596e090c132c8e8b33c2ed443d73ab9abafaece5e47c6a6dc82d3fcc006ebf8b5b1c5fd028c97097909d5be38035f777dffaac0ef909bbe6be4e01ecfae3b36b2ea2095e352c179737980f96124d45b76677274d975eda57436f453de", + "wx" : "233c399596e090c132c8e8b33c2ed443d73ab9abafaece5e47c6a6dc82d3fcc006ebf8b5b1c5fd028c97097909d5be38", + "wy" : "035f777dffaac0ef909bbe6be4e01ecfae3b36b2ea2095e352c179737980f96124d45b76677274d975eda57436f453de" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004233c399596e090c132c8e8b33c2ed443d73ab9abafaece5e47c6a6dc82d3fcc006ebf8b5b1c5fd028c97097909d5be38035f777dffaac0ef909bbe6be4e01ecfae3b36b2ea2095e352c179737980f96124d45b76677274d975eda57436f453de", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEIzw5lZbgkMEyyOizPC7UQ9c6uauvrs5e\nR8am3ILT/MAG6/i1scX9AoyXCXkJ1b44A193ff+qwO+Qm75r5OAez647NrLqIJXj\nUsF5c3mA+WEk1Ft2Z3J02XXtpXQ29FPe\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 348, + "comment" : "u1 == 1", + "msg" : "313233343030", + "sig" : "3065023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326023100f8723083bde48fae6e2f3ba5d836c2e954aec113030836fb978c08ab1b5a3dfe54aa2fab2423747e3b4fa70ec744894c", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04357931297f6a369df1e1835ae66a97229c2ab63a75a55a9db2cdbf2e8582c7c0d8aa79f2c337e4e01980d7d84fd7991706b1de385965ae26fc38ab2b18a8ea60e52faea5c2e27666913858917cb1cf5b5c0bdc9c1498389c1db155e54d3198e2", + "wx" : "357931297f6a369df1e1835ae66a97229c2ab63a75a55a9db2cdbf2e8582c7c0d8aa79f2c337e4e01980d7d84fd79917", + "wy" : "06b1de385965ae26fc38ab2b18a8ea60e52faea5c2e27666913858917cb1cf5b5c0bdc9c1498389c1db155e54d3198e2" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004357931297f6a369df1e1835ae66a97229c2ab63a75a55a9db2cdbf2e8582c7c0d8aa79f2c337e4e01980d7d84fd7991706b1de385965ae26fc38ab2b18a8ea60e52faea5c2e27666913858917cb1cf5b5c0bdc9c1498389c1db155e54d3198e2", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAENXkxKX9qNp3x4YNa5mqXIpwqtjp1pVqd\nss2/LoWCx8DYqnnywzfk4BmA19hP15kXBrHeOFllrib8OKsrGKjqYOUvrqXC4nZm\nkThYkXyxz1tcC9ycFJg4nB2xVeVNMZji\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 349, + "comment" : "u1 == n - 1", + "msg" : "313233343030", + "sig" : "3064023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec63260230078dcf7c421b705191d0c45a27c93d16ab513eecfcf7c9042fd744d6d8dcefe1036fde07248d32fcb19c725c0580a027", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04b760dcee338ca73c8cc69f0360d87253ef3632d302bdbf743a65f8762ecea207a5c5aff3add177378e133378d2c83a40abcba73c686f35e13d1cb44197bd763b5221d3b17ca7d888bbbc52eb2c33462036dd7a3b569290cb586d9e6514d69b92", + "wx" : "00b760dcee338ca73c8cc69f0360d87253ef3632d302bdbf743a65f8762ecea207a5c5aff3add177378e133378d2c83a40", + "wy" : "00abcba73c686f35e13d1cb44197bd763b5221d3b17ca7d888bbbc52eb2c33462036dd7a3b569290cb586d9e6514d69b92" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004b760dcee338ca73c8cc69f0360d87253ef3632d302bdbf743a65f8762ecea207a5c5aff3add177378e133378d2c83a40abcba73c686f35e13d1cb44197bd763b5221d3b17ca7d888bbbc52eb2c33462036dd7a3b569290cb586d9e6514d69b92", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEt2Dc7jOMpzyMxp8DYNhyU+82MtMCvb90\nOmX4di7Oogelxa/zrdF3N44TM3jSyDpAq8unPGhvNeE9HLRBl712O1Ih07F8p9iI\nu7xS6ywzRiA23Xo7VpKQy1htnmUU1puS\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 350, + "comment" : "u2 == 1", + "msg" : "313233343030", + "sig" : "3064023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04fa8f96db8c7c9350d90ab49baaa941a79ebe62f017d54b6f83854f430408926e4a46335e44e1d67f0f18c7db2d70ca93b65df386caa193875fe91740214526a2ed17393d8bb62bdcee9f887802bc2d76ca9a304b94e795032956c8608c0e7f46", + "wx" : "00fa8f96db8c7c9350d90ab49baaa941a79ebe62f017d54b6f83854f430408926e4a46335e44e1d67f0f18c7db2d70ca93", + "wy" : "00b65df386caa193875fe91740214526a2ed17393d8bb62bdcee9f887802bc2d76ca9a304b94e795032956c8608c0e7f46" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004fa8f96db8c7c9350d90ab49baaa941a79ebe62f017d54b6f83854f430408926e4a46335e44e1d67f0f18c7db2d70ca93b65df386caa193875fe91740214526a2ed17393d8bb62bdcee9f887802bc2d76ca9a304b94e795032956c8608c0e7f46", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+o+W24x8k1DZCrSbqqlBp56+YvAX1Utv\ng4VPQwQIkm5KRjNeROHWfw8Yx9stcMqTtl3zhsqhk4df6RdAIUUmou0XOT2Ltivc\n7p+IeAK8LXbKmjBLlOeVAylWyGCMDn9G\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 351, + "comment" : "u2 == n - 1", + "msg" : "313233343030", + "sig" : "3065023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326023100aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa84ecde56a2cf73ea3abc092185cb1a51f34810f1ddd8c64d", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0469bf123fb0d38b6a1c3f01a811e16ac78f40301332a0a18454fb4bd9b7c9516520f5ace9eddad328b8d283162eed1c759fa36f89c13419404c11c2ac982777cd30aea7e621351d96ba39676c26b36ccd109035d708da63ab9aefee3c82f6d405", + "wx" : "69bf123fb0d38b6a1c3f01a811e16ac78f40301332a0a18454fb4bd9b7c9516520f5ace9eddad328b8d283162eed1c75", + "wy" : "009fa36f89c13419404c11c2ac982777cd30aea7e621351d96ba39676c26b36ccd109035d708da63ab9aefee3c82f6d405" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000469bf123fb0d38b6a1c3f01a811e16ac78f40301332a0a18454fb4bd9b7c9516520f5ace9eddad328b8d283162eed1c759fa36f89c13419404c11c2ac982777cd30aea7e621351d96ba39676c26b36ccd109035d708da63ab9aefee3c82f6d405", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEab8SP7DTi2ocPwGoEeFqx49AMBMyoKGE\nVPtL2bfJUWUg9azp7drTKLjSgxYu7Rx1n6NvicE0GUBMEcKsmCd3zTCup+YhNR2W\nujlnbCazbM0QkDXXCNpjq5rv7jyC9tQF\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 352, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023052d0bad694a1853a24ba6937481240f8718f95b10102bcfe87d95839091e14aa1c38ba8e616126d4be6fe25a426c2dc4", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "041e5863f2dafa6a4d1a10a4cb18ebe792c0154aced0c5c2abe33f727335c720693e92749795539350d8503f209da1bea56f0889c25cd0aee834431262177f43b7ddb01a75532dd55086c44c1931cdd3e0312eea51d300050130f6e754aa9f92f8", + "wx" : "1e5863f2dafa6a4d1a10a4cb18ebe792c0154aced0c5c2abe33f727335c720693e92749795539350d8503f209da1bea5", + "wy" : "6f0889c25cd0aee834431262177f43b7ddb01a75532dd55086c44c1931cdd3e0312eea51d300050130f6e754aa9f92f8" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200041e5863f2dafa6a4d1a10a4cb18ebe792c0154aced0c5c2abe33f727335c720693e92749795539350d8503f209da1bea56f0889c25cd0aee834431262177f43b7ddb01a75532dd55086c44c1931cdd3e0312eea51d300050130f6e754aa9f92f8", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEHlhj8tr6ak0aEKTLGOvnksAVSs7QxcKr\n4z9yczXHIGk+knSXlVOTUNhQPyCdob6lbwiJwlzQrug0QxJiF39Dt92wGnVTLdVQ\nhsRMGTHN0+AxLupR0wAFATD251Sqn5L4\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 353, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02302412cc835da0a4357d1b7a986a76fe42b79542258c02dd7af927b27a9f9352ed3eedb6520a422e876949cb5fd0724090", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0487fc8357860b94528775f3787406b79d7a7d65d23d1d5707e66978be71aabae87bc539c24addf6c55468cea11cfb85bf3f881573285dd3742ecf062d5321c3d5f86212ba88ae75dd3945ebb3b44c37a178d440bfd72ca8f2e7c99cf6367da248", + "wx" : "0087fc8357860b94528775f3787406b79d7a7d65d23d1d5707e66978be71aabae87bc539c24addf6c55468cea11cfb85bf", + "wy" : "3f881573285dd3742ecf062d5321c3d5f86212ba88ae75dd3945ebb3b44c37a178d440bfd72ca8f2e7c99cf6367da248" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000487fc8357860b94528775f3787406b79d7a7d65d23d1d5707e66978be71aabae87bc539c24addf6c55468cea11cfb85bf3f881573285dd3742ecf062d5321c3d5f86212ba88ae75dd3945ebb3b44c37a178d440bfd72ca8f2e7c99cf6367da248", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEh/yDV4YLlFKHdfN4dAa3nXp9ZdI9HVcH\n5ml4vnGquuh7xTnCSt32xVRozqEc+4W/P4gVcyhd03QuzwYtUyHD1fhiErqIrnXd\nOUXrs7RMN6F41EC/1yyo8ufJnPY2faJI\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 354, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02301a2303bd73ab20717627366a498a23f4afe23f30b93b0f3be65b74e5eb19f2abef049411ba50146a305c5bb98169c597", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04eebe3763025894619173c8b4397deb7febbfe10fe2d283fd303d48691ebc8ba3ab1209278e763199a18f398b9c14840598640539d7ec66d3c43bfed723292c85856f02e020deff4e468bf3bf3c7fd08391d9525a2cb4f85fbebbb7945a5853ad", + "wx" : "00eebe3763025894619173c8b4397deb7febbfe10fe2d283fd303d48691ebc8ba3ab1209278e763199a18f398b9c148405", + "wy" : "0098640539d7ec66d3c43bfed723292c85856f02e020deff4e468bf3bf3c7fd08391d9525a2cb4f85fbebbb7945a5853ad" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004eebe3763025894619173c8b4397deb7febbfe10fe2d283fd303d48691ebc8ba3ab1209278e763199a18f398b9c14840598640539d7ec66d3c43bfed723292c85856f02e020deff4e468bf3bf3c7fd08391d9525a2cb4f85fbebbb7945a5853ad", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE7r43YwJYlGGRc8i0OX3rf+u/4Q/i0oP9\nMD1IaR68i6OrEgknjnYxmaGPOYucFIQFmGQFOdfsZtPEO/7XIykshYVvAuAg3v9O\nRovzvzx/0IOR2VJaLLT4X767t5RaWFOt\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 355, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02302805e063d315ae83078dcf7c421b705191d0c45a27c93d16a277765a9f34e9a4b2e3bac6291d3ba508e5769fdbc4920b", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0441a0504da3995adb7665654b6ef7d0d00f77fcc536fc1cad41b0daca5a60dd88c99c20e698c99d5663eb532a57db08b34d2b0acb79b95b70cb0a5e2eba110061ef87f0d34b5bbfdeaf5184b67103f8a2bdcd20a7b9f09ad11811776659becb75", + "wx" : "41a0504da3995adb7665654b6ef7d0d00f77fcc536fc1cad41b0daca5a60dd88c99c20e698c99d5663eb532a57db08b3", + "wy" : "4d2b0acb79b95b70cb0a5e2eba110061ef87f0d34b5bbfdeaf5184b67103f8a2bdcd20a7b9f09ad11811776659becb75" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000441a0504da3995adb7665654b6ef7d0d00f77fcc536fc1cad41b0daca5a60dd88c99c20e698c99d5663eb532a57db08b34d2b0acb79b95b70cb0a5e2eba110061ef87f0d34b5bbfdeaf5184b67103f8a2bdcd20a7b9f09ad11811776659becb75", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEQaBQTaOZWtt2ZWVLbvfQ0A93/MU2/Byt\nQbDaylpg3YjJnCDmmMmdVmPrUypX2wizTSsKy3m5W3DLCl4uuhEAYe+H8NNLW7/e\nr1GEtnED+KK9zSCnufCa0RgRd2ZZvst1\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 356, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02305e063d315ae83078dcf7c421b705191d0c45a27c93d16ab4ff23e510c4a79cd1fa8a24dc1a179d3e092a72bc5c391080", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0445c152c4e642f156b50ef6252f2b0cdd36f20cfacbe389fd79e2fbf19f0810cfbfe5d157d2fcc9b2a649e9675fd86c074eeaab3bec18eff3b702e0e0f5c40ce928ae48161e06833ef3d76fa743c51b2711ca7c06cfc3a20ab804066251d2a115", + "wx" : "45c152c4e642f156b50ef6252f2b0cdd36f20cfacbe389fd79e2fbf19f0810cfbfe5d157d2fcc9b2a649e9675fd86c07", + "wy" : "4eeaab3bec18eff3b702e0e0f5c40ce928ae48161e06833ef3d76fa743c51b2711ca7c06cfc3a20ab804066251d2a115" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000445c152c4e642f156b50ef6252f2b0cdd36f20cfacbe389fd79e2fbf19f0810cfbfe5d157d2fcc9b2a649e9675fd86c074eeaab3bec18eff3b702e0e0f5c40ce928ae48161e06833ef3d76fa743c51b2711ca7c06cfc3a20ab804066251d2a115", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAERcFSxOZC8Va1DvYlLysM3TbyDPrL44n9\neeL78Z8IEM+/5dFX0vzJsqZJ6Wdf2GwHTuqrO+wY7/O3AuDg9cQM6SiuSBYeBoM+\n89dvp0PFGycRynwGz8OiCrgEBmJR0qEV\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 357, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100bc0c7a62b5d060f1b9ef88436e0a323a188b44f927a2d569fe47ca21894f39a3f51449b8342f3a7c1254e578b8722100", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "045f6849efa9aafd6a4030018579e39d241df4c192e5ba78c6e9b441aabdac8eb8f4b353865c1c9127ecccca468c41a561ec501582456fe6396643c368d2b9735c47384dbdcf2cc16927ab9b327c36350fe7e1f949e7ce14e60b1c1dbec8dff5f0", + "wx" : "5f6849efa9aafd6a4030018579e39d241df4c192e5ba78c6e9b441aabdac8eb8f4b353865c1c9127ecccca468c41a561", + "wy" : "00ec501582456fe6396643c368d2b9735c47384dbdcf2cc16927ab9b327c36350fe7e1f949e7ce14e60b1c1dbec8dff5f0" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200045f6849efa9aafd6a4030018579e39d241df4c192e5ba78c6e9b441aabdac8eb8f4b353865c1c9127ecccca468c41a561ec501582456fe6396643c368d2b9735c47384dbdcf2cc16927ab9b327c36350fe7e1f949e7ce14e60b1c1dbec8dff5f0", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEX2hJ76mq/WpAMAGFeeOdJB30wZLlunjG\n6bRBqr2sjrj0s1OGXByRJ+zMykaMQaVh7FAVgkVv5jlmQ8No0rlzXEc4Tb3PLMFp\nJ6ubMnw2NQ/n4flJ584U5gscHb7I3/Xw\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 358, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100d315ae83078dcf7c421b705191d0c45a27c93d16ab513eecce49d6742e48c5aa2b36ea79df9d9e3277247c3d843d5887", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04c3ecd74e383f55b7ec8cf0579e6fedb9863ee0a82cc84cf13854dc1017aecb2a5969f15194a9ccb09e823559fcd7b6f11faa3cd553119de6efd237b9a84dfe520694ba373c8b60d5b2e741b35bbdd9cfa635353a1f0cf47042881684a96fe516", + "wx" : "00c3ecd74e383f55b7ec8cf0579e6fedb9863ee0a82cc84cf13854dc1017aecb2a5969f15194a9ccb09e823559fcd7b6f1", + "wy" : "1faa3cd553119de6efd237b9a84dfe520694ba373c8b60d5b2e741b35bbdd9cfa635353a1f0cf47042881684a96fe516" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004c3ecd74e383f55b7ec8cf0579e6fedb9863ee0a82cc84cf13854dc1017aecb2a5969f15194a9ccb09e823559fcd7b6f11faa3cd553119de6efd237b9a84dfe520694ba373c8b60d5b2e741b35bbdd9cfa635353a1f0cf47042881684a96fe516", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEw+zXTjg/VbfsjPBXnm/tuYY+4KgsyEzx\nOFTcEBeuyypZafFRlKnMsJ6CNVn817bxH6o81VMRnebv0je5qE3+UgaUujc8i2DV\nsudBs1u92c+mNTU6Hwz0cEKIFoSpb+UW\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 359, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100e2c087faeed9abb45e3942a10187bd6d2df94757e2584ca7599b3385119bc57f7573f71dfcc9161dd86a91096695d236", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04e4efcd7525aa87a1390ca91cd3f0ad38613384377278c4e29b14264ca550e6e57e6c6559df830065caf902a2f8df41adff1121276e4228ac454d62994ca1a3cd24d500a90ddaaee2e5203da658504292bd81b62c4024a8fd4d0725e6a07c254a", + "wx" : "00e4efcd7525aa87a1390ca91cd3f0ad38613384377278c4e29b14264ca550e6e57e6c6559df830065caf902a2f8df41ad", + "wy" : "00ff1121276e4228ac454d62994ca1a3cd24d500a90ddaaee2e5203da658504292bd81b62c4024a8fd4d0725e6a07c254a" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004e4efcd7525aa87a1390ca91cd3f0ad38613384377278c4e29b14264ca550e6e57e6c6559df830065caf902a2f8df41adff1121276e4228ac454d62994ca1a3cd24d500a90ddaaee2e5203da658504292bd81b62c4024a8fd4d0725e6a07c254a", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE5O/NdSWqh6E5DKkc0/CtOGEzhDdyeMTi\nmxQmTKVQ5uV+bGVZ34MAZcr5AqL430Gt/xEhJ25CKKxFTWKZTKGjzSTVAKkN2q7i\n5SA9plhQQpK9gbYsQCSo/U0HJeagfCVK\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 360, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100e727c7f2d36924d4f4fb46d5d0c752e8aabb5317b2e59419d1d54ca40b148e12b60908edf846b56e4d64224fb8d7e885", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0454a018053bf8dff69ce32e1f8c0c9ba658dffcfc1200cbd89c16996aece05b84ba945164b4bcdb4d8b6dac967ac78c47edaafea84b25520478e67b328def37e5bdb94f18f3bce507cc24161aa4297477fff23968ae367cf0c3f2f70ed2bc205d", + "wx" : "54a018053bf8dff69ce32e1f8c0c9ba658dffcfc1200cbd89c16996aece05b84ba945164b4bcdb4d8b6dac967ac78c47", + "wy" : "00edaafea84b25520478e67b328def37e5bdb94f18f3bce507cc24161aa4297477fff23968ae367cf0c3f2f70ed2bc205d" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000454a018053bf8dff69ce32e1f8c0c9ba658dffcfc1200cbd89c16996aece05b84ba945164b4bcdb4d8b6dac967ac78c47edaafea84b25520478e67b328def37e5bdb94f18f3bce507cc24161aa4297477fff23968ae367cf0c3f2f70ed2bc205d", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEVKAYBTv43/ac4y4fjAybpljf/PwSAMvY\nnBaZauzgW4S6lFFktLzbTYttrJZ6x4xH7ar+qEslUgR45nsyje835b25TxjzvOUH\nzCQWGqQpdHf/8jlorjZ88MPy9w7SvCBd\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 361, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100ad2f45296b5e7ac5db4596c8b7edbf078e706a4efefd43013f89f548eb1919353be15323e74f80a62e7c37108a58fbaf", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0468828912c312ed14280c954102f2d4ab06d58bd9e7abd0afcafa0c349d0f09100bc5c91156cefeb9d3e33721f5d1d5f469cc3a91967d5b964963044ea966e4a3e2488f3be4232f1a8723d2956c687240fb2f92d456bea0b087b1007b444141a9", + "wx" : "68828912c312ed14280c954102f2d4ab06d58bd9e7abd0afcafa0c349d0f09100bc5c91156cefeb9d3e33721f5d1d5f4", + "wy" : "69cc3a91967d5b964963044ea966e4a3e2488f3be4232f1a8723d2956c687240fb2f92d456bea0b087b1007b444141a9" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000468828912c312ed14280c954102f2d4ab06d58bd9e7abd0afcafa0c349d0f09100bc5c91156cefeb9d3e33721f5d1d5f469cc3a91967d5b964963044ea966e4a3e2488f3be4232f1a8723d2956c687240fb2f92d456bea0b087b1007b444141a9", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEaIKJEsMS7RQoDJVBAvLUqwbVi9nnq9Cv\nyvoMNJ0PCRALxckRVs7+udPjNyH10dX0acw6kZZ9W5ZJYwROqWbko+JIjzvkIy8a\nhyPSlWxockD7L5LUVr6gsIexAHtEQUGp\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 362, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02310083c6e7be210db828c8e8622d13e49e8b55a89f767e7be481fb9d492c668a0ee02dc4f5dcb69eed3bcf4445e36922e4cd", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "041dc3d0da27139b88b61893d1bdee2e5fce3dcd8c4b65e1861ad0886068d32d905d343c4567ab20903f43beb1f5e3059a3cb44b0793c790e3f65bf78799755a8f40107cae627b57fbc03181f65b12416ba5f5fed566a95dc4b1b93a1a63550811", + "wx" : "1dc3d0da27139b88b61893d1bdee2e5fce3dcd8c4b65e1861ad0886068d32d905d343c4567ab20903f43beb1f5e3059a", + "wy" : "3cb44b0793c790e3f65bf78799755a8f40107cae627b57fbc03181f65b12416ba5f5fed566a95dc4b1b93a1a63550811" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200041dc3d0da27139b88b61893d1bdee2e5fce3dcd8c4b65e1861ad0886068d32d905d343c4567ab20903f43beb1f5e3059a3cb44b0793c790e3f65bf78799755a8f40107cae627b57fbc03181f65b12416ba5f5fed566a95dc4b1b93a1a63550811", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEHcPQ2icTm4i2GJPRve4uX849zYxLZeGG\nGtCIYGjTLZBdNDxFZ6sgkD9DvrH14wWaPLRLB5PHkOP2W/eHmXVaj0AQfK5ie1f7\nwDGB9lsSQWul9f7VZqldxLG5OhpjVQgR\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 363, + "comment" : "edge case for u1", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd0231008d1181deb9d59038bb139b3524c511fa57f11f985c9d879dd6df6133efa89045a38f50e201805df28ea43a9227177785", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0485d1e93894969ef05e85263e3751285abf14ce1fb1a947d99ab869e61249ab515224ab3b0f322be36c90a3a1522f83ab88fcdd8457e34a9e8105d361fb3711b544e4684aac178a3217505bb894e851181033d7c756d572abcea1aa7bb1e10c6e", + "wx" : "0085d1e93894969ef05e85263e3751285abf14ce1fb1a947d99ab869e61249ab515224ab3b0f322be36c90a3a1522f83ab", + "wy" : "0088fcdd8457e34a9e8105d361fb3711b544e4684aac178a3217505bb894e851181033d7c756d572abcea1aa7bb1e10c6e" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000485d1e93894969ef05e85263e3751285abf14ce1fb1a947d99ab869e61249ab515224ab3b0f322be36c90a3a1522f83ab88fcdd8457e34a9e8105d361fb3711b544e4684aac178a3217505bb894e851181033d7c756d572abcea1aa7bb1e10c6e", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEhdHpOJSWnvBehSY+N1EoWr8Uzh+xqUfZ\nmrhp5hJJq1FSJKs7DzIr42yQo6FSL4OriPzdhFfjSp6BBdNh+zcRtUTkaEqsF4oy\nF1BbuJToURgQM9fHVtVyq86hqnux4Qxu\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 364, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02307fffffffffffffffffffffffffffffffffffffffffffffffed2119d5fc12649fc808af3b6d9037d3a44eb32399970dd0", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04609b7164d1e196a5596bef71b34a8fb4eacbbea10fd41d126c16ea3578d893e898c413805230c7fd7e33ee832be72120c2e379c857c01d95b53daf382fa5c196705c7f927ab3dcd8e6aa6bd4fe6767c56c178dcc1bbde32ea00afdc1a4f59fa6", + "wx" : "609b7164d1e196a5596bef71b34a8fb4eacbbea10fd41d126c16ea3578d893e898c413805230c7fd7e33ee832be72120", + "wy" : "00c2e379c857c01d95b53daf382fa5c196705c7f927ab3dcd8e6aa6bd4fe6767c56c178dcc1bbde32ea00afdc1a4f59fa6" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004609b7164d1e196a5596bef71b34a8fb4eacbbea10fd41d126c16ea3578d893e898c413805230c7fd7e33ee832be72120c2e379c857c01d95b53daf382fa5c196705c7f927ab3dcd8e6aa6bd4fe6767c56c178dcc1bbde32ea00afdc1a4f59fa6", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEYJtxZNHhlqVZa+9xs0qPtOrLvqEP1B0S\nbBbqNXjYk+iYxBOAUjDH/X4z7oMr5yEgwuN5yFfAHZW1Pa84L6XBlnBcf5J6s9zY\n5qpr1P5nZ8VsF43MG73jLqAK/cGk9Z+m\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 365, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023079b95c013b0472de04d8faeec3b779c39fe729ea84fb554cd091c7178c2f054eabbc62c3e1cfbac2c2e69d7aa45d9072", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "046f557ef52d480ea476d4e6bb8eb4c5a959eacf2ee66613dc784fff1660f246a1765e916d20ac0dbc4543303294772d12daba49f78c8a65d8946aab0a806140136516cff6725267865e9f93e4052e072ae984f3e975e7792b67b5b1807160d429", + "wx" : "6f557ef52d480ea476d4e6bb8eb4c5a959eacf2ee66613dc784fff1660f246a1765e916d20ac0dbc4543303294772d12", + "wy" : "00daba49f78c8a65d8946aab0a806140136516cff6725267865e9f93e4052e072ae984f3e975e7792b67b5b1807160d429" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200046f557ef52d480ea476d4e6bb8eb4c5a959eacf2ee66613dc784fff1660f246a1765e916d20ac0dbc4543303294772d12daba49f78c8a65d8946aab0a806140136516cff6725267865e9f93e4052e072ae984f3e975e7792b67b5b1807160d429", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEb1V+9S1IDqR21Oa7jrTFqVnqzy7mZhPc\neE//FmDyRqF2XpFtIKwNvEVDMDKUdy0S2rpJ94yKZdiUaqsKgGFAE2UWz/ZyUmeG\nXp+T5AUuByrphPPpded5K2e1sYBxYNQp\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 366, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100bfd40d0caa4d9d42381f3d72a25683f52b03a1ed96fb72d03f08dcb9a8bc8f23c1a459deab03bcd39396c0d1e9053c81", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04f07a94c4b1dd878c2b4507549ad7557cf70f7286b95d7b7b48a0491a635379c0032d21d3fbb289bb5b7214e2372d88ee38934125ec56253ef4b841373aea5451b6e55b7e8e999922980c0508dc4ffd5df70627c30a2026afbf99ef318e445c78", + "wx" : "00f07a94c4b1dd878c2b4507549ad7557cf70f7286b95d7b7b48a0491a635379c0032d21d3fbb289bb5b7214e2372d88ee", + "wy" : "38934125ec56253ef4b841373aea5451b6e55b7e8e999922980c0508dc4ffd5df70627c30a2026afbf99ef318e445c78" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004f07a94c4b1dd878c2b4507549ad7557cf70f7286b95d7b7b48a0491a635379c0032d21d3fbb289bb5b7214e2372d88ee38934125ec56253ef4b841373aea5451b6e55b7e8e999922980c0508dc4ffd5df70627c30a2026afbf99ef318e445c78", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE8HqUxLHdh4wrRQdUmtdVfPcPcoa5XXt7\nSKBJGmNTecADLSHT+7KJu1tyFOI3LYjuOJNBJexWJT70uEE3OupUUbblW36OmZki\nmAwFCNxP/V33BifDCiAmr7+Z7zGORFx4\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 367, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02304c7d219db9af94ce7fffffffffffffffffffffffffffffffef15cf1058c8d8ba1e634c4122db95ec1facd4bb13ebf09a", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0461f352564999c69ce86c0336c9a9a9baddcf4555b675183ea27f682a7b0661250ff7d2d00672880e7d3fd5329b4d19a31f28c529832d0b336633e3ef2b0bf97007a61b7e427c9d2ca1fc2910b0cc685d409ec423bf2f5211742b8d3b33d2f04a", + "wx" : "61f352564999c69ce86c0336c9a9a9baddcf4555b675183ea27f682a7b0661250ff7d2d00672880e7d3fd5329b4d19a3", + "wy" : "1f28c529832d0b336633e3ef2b0bf97007a61b7e427c9d2ca1fc2910b0cc685d409ec423bf2f5211742b8d3b33d2f04a" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000461f352564999c69ce86c0336c9a9a9baddcf4555b675183ea27f682a7b0661250ff7d2d00672880e7d3fd5329b4d19a31f28c529832d0b336633e3ef2b0bf97007a61b7e427c9d2ca1fc2910b0cc685d409ec423bf2f5211742b8d3b33d2f04a", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEYfNSVkmZxpzobAM2yamput3PRVW2dRg+\non9oKnsGYSUP99LQBnKIDn0/1TKbTRmjHyjFKYMtCzNmM+PvKwv5cAemG35CfJ0s\nofwpELDMaF1AnsQjvy9SEXQrjTsz0vBK\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 368, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100d219db9af94ce7ffffffffffffffffffffffffffffffffffd189bdb6d9ef7be8504ca374756ea5b8f15e44067d209b9b", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04d23d62e8f8c286da7a8e2aaaad9b759c6852da31639ebddf7b4e4fd1ebe26806caef21c9fdccced05cbe1332bce4bd4d899480daf03c5918b474d9dac0742ed97aa622d18b747c4446191b5639abc708c02ff97147b5092cc1395da611476001", + "wx" : "00d23d62e8f8c286da7a8e2aaaad9b759c6852da31639ebddf7b4e4fd1ebe26806caef21c9fdccced05cbe1332bce4bd4d", + "wy" : "00899480daf03c5918b474d9dac0742ed97aa622d18b747c4446191b5639abc708c02ff97147b5092cc1395da611476001" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004d23d62e8f8c286da7a8e2aaaad9b759c6852da31639ebddf7b4e4fd1ebe26806caef21c9fdccced05cbe1332bce4bd4d899480daf03c5918b474d9dac0742ed97aa622d18b747c4446191b5639abc708c02ff97147b5092cc1395da611476001", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE0j1i6PjChtp6jiqqrZt1nGhS2jFjnr3f\ne05P0eviaAbK7yHJ/czO0Fy+EzK85L1NiZSA2vA8WRi0dNnawHQu2XqmItGLdHxE\nRhkbVjmrxwjAL/lxR7UJLME5XaYRR2AB\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 369, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100a433b735f299cfffffffffffffffffffffffffffffffffffdbb02debbfa7c9f1487f3936a22ca3f6f5d06ea22d7c0dc3", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04d1c1d5980bb20f6622b35b87f020a53d73fe7d148178df52a91964b541311bd88e00b35834238a0bc1401f9c3ea0c3e3a50b861b701099048e0b36ec57b724b781f5c9e9d38eb345dd77eab0cb58b4fdea44e358bc6a6ae4d17476eb444bc61c", + "wx" : "00d1c1d5980bb20f6622b35b87f020a53d73fe7d148178df52a91964b541311bd88e00b35834238a0bc1401f9c3ea0c3e3", + "wy" : "00a50b861b701099048e0b36ec57b724b781f5c9e9d38eb345dd77eab0cb58b4fdea44e358bc6a6ae4d17476eb444bc61c" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004d1c1d5980bb20f6622b35b87f020a53d73fe7d148178df52a91964b541311bd88e00b35834238a0bc1401f9c3ea0c3e3a50b861b701099048e0b36ec57b724b781f5c9e9d38eb345dd77eab0cb58b4fdea44e358bc6a6ae4d17476eb444bc61c", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE0cHVmAuyD2Yis1uH8CClPXP+fRSBeN9S\nqRlktUExG9iOALNYNCOKC8FAH5w+oMPjpQuGG3AQmQSOCzbsV7ckt4H1yenTjrNF\n3XfqsMtYtP3qRONYvGpq5NF0dutES8Yc\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 370, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100b9af94ce7fffffffffffffffffffffffffffffffffffffffd6efeefc876c9f23217b443c80637ef939e911219f96c179", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "046626339de05be6e5b2e15c47253ad621ae13fd4d5de4e4a038eb2127fe33fd5b898cd059a43ec09d186fbf24ed8c00d19251db17bc71d07b53e8d094c61b8e3049e040da95a885e4e476a445f7bfc3705f8c66a7f7d95f0697b9bf2eff9e4cc0", + "wx" : "6626339de05be6e5b2e15c47253ad621ae13fd4d5de4e4a038eb2127fe33fd5b898cd059a43ec09d186fbf24ed8c00d1", + "wy" : "009251db17bc71d07b53e8d094c61b8e3049e040da95a885e4e476a445f7bfc3705f8c66a7f7d95f0697b9bf2eff9e4cc0" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200046626339de05be6e5b2e15c47253ad621ae13fd4d5de4e4a038eb2127fe33fd5b898cd059a43ec09d186fbf24ed8c00d19251db17bc71d07b53e8d094c61b8e3049e040da95a885e4e476a445f7bfc3705f8c66a7f7d95f0697b9bf2eff9e4cc0", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEZiYzneBb5uWy4VxHJTrWIa4T/U1d5OSg\nOOshJ/4z/VuJjNBZpD7AnRhvvyTtjADRklHbF7xx0HtT6NCUxhuOMEngQNqVqIXk\n5HakRfe/w3BfjGan99lfBpe5vy7/nkzA\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 371, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100a276276276276276276276276276276276276276276276273d7228d4f84b769be0fd57b97e4c1ebcae9a5f635e80e9df", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "046288739deb45130ee9d84c5d7a74a64d4e1a829a657c8f06a178438b8657169c486fe7c2610ea1a01b90731edf8e2dd81f2d7a092ecf4a08e381473f70519befd79e3b1484076fb837a9ef8065d05f62df4753a26f72162f8be10d5bdf52a9e7", + "wx" : "6288739deb45130ee9d84c5d7a74a64d4e1a829a657c8f06a178438b8657169c486fe7c2610ea1a01b90731edf8e2dd8", + "wy" : "1f2d7a092ecf4a08e381473f70519befd79e3b1484076fb837a9ef8065d05f62df4753a26f72162f8be10d5bdf52a9e7" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200046288739deb45130ee9d84c5d7a74a64d4e1a829a657c8f06a178438b8657169c486fe7c2610ea1a01b90731edf8e2dd81f2d7a092ecf4a08e381473f70519befd79e3b1484076fb837a9ef8065d05f62df4753a26f72162f8be10d5bdf52a9e7", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEYohznetFEw7p2ExdenSmTU4agpplfI8G\noXhDi4ZXFpxIb+fCYQ6hoBuQcx7fji3YHy16CS7PSgjjgUc/cFGb79eeOxSEB2+4\nN6nvgGXQX2LfR1Oib3IWL4vhDVvfUqnn\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 372, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023073333333333333333333333333333333333333333333333316e4d9f42d4eca22df403a0c578b86f0a9a93fe89995c7ed", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "042bdc91e87927364f316799ffabbfcda6fd15572255b08deb46090cd2ea351c911366b3c55383892cc6b8dd500a2cbaef9ffd06e925b733f3f017c92136a6cd096ad6d512866c52fecafc3b2d43a0d62ef1f8709d9bb5d29f595f6dbe3599ad3e", + "wx" : "2bdc91e87927364f316799ffabbfcda6fd15572255b08deb46090cd2ea351c911366b3c55383892cc6b8dd500a2cbaef", + "wy" : "009ffd06e925b733f3f017c92136a6cd096ad6d512866c52fecafc3b2d43a0d62ef1f8709d9bb5d29f595f6dbe3599ad3e" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200042bdc91e87927364f316799ffabbfcda6fd15572255b08deb46090cd2ea351c911366b3c55383892cc6b8dd500a2cbaef9ffd06e925b733f3f017c92136a6cd096ad6d512866c52fecafc3b2d43a0d62ef1f8709d9bb5d29f595f6dbe3599ad3e", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEK9yR6HknNk8xZ5n/q7/Npv0VVyJVsI3r\nRgkM0uo1HJETZrPFU4OJLMa43VAKLLrvn/0G6SW3M/PwF8khNqbNCWrW1RKGbFL+\nyvw7LUOg1i7x+HCdm7XSn1lfbb41ma0+\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 373, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02307fffffffffffffffffffffffffffffffffffffffffffffffda4233abf824c93f90115e76db206fa7489d6647332e1ba3", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "049aaa6c4c26e55fdece622d4e1b8454a7e4be9470e2e9ecd67479f2b7bb79ac9e28ba363b206ce7af5932a154980c1612cb930ccefbd759befafdb234f72e4f58e0ce770991dac7c25bc3e4c7c0765fcf1dacbc55f4430520db7bf7da401080e1", + "wx" : "009aaa6c4c26e55fdece622d4e1b8454a7e4be9470e2e9ecd67479f2b7bb79ac9e28ba363b206ce7af5932a154980c1612", + "wy" : "00cb930ccefbd759befafdb234f72e4f58e0ce770991dac7c25bc3e4c7c0765fcf1dacbc55f4430520db7bf7da401080e1" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200049aaa6c4c26e55fdece622d4e1b8454a7e4be9470e2e9ecd67479f2b7bb79ac9e28ba363b206ce7af5932a154980c1612cb930ccefbd759befafdb234f72e4f58e0ce770991dac7c25bc3e4c7c0765fcf1dacbc55f4430520db7bf7da401080e1", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEmqpsTCblX97OYi1OG4RUp+S+lHDi6ezW\ndHnyt7t5rJ4oujY7IGznr1kyoVSYDBYSy5MMzvvXWb76/bI09y5PWODOdwmR2sfC\nW8Pkx8B2X88drLxV9EMFINt799pAEIDh\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 374, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306402307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd02303fffffffffffffffffffffffffffffffffffffffffffffffe3b1a6c0fa1b96efac0d06d9245853bd76760cb5666294bb", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "049004b1043628506e37308dd0107ba02d809b1504f89948161ab7a580b9e2b6c111688f9a7db9ec1e52c987cbe06f1173f20b953d46c6172a883fb614c788bf860c456b1b08db110b09447ef0176f7222be4120128f8a198f37264efe6256af93", + "wx" : "009004b1043628506e37308dd0107ba02d809b1504f89948161ab7a580b9e2b6c111688f9a7db9ec1e52c987cbe06f1173", + "wy" : "00f20b953d46c6172a883fb614c788bf860c456b1b08db110b09447ef0176f7222be4120128f8a198f37264efe6256af93" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200049004b1043628506e37308dd0107ba02d809b1504f89948161ab7a580b9e2b6c111688f9a7db9ec1e52c987cbe06f1173f20b953d46c6172a883fb614c788bf860c456b1b08db110b09447ef0176f7222be4120128f8a198f37264efe6256af93", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEkASxBDYoUG43MI3QEHugLYCbFQT4mUgW\nGrelgLnitsERaI+afbnsHlLJh8vgbxFz8guVPUbGFyqIP7YUx4i/hgxFaxsI2xEL\nCUR+8BdvciK+QSASj4oZjzcmTv5iVq+T\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 375, + "comment" : "edge case for u2", + "msg" : "313233343030", + "sig" : "306502307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd023100dfea06865526cea11c0f9eb9512b41fa9581d0f6cb7db9680336151dce79de818cdf33c879da322740416d1e5ae532fa", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0423c5694ec8556343eaf8e7076de0c810ce26aa96fce9da325a813c4b0462553d679c70a3d9d626deac3160373bf05d11f4e0f85a87d3b08a699d6e83d0c8309e7e1646625f7caa73bed83e78b2e28d8384f2c0555bd1023701c10a2c1726a9dc", + "wx" : "23c5694ec8556343eaf8e7076de0c810ce26aa96fce9da325a813c4b0462553d679c70a3d9d626deac3160373bf05d11", + "wy" : "00f4e0f85a87d3b08a699d6e83d0c8309e7e1646625f7caa73bed83e78b2e28d8384f2c0555bd1023701c10a2c1726a9dc" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000423c5694ec8556343eaf8e7076de0c810ce26aa96fce9da325a813c4b0462553d679c70a3d9d626deac3160373bf05d11f4e0f85a87d3b08a699d6e83d0c8309e7e1646625f7caa73bed83e78b2e28d8384f2c0555bd1023701c10a2c1726a9dc", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEI8VpTshVY0Pq+OcHbeDIEM4mqpb86doy\nWoE8SwRiVT1nnHCj2dYm3qwxYDc78F0R9OD4WofTsIppnW6D0Mgwnn4WRmJffKpz\nvtg+eLLijYOE8sBVW9ECNwHBCiwXJqnc\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 376, + "comment" : "point duplication during verification", + "msg" : "313233343030", + "sig" : "3065023100b37699e0d518a4d370dbdaaaea3788850fa03f8186d1f78fdfbae6540aa670b31c8ada0fff3e737bd69520560fe0ce6002307cd374eebe35c25ce67aa38baafef7f6e470c9ec311a0bc81636f71b31b09a1c3860f70b53e285eab64133570bd7574f", + "result" : "valid", + "flags" : [ + "PointDuplication" + ] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0423c5694ec8556343eaf8e7076de0c810ce26aa96fce9da325a813c4b0462553d679c70a3d9d626deac3160373bf05d110b1f07a5782c4f759662917c2f37cf6181e9b99da083558c4127c1874d1d727b7b0d3fa9a42efdc8fe3ef5d4e8d95623", + "wx" : "23c5694ec8556343eaf8e7076de0c810ce26aa96fce9da325a813c4b0462553d679c70a3d9d626deac3160373bf05d11", + "wy" : "0b1f07a5782c4f759662917c2f37cf6181e9b99da083558c4127c1874d1d727b7b0d3fa9a42efdc8fe3ef5d4e8d95623" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000423c5694ec8556343eaf8e7076de0c810ce26aa96fce9da325a813c4b0462553d679c70a3d9d626deac3160373bf05d110b1f07a5782c4f759662917c2f37cf6181e9b99da083558c4127c1874d1d727b7b0d3fa9a42efdc8fe3ef5d4e8d95623", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEI8VpTshVY0Pq+OcHbeDIEM4mqpb86doy\nWoE8SwRiVT1nnHCj2dYm3qwxYDc78F0RCx8HpXgsT3WWYpF8LzfPYYHpuZ2gg1WM\nQSfBh00dcnt7DT+ppC79yP4+9dTo2VYj\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 377, + "comment" : "duplication bug", + "msg" : "313233343030", + "sig" : "3065023100b37699e0d518a4d370dbdaaaea3788850fa03f8186d1f78fdfbae6540aa670b31c8ada0fff3e737bd69520560fe0ce6002307cd374eebe35c25ce67aa38baafef7f6e470c9ec311a0bc81636f71b31b09a1c3860f70b53e285eab64133570bd7574f", + "result" : "invalid", + "flags" : [ + "PointDuplication" + ] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04916e5351bd3efecf755786fa77f6acfecf3b00cd496fbcdecd8d255120dfcf27b70e7fc9de74be9b15f72650b3eedfdd5bb6bcbdf478e15f77221d01d6086eae7dae44a16bdeb4afe178eb444600452789889310ad61014a3957436a59a3239a", + "wx" : "00916e5351bd3efecf755786fa77f6acfecf3b00cd496fbcdecd8d255120dfcf27b70e7fc9de74be9b15f72650b3eedfdd", + "wy" : "5bb6bcbdf478e15f77221d01d6086eae7dae44a16bdeb4afe178eb444600452789889310ad61014a3957436a59a3239a" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004916e5351bd3efecf755786fa77f6acfecf3b00cd496fbcdecd8d255120dfcf27b70e7fc9de74be9b15f72650b3eedfdd5bb6bcbdf478e15f77221d01d6086eae7dae44a16bdeb4afe178eb444600452789889310ad61014a3957436a59a3239a", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEkW5TUb0+/s91V4b6d/as/s87AM1Jb7ze\nzY0lUSDfzye3Dn/J3nS+mxX3JlCz7t/dW7a8vfR44V93Ih0B1ghurn2uRKFr3rSv\n4XjrREYARSeJiJMQrWEBSjlXQ2pZoyOa\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 378, + "comment" : "point with x-coordinate 0", + "msg" : "313233343030", + "sig" : "3035020101023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04e79f9ee594e711ae1439a237a0db174abd0b0138c4da3db1a6bc0180280b83020104580528d1030544ee4e7a17341e5c393de20f319b72e523b0b9ff9cd10cdc4a5b6b35850be57079e1afd30dbd6d4651139cfe0b16b32b074f81563009f7d9", + "wx" : "00e79f9ee594e711ae1439a237a0db174abd0b0138c4da3db1a6bc0180280b83020104580528d1030544ee4e7a17341e5c", + "wy" : "393de20f319b72e523b0b9ff9cd10cdc4a5b6b35850be57079e1afd30dbd6d4651139cfe0b16b32b074f81563009f7d9" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004e79f9ee594e711ae1439a237a0db174abd0b0138c4da3db1a6bc0180280b83020104580528d1030544ee4e7a17341e5c393de20f319b72e523b0b9ff9cd10cdc4a5b6b35850be57079e1afd30dbd6d4651139cfe0b16b32b074f81563009f7d9", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE55+e5ZTnEa4UOaI3oNsXSr0LATjE2j2x\nprwBgCgLgwIBBFgFKNEDBUTuTnoXNB5cOT3iDzGbcuUjsLn/nNEM3EpbazWFC+Vw\neeGv0w29bUZRE5z+CxazKwdPgVYwCffZ\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 379, + "comment" : "point with x-coordinate 0", + "msg" : "313233343030", + "sig" : "3065023101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023033333333333333333333333333333333333333333333333327e0a919fda4a2c644d202bd41bcee4bc8fc05155c276eb0", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "049d91680bd5ac912ddecc5b609094a8d5fd12b5d5af7c5bbff8f129d9bcedd5dea45df2d09513ec7aead188885fd278bcd968fbaba2bd7d866f6853a6d79661fd53f252ea936573f6bc7a32426c6a379d3d8c1a6b1e1a1aa7faa7ffdf5c4b0fbd", + "wx" : "009d91680bd5ac912ddecc5b609094a8d5fd12b5d5af7c5bbff8f129d9bcedd5dea45df2d09513ec7aead188885fd278bc", + "wy" : "00d968fbaba2bd7d866f6853a6d79661fd53f252ea936573f6bc7a32426c6a379d3d8c1a6b1e1a1aa7faa7ffdf5c4b0fbd" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200049d91680bd5ac912ddecc5b609094a8d5fd12b5d5af7c5bbff8f129d9bcedd5dea45df2d09513ec7aead188885fd278bcd968fbaba2bd7d866f6853a6d79661fd53f252ea936573f6bc7a32426c6a379d3d8c1a6b1e1a1aa7faa7ffdf5c4b0fbd", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEnZFoC9WskS3ezFtgkJSo1f0StdWvfFu/\n+PEp2bzt1d6kXfLQlRPseurRiIhf0ni82Wj7q6K9fYZvaFOm15Zh/VPyUuqTZXP2\nvHoyQmxqN509jBprHhoap/qn/99cSw+9\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 380, + "comment" : "comparison with point at infinity ", + "msg" : "313233343030", + "sig" : "3064023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326023033333333333333333333333333333333333333333333333327e0a919fda4a2c644d202bd41bcee4bc8fc05155c276eb0", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0466c48ea217602f3e0e77f402dfd386450c3a33f3b9a266d01cfa4d8cb9d58f19e7cc56315a5717ae27f931a8b6401aed0f47cc979e0edb9b7970ac66bc66315d3d38594dc933dfb963ccd5676efb57b14be806c0879b3cd28fe6ddeaaaf4ad92", + "wx" : "66c48ea217602f3e0e77f402dfd386450c3a33f3b9a266d01cfa4d8cb9d58f19e7cc56315a5717ae27f931a8b6401aed", + "wy" : "0f47cc979e0edb9b7970ac66bc66315d3d38594dc933dfb963ccd5676efb57b14be806c0879b3cd28fe6ddeaaaf4ad92" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000466c48ea217602f3e0e77f402dfd386450c3a33f3b9a266d01cfa4d8cb9d58f19e7cc56315a5717ae27f931a8b6401aed0f47cc979e0edb9b7970ac66bc66315d3d38594dc933dfb963ccd5676efb57b14be806c0879b3cd28fe6ddeaaaf4ad92", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEZsSOohdgLz4Od/QC39OGRQw6M/O5ombQ\nHPpNjLnVjxnnzFYxWlcXrif5Mai2QBrtD0fMl54O25t5cKxmvGYxXT04WU3JM9+5\nY8zVZ277V7FL6AbAh5s80o/m3eqq9K2S\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 381, + "comment" : "extreme value for k and edgecase s", + "msg" : "313233343030", + "sig" : "3064023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df61023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04a03d026431e0f75a9ce6cd459eb268c44d59a00bb6facd5b816a2823845e7f65c48c69cfb4841bc0ab8c981e6c491db2488eb2d9321b30ebf3f1f99da618d3311b01928ae9b23764b530e2ad41dd121b6812b7a8a80f669934dd8efb0445a962", + "wx" : "00a03d026431e0f75a9ce6cd459eb268c44d59a00bb6facd5b816a2823845e7f65c48c69cfb4841bc0ab8c981e6c491db2", + "wy" : "488eb2d9321b30ebf3f1f99da618d3311b01928ae9b23764b530e2ad41dd121b6812b7a8a80f669934dd8efb0445a962" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004a03d026431e0f75a9ce6cd459eb268c44d59a00bb6facd5b816a2823845e7f65c48c69cfb4841bc0ab8c981e6c491db2488eb2d9321b30ebf3f1f99da618d3311b01928ae9b23764b530e2ad41dd121b6812b7a8a80f669934dd8efb0445a962", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEoD0CZDHg91qc5s1FnrJoxE1ZoAu2+s1b\ngWooI4Ref2XEjGnPtIQbwKuMmB5sSR2ySI6y2TIbMOvz8fmdphjTMRsBkorpsjdk\ntTDirUHdEhtoEreoqA9mmTTdjvsERali\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 382, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3064023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df6102302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04db12e7908092c195819ea7652a2f923f678f00aa8181f3c2cb0021e268a176737d48a48ea25a48ea2b0cce3c31f1406c9c46a9b415ca03d1b309c5f4735b6ce48da4d32a0eab51772dc6bb7e63d835ea7612c92a629c058af638a5bb5354110e", + "wx" : "00db12e7908092c195819ea7652a2f923f678f00aa8181f3c2cb0021e268a176737d48a48ea25a48ea2b0cce3c31f1406c", + "wy" : "009c46a9b415ca03d1b309c5f4735b6ce48da4d32a0eab51772dc6bb7e63d835ea7612c92a629c058af638a5bb5354110e" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004db12e7908092c195819ea7652a2f923f678f00aa8181f3c2cb0021e268a176737d48a48ea25a48ea2b0cce3c31f1406c9c46a9b415ca03d1b309c5f4735b6ce48da4d32a0eab51772dc6bb7e63d835ea7612c92a629c058af638a5bb5354110e", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE2xLnkICSwZWBnqdlKi+SP2ePAKqBgfPC\nywAh4mihdnN9SKSOolpI6isMzjwx8UBsnEaptBXKA9GzCcX0c1ts5I2k0yoOq1F3\nLca7fmPYNep2EskqYpwFivY4pbtTVBEO\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 383, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3064023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df6102306666666666666666666666666666666666666666666666664fc15233fb49458c89a4057a8379dc9791f80a2ab84edd61", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04532b95507ca92950613dcffe7740715af07953e881d133b75989426f9aea6ed1bd22a9eb899441b29882a8e4f53f1db265dda7154f92c561b2b6c9f154af3a589871f5290114a457896fd1e9af235de9f1eb7cfe0911e27cecaa30f90bec73b4", + "wx" : "532b95507ca92950613dcffe7740715af07953e881d133b75989426f9aea6ed1bd22a9eb899441b29882a8e4f53f1db2", + "wy" : "65dda7154f92c561b2b6c9f154af3a589871f5290114a457896fd1e9af235de9f1eb7cfe0911e27cecaa30f90bec73b4" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004532b95507ca92950613dcffe7740715af07953e881d133b75989426f9aea6ed1bd22a9eb899441b29882a8e4f53f1db265dda7154f92c561b2b6c9f154af3a589871f5290114a457896fd1e9af235de9f1eb7cfe0911e27cecaa30f90bec73b4", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEUyuVUHypKVBhPc/+d0BxWvB5U+iB0TO3\nWYlCb5rqbtG9IqnriZRBspiCqOT1Px2yZd2nFU+SxWGytsnxVK86WJhx9SkBFKRX\niW/R6a8jXenx63z+CRHifOyqMPkL7HO0\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 384, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3065023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df6102310099999999999999999999999999999999999999999999999977a1fb4df8ede852ce760837c536cae35af40f4014764c12", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "041dd1d7b6b2f677d7e10fa14bb35a74bcf83d6ea0bb308ffeb7d73634f6911e4213752173fa76b2c5be12d752b8176659888325cc90b23ae34fac03a5b9a30cbcb9d24e02923d6d68e8e54066eabbf8a87272827fb2f26392dc45664bb2399e90", + "wx" : "1dd1d7b6b2f677d7e10fa14bb35a74bcf83d6ea0bb308ffeb7d73634f6911e4213752173fa76b2c5be12d752b8176659", + "wy" : "00888325cc90b23ae34fac03a5b9a30cbcb9d24e02923d6d68e8e54066eabbf8a87272827fb2f26392dc45664bb2399e90" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200041dd1d7b6b2f677d7e10fa14bb35a74bcf83d6ea0bb308ffeb7d73634f6911e4213752173fa76b2c5be12d752b8176659888325cc90b23ae34fac03a5b9a30cbcb9d24e02923d6d68e8e54066eabbf8a87272827fb2f26392dc45664bb2399e90", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEHdHXtrL2d9fhD6FLs1p0vPg9bqC7MI/+\nt9c2NPaRHkITdSFz+nayxb4S11K4F2ZZiIMlzJCyOuNPrAOluaMMvLnSTgKSPW1o\n6OVAZuq7+KhycoJ/svJjktxFZkuyOZ6Q\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 385, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3065023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df61023100db6db6db6db6db6db6db6db6db6db6db6db6db6db6db6db6aae76701acc1950894a89e068772d8b281eef136f8a8fef5", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04edc6ddb4a76167f8f7db96dbbbd87b241a2477e60ef21f22d0fb235fdd987adb15a13a9c9f05228ec7e33e39b56baf178397074f1f3b7e1d97a35d135760ff5175da027f521ee1d705b2f03e083536acfef9a9c57efe7655095631c611700542", + "wx" : "00edc6ddb4a76167f8f7db96dbbbd87b241a2477e60ef21f22d0fb235fdd987adb15a13a9c9f05228ec7e33e39b56baf17", + "wy" : "008397074f1f3b7e1d97a35d135760ff5175da027f521ee1d705b2f03e083536acfef9a9c57efe7655095631c611700542" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004edc6ddb4a76167f8f7db96dbbbd87b241a2477e60ef21f22d0fb235fdd987adb15a13a9c9f05228ec7e33e39b56baf178397074f1f3b7e1d97a35d135760ff5175da027f521ee1d705b2f03e083536acfef9a9c57efe7655095631c611700542", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE7cbdtKdhZ/j325bbu9h7JBokd+YO8h8i\n0PsjX92YetsVoTqcnwUijsfjPjm1a68Xg5cHTx87fh2Xo10TV2D/UXXaAn9SHuHX\nBbLwPgg1Nqz++anFfv52VQlWMcYRcAVC\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 386, + "comment" : "extreme value for k", + "msg" : "313233343030", + "sig" : "3064023008d999057ba3d2d969260045c55b97f089025959a6f434d651d207d19fb96e9e4fe0e86ebe0e64f85b96a9c75295df6102300eb10e5ab95f2f26a40700b1300fb8c3e754d5c453d9384ecce1daa38135a48a0a96c24efc2a76d00bde1d7aeedf7f6a", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04febf3b365df31548a5295cda6d7cff00f8ce15b4aa7dc8affe9c573decea9f7b75b64234e2d5da599bf2d1e416a7500769205229d1898c7db1d53a6bd11079458cc40da83c16f070e5772b1d2059fef19f0f36d4471ad85ec86cf1cd4e7d90c4", + "wx" : "00febf3b365df31548a5295cda6d7cff00f8ce15b4aa7dc8affe9c573decea9f7b75b64234e2d5da599bf2d1e416a75007", + "wy" : "69205229d1898c7db1d53a6bd11079458cc40da83c16f070e5772b1d2059fef19f0f36d4471ad85ec86cf1cd4e7d90c4" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004febf3b365df31548a5295cda6d7cff00f8ce15b4aa7dc8affe9c573decea9f7b75b64234e2d5da599bf2d1e416a7500769205229d1898c7db1d53a6bd11079458cc40da83c16f070e5772b1d2059fef19f0f36d4471ad85ec86cf1cd4e7d90c4", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE/r87Nl3zFUilKVzabXz/APjOFbSqfciv\n/pxXPezqn3t1tkI04tXaWZvy0eQWp1AHaSBSKdGJjH2x1Tpr0RB5RYzEDag8FvBw\n5XcrHSBZ/vGfDzbURxrYXshs8c1OfZDE\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 387, + "comment" : "extreme value for k and edgecase s", + "msg" : "313233343030", + "sig" : "3065023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7023055555555555555555555555555555555555555555555555542766f2b5167b9f51d5e0490c2e58d28f9a40878eeec6326", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "048373e65ac625a5a4110e350e7f08a0392f8261581c06a88b125a145681687fc5a6c796f16ca48977bbfc7729bba8006301d966a2d30fdf2b6dbcc8c9ac3b6b2150431f95fdf49e8ea5fff99f185cbcd2f9631ee3f074d680700fe693b0398583", + "wx" : "008373e65ac625a5a4110e350e7f08a0392f8261581c06a88b125a145681687fc5a6c796f16ca48977bbfc7729bba80063", + "wy" : "01d966a2d30fdf2b6dbcc8c9ac3b6b2150431f95fdf49e8ea5fff99f185cbcd2f9631ee3f074d680700fe693b0398583" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200048373e65ac625a5a4110e350e7f08a0392f8261581c06a88b125a145681687fc5a6c796f16ca48977bbfc7729bba8006301d966a2d30fdf2b6dbcc8c9ac3b6b2150431f95fdf49e8ea5fff99f185cbcd2f9631ee3f074d680700fe693b0398583", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEg3PmWsYlpaQRDjUOfwigOS+CYVgcBqiL\nEloUVoFof8Wmx5bxbKSJd7v8dym7qABjAdlmotMP3yttvMjJrDtrIVBDH5X99J6O\npf/5nxhcvNL5Yx7j8HTWgHAP5pOwOYWD\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 388, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3065023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab702302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04d8b5b751bef246a3769682966232b714b05d99a37199223e55cbc4df6941b2529e57965c94f60d88837cfd952d151abf9eb51727dc4665f8e74e8f5c79d34ffd11c9eab8b5b773950d1f2c446d84c158aef8bbf93b986d9b374f722d94f59f1b", + "wx" : "00d8b5b751bef246a3769682966232b714b05d99a37199223e55cbc4df6941b2529e57965c94f60d88837cfd952d151abf", + "wy" : "009eb51727dc4665f8e74e8f5c79d34ffd11c9eab8b5b773950d1f2c446d84c158aef8bbf93b986d9b374f722d94f59f1b" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004d8b5b751bef246a3769682966232b714b05d99a37199223e55cbc4df6941b2529e57965c94f60d88837cfd952d151abf9eb51727dc4665f8e74e8f5c79d34ffd11c9eab8b5b773950d1f2c446d84c158aef8bbf93b986d9b374f722d94f59f1b", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE2LW3Ub7yRqN2loKWYjK3FLBdmaNxmSI+\nVcvE32lBslKeV5ZclPYNiIN8/ZUtFRq/nrUXJ9xGZfjnTo9cedNP/RHJ6ri1t3OV\nDR8sRG2EwViu+Lv5O5htmzdPci2U9Z8b\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 389, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3065023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab702306666666666666666666666666666666666666666666666664fc15233fb49458c89a4057a8379dc9791f80a2ab84edd61", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "045f2098bc0eda6a7748fb7d95d5838a66d3f33ae4138767a7d3e221269d5b359b6456043b7a0973cf635e7424aaf1907db1e767233b18988d95e00bbb2dafbb69f92dcc01e5cb8da0c262cb52924af7976d9ded1d5fe60394035cc5509f45865c", + "wx" : "5f2098bc0eda6a7748fb7d95d5838a66d3f33ae4138767a7d3e221269d5b359b6456043b7a0973cf635e7424aaf1907d", + "wy" : "00b1e767233b18988d95e00bbb2dafbb69f92dcc01e5cb8da0c262cb52924af7976d9ded1d5fe60394035cc5509f45865c" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200045f2098bc0eda6a7748fb7d95d5838a66d3f33ae4138767a7d3e221269d5b359b6456043b7a0973cf635e7424aaf1907db1e767233b18988d95e00bbb2dafbb69f92dcc01e5cb8da0c262cb52924af7976d9ded1d5fe60394035cc5509f45865c", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEXyCYvA7aandI+32V1YOKZtPzOuQTh2en\n0+IhJp1bNZtkVgQ7eglzz2NedCSq8ZB9sednIzsYmI2V4Au7La+7afktzAHly42g\nwmLLUpJK95dtne0dX+YDlANcxVCfRYZc\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 390, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3066023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab702310099999999999999999999999999999999999999999999999977a1fb4df8ede852ce760837c536cae35af40f4014764c12", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04018cb64da6154801677d34be71e75883f912274036029bb3cf2d5679bca22c9ff10d717e4d9c370d058ddd3f6d38beb25bc92d39b9be3fce5ebc38956044af21220aac3150bd899256e30344cf7caa6820666005ed965d8dc3e678412f39adda", + "wx" : "018cb64da6154801677d34be71e75883f912274036029bb3cf2d5679bca22c9ff10d717e4d9c370d058ddd3f6d38beb2", + "wy" : "5bc92d39b9be3fce5ebc38956044af21220aac3150bd899256e30344cf7caa6820666005ed965d8dc3e678412f39adda" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004018cb64da6154801677d34be71e75883f912274036029bb3cf2d5679bca22c9ff10d717e4d9c370d058ddd3f6d38beb25bc92d39b9be3fce5ebc38956044af21220aac3150bd899256e30344cf7caa6820666005ed965d8dc3e678412f39adda", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEAYy2TaYVSAFnfTS+cedYg/kSJ0A2Apuz\nzy1WebyiLJ/xDXF+TZw3DQWN3T9tOL6yW8ktObm+P85evDiVYESvISIKrDFQvYmS\nVuMDRM98qmggZmAF7ZZdjcPmeEEvOa3a\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 391, + "comment" : "extreme value for k and s^-1", + "msg" : "313233343030", + "sig" : "3066023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7023100db6db6db6db6db6db6db6db6db6db6db6db6db6db6db6db6aae76701acc1950894a89e068772d8b281eef136f8a8fef5", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04aedfc5ce97b01b6201936777b3d01fe19ecee98bfade49ec5936accac3b02ee90bd5af667a233c60c14dac619f110a7ad9b99c30856ef47a57800ea6935e63c0c2dd7ac01dd5c0224231c68ff4b7918ef23f26195467e1d6e1a2767d73817f69", + "wx" : "00aedfc5ce97b01b6201936777b3d01fe19ecee98bfade49ec5936accac3b02ee90bd5af667a233c60c14dac619f110a7a", + "wy" : "00d9b99c30856ef47a57800ea6935e63c0c2dd7ac01dd5c0224231c68ff4b7918ef23f26195467e1d6e1a2767d73817f69" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004aedfc5ce97b01b6201936777b3d01fe19ecee98bfade49ec5936accac3b02ee90bd5af667a233c60c14dac619f110a7ad9b99c30856ef47a57800ea6935e63c0c2dd7ac01dd5c0224231c68ff4b7918ef23f26195467e1d6e1a2767d73817f69", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAErt/FzpewG2IBk2d3s9Af4Z7O6Yv63kns\nWTasysOwLukL1a9meiM8YMFNrGGfEQp62bmcMIVu9HpXgA6mk15jwMLdesAd1cAi\nQjHGj/S3kY7yPyYZVGfh1uGidn1zgX9p\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 392, + "comment" : "extreme value for k", + "msg" : "313233343030", + "sig" : "3065023100aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab702300eb10e5ab95f2f26a40700b1300fb8c3e754d5c453d9384ecce1daa38135a48a0a96c24efc2a76d00bde1d7aeedf7f6a", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab73617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f", + "wx" : "00aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7", + "wy" : "3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab73617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEqofKIr6LBTeOscce8yCtdG4dO2KLp5uY\nWfdB4IJUKjhVAvJdv1UpbDpUXjhydgq3NhfeSpYmLG9dnpi/kpLcKfj0Hb0omhR8\n6doxE7XwuMAKYLHOHX6BnXpDHXyQ6g5f\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 393, + "comment" : "testing point duplication", + "msg" : "313233343030", + "sig" : "3065023100f8723083bde48fae6e2f3ba5d836c2e954aec113030836fb978c08ab1b5a3dfe54aa2fab2423747e3b4fa70ec744894c02302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 394, + "comment" : "testing point duplication", + "msg" : "313233343030", + "sig" : "30640230078dcf7c421b705191d0c45a27c93d16ab513eecfcf7c9042fd744d6d8dcefe1036fde07248d32fcb19c725c0580a02702302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7c9e821b569d9d390a26167406d6d23d6070be242d765eb831625ceec4a0f473ef59f4e30e2817e6285bce2846f15f1a0", + "wx" : "00aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7", + "wy" : "00c9e821b569d9d390a26167406d6d23d6070be242d765eb831625ceec4a0f473ef59f4e30e2817e6285bce2846f15f1a0" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7c9e821b569d9d390a26167406d6d23d6070be242d765eb831625ceec4a0f473ef59f4e30e2817e6285bce2846f15f1a0", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEqofKIr6LBTeOscce8yCtdG4dO2KLp5uY\nWfdB4IJUKjhVAvJdv1UpbDpUXjhydgq3yeghtWnZ05CiYWdAbW0j1gcL4kLXZeuD\nFiXO7EoPRz71n04w4oF+YoW84oRvFfGg\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 395, + "comment" : "testing point duplication", + "msg" : "313233343030", + "sig" : "3065023100f8723083bde48fae6e2f3ba5d836c2e954aec113030836fb978c08ab1b5a3dfe54aa2fab2423747e3b4fa70ec744894c02302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "invalid", + "flags" : [] + }, + { + "tcId" : 396, + "comment" : "testing point duplication", + "msg" : "313233343030", + "sig" : "30640230078dcf7c421b705191d0c45a27c93d16ab513eecfcf7c9042fd744d6d8dcefe1036fde07248d32fcb19c725c0580a02702302492492492492492492492492492492492492492492492491c7be680477598d6c3716fabc13dcec86afd2833d41c2a7e", + "result" : "invalid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "0429bdb76d5fa741bfd70233cb3a66cc7d44beb3b0663d92a8136650478bcefb61ef182e155a54345a5e8e5e88f064e5bc9a525ab7f764dad3dae1468c2b419f3b62b9ba917d5e8c4fb1ec47404a3fc76474b2713081be9db4c00e043ada9fc4a3", + "wx" : "29bdb76d5fa741bfd70233cb3a66cc7d44beb3b0663d92a8136650478bcefb61ef182e155a54345a5e8e5e88f064e5bc", + "wy" : "009a525ab7f764dad3dae1468c2b419f3b62b9ba917d5e8c4fb1ec47404a3fc76474b2713081be9db4c00e043ada9fc4a3" + }, + "keyDer" : "3076301006072a8648ce3d020106052b810400220362000429bdb76d5fa741bfd70233cb3a66cc7d44beb3b0663d92a8136650478bcefb61ef182e155a54345a5e8e5e88f064e5bc9a525ab7f764dad3dae1468c2b419f3b62b9ba917d5e8c4fb1ec47404a3fc76474b2713081be9db4c00e043ada9fc4a3", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEKb23bV+nQb/XAjPLOmbMfUS+s7BmPZKo\nE2ZQR4vO+2HvGC4VWlQ0Wl6OXojwZOW8mlJat/dk2tPa4UaMK0GfO2K5upF9XoxP\nsexHQEo/x2R0snEwgb6dtMAOBDran8Sj\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 397, + "comment" : "pseudorandom signature", + "msg" : "", + "sig" : "30660231009da5c054a9eddabf4753559edd5a862cdf57adc0c2717a6949a43d80cfccd02b14ec06113ccf08081be43552391cfb1602310088bb307e9a04f923c70013db3ca716d21b313dde0cd6849435bf3b192d5266589a00b34e9c4c626b1055e7a38ef10853", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 398, + "comment" : "pseudorandom signature", + "msg" : "4d7367", + "sig" : "3065023022b0ee0e8ce866c48a4400dd8522dd91bd7a13cc8a55f2814123564d039b1d1e3a7df010688dab94878f88a1e34a905e023100f7668925262da6aad96712f817a9397b79f0fb893aedcd7221f454a60a18abb3b165aae979f29d22cfab18fb61945f87", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 399, + "comment" : "pseudorandom signature", + "msg" : "313233343030", + "sig" : "306402303db6c4d7d482fdb0a13470845f5ad2438198776c2a5954b233e24230889f3023ff64e4cbc793c4e3e94318b4e65f8cdb023003c22aa010ea7247ae7cc6c7d0f6af76f76ef91ce33a028de49979bdc2cc17d7df4c19c0e4c61c49275bc408697e7846", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 400, + "comment" : "pseudorandom signature", + "msg" : "0000000000000000000000000000000000000000", + "sig" : "306502307a36e2c2ebf9bc0165ff75f5906a4806c2a668cb48477f7f105169c9b5a756abcc06b05b4d5ac42ecfd12cdd0f8fc65e02310096aff9db7873cd2f6aa85c2693e1129b7896340287762854062df8104162a4572bdcbaf673af28a92314ec597f7acfe3", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04ffffffffaa63f1a239ac70197c6ebfcea5756dc012123f82c51fa874d66028be00e976a1080606737cc75c40bdfe4aacacbd85389088a62a6398384c22b52d492f23f46e4a27a4724ad55551da5c483438095a247cb0c3378f1f52c3425ff9f1", + "wx" : "00ffffffffaa63f1a239ac70197c6ebfcea5756dc012123f82c51fa874d66028be00e976a1080606737cc75c40bdfe4aac", + "wy" : "00acbd85389088a62a6398384c22b52d492f23f46e4a27a4724ad55551da5c483438095a247cb0c3378f1f52c3425ff9f1" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004ffffffffaa63f1a239ac70197c6ebfcea5756dc012123f82c51fa874d66028be00e976a1080606737cc75c40bdfe4aacacbd85389088a62a6398384c22b52d492f23f46e4a27a4724ad55551da5c483438095a247cb0c3378f1f52c3425ff9f1", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE/////6pj8aI5rHAZfG6/zqV1bcASEj+C\nxR+odNZgKL4A6XahCAYGc3zHXEC9/kqsrL2FOJCIpipjmDhMIrUtSS8j9G5KJ6Ry\nStVVUdpcSDQ4CVokfLDDN48fUsNCX/nx\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 401, + "comment" : "x-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "306502310082b41176571a051a82c18e1ffbf4f3ef7146e0634755ba30fc965efec684d12830ed366acf4759fcce146e867b9108ea023052eaa43df5a95a92aee5f0002f4b4a1c870cdec040c966280be579a15e865bebc1269b084e17e727bae14b8ad6e6c73d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 402, + "comment" : "x-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "3066023100b4c1897895e4c214af7ac546230ab6ea733a6353fa11bd5d9892dc89e113dffb50a3581e58d5cac31efee0d56601bc84023100b1494f4cc17f4baa96aa2c3da9db004f64256c1f28aefd299085e29fe5399517a35ae8e049ec436e7fe1b2743f2a90a0", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 403, + "comment" : "x-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "3066023100c9b58945eed8b9949bd3e78c8920e0210289c1029cdb22df780b66aee80dca40e0e9142fc6db2269adbc4cb89a425f09023100d672273cc979c16b3336428a60a3627bf752f9d7f1ba03c5e155cec8fcf523376feab08fe0e768f174828adcd17da0b2", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04d1827fc6f6f12f21992c5a409a0653b121d2ef02b2b0ab01a9161ce956280740b1e356b255701b0a6ddc9ec2ca8a9422c6ed5d2ced8d8ab7560fa5bb88c738e74541883d8a2b1c0e2ba7e36d030fc4d9bfb8b22f24db897ebac49dd400000000", + "wx" : "00d1827fc6f6f12f21992c5a409a0653b121d2ef02b2b0ab01a9161ce956280740b1e356b255701b0a6ddc9ec2ca8a9422", + "wy" : "00c6ed5d2ced8d8ab7560fa5bb88c738e74541883d8a2b1c0e2ba7e36d030fc4d9bfb8b22f24db897ebac49dd400000000" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004d1827fc6f6f12f21992c5a409a0653b121d2ef02b2b0ab01a9161ce956280740b1e356b255701b0a6ddc9ec2ca8a9422c6ed5d2ced8d8ab7560fa5bb88c738e74541883d8a2b1c0e2ba7e36d030fc4d9bfb8b22f24db897ebac49dd400000000", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE0YJ/xvbxLyGZLFpAmgZTsSHS7wKysKsB\nqRYc6VYoB0Cx41ayVXAbCm3cnsLKipQixu1dLO2NirdWD6W7iMc450VBiD2KKxwO\nK6fjbQMPxNm/uLIvJNuJfrrEndQAAAAA\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 404, + "comment" : "y-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "30660231009ad0ec81fe78e7433ccfe8d429ffd8cc3792a7ed239104ade9b7c828332a5be57493346c9a4e944eec914acac1ab5a45023100cab9be172e51ff52c70176648c6c6285630594330d8ffa5d28a47a1b8e58ec5c32c70769ed28bc553330c9a7e674da8a", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 405, + "comment" : "y-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "306502310084ba925242eaedb53cc529e4763d8995aa7315e68a47ef89f291dd29ef138e4810bc1c58a6bcbada3ac83541dc139c7902304579278b73adadb63599028b873bf5f7cee2ff01eaf0faf2d529b01211a63e78433011da37fab174607fe90a4c3d81bf", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 406, + "comment" : "y-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "3064023056a69cb5b4026268e11631f7fc35830e8a612ed79278f280e7d7e409558c43ef226ab25cf639aae7f435545cc4d8e8e502305066494754680d61c23419273ba030df0f0b8b0a486cb0dd498298a34db478a6c133b4f5e071b6696cdbec63a74d84c2", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "041099bb45100f55f5a85cca3de2b3bd5e250f4f6fad6631a3156c2e52a33d7d615dd279f79f8b4baff7c713ac00000000e6c9b736a8929f2ed7be0c753a54cbb48b8469e0411eaf93a4a82459ba0b681bba8f5fb383b4906d4901a3303e2f1557", + "wx" : "1099bb45100f55f5a85cca3de2b3bd5e250f4f6fad6631a3156c2e52a33d7d615dd279f79f8b4baff7c713ac00000000", + "wy" : "00e6c9b736a8929f2ed7be0c753a54cbb48b8469e0411eaf93a4a82459ba0b681bba8f5fb383b4906d4901a3303e2f1557" + }, + "keyDer" : "3076301006072a8648ce3d020106052b81040022036200041099bb45100f55f5a85cca3de2b3bd5e250f4f6fad6631a3156c2e52a33d7d615dd279f79f8b4baff7c713ac00000000e6c9b736a8929f2ed7be0c753a54cbb48b8469e0411eaf93a4a82459ba0b681bba8f5fb383b4906d4901a3303e2f1557", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEJm7RRAPVfWoXMo94rO9XiUPT2+tZjGj\nFWwuUqM9fWFd0nn3n4tLr/fHE6wAAAAA5sm3NqiSny7Xvgx1OlTLtIuEaeBBHq+T\npKgkWboLaBu6j1+zg7SQbUkBozA+LxVX\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 407, + "comment" : "x-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "306402306328e30a8e218904631d6e8858e1e3841a2f6c0959af1b53ad3515bee16cbb600b5abaa5123c8eeb8cdc9b2da1a8ef39023040e708de5a00178926cdb263afcb12710ae8c03b298eeadbc40522c0479a94e98dfbdce493fcf0cf7f4afb6949d9f95d", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 408, + "comment" : "x-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "3064023034b9ce48ad0aac78ff138881f3b13badae7e1cf5da7ff060c5642b22c5ec4c76fd4cd46d564676d4631bd567a7ea9284023061dae7993b4500005f45f55924c502f8803455e21a62499db2cbbc80a582c1107c8014afb4619f5d4d37fddbdf2d7bb9", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 409, + "comment" : "x-coordinate of the public key has many trailing 0's", + "msg" : "4d657373616765", + "sig" : "3066023100e337217405a8457b0e31ae4e909eabe79343331c4dd0623c2b13d0981012e28d1fbf88f0101c1abae8cace1c801dfe16023100948603710e13fe5b87e96ca87fb17bddb5762b9e4f2fc6e1c4acf4ee20b641518158b32bbd42884bffad25e0171a3462", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04000000002b089edd754169010145f263f334fc167cc19dae8225970ae19cc8cb7ec73593d6a465c370f5478b0e539d69d1951d597b56a67345acb25809581f07cd0eb78d9538a3f8a65f300e68a1eb78507df76de650e8f8ee63a5f0c5687c98", + "wx" : "2b089edd754169010145f263f334fc167cc19dae8225970ae19cc8cb7ec73593d6a465c370f5478b0e539d69", + "wy" : "00d1951d597b56a67345acb25809581f07cd0eb78d9538a3f8a65f300e68a1eb78507df76de650e8f8ee63a5f0c5687c98" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004000000002b089edd754169010145f263f334fc167cc19dae8225970ae19cc8cb7ec73593d6a465c370f5478b0e539d69d1951d597b56a67345acb25809581f07cd0eb78d9538a3f8a65f300e68a1eb78507df76de650e8f8ee63a5f0c5687c98", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEAAAAACsInt11QWkBAUXyY/M0/BZ8wZ2u\ngiWXCuGcyMt+xzWT1qRlw3D1R4sOU51p0ZUdWXtWpnNFrLJYCVgfB80Ot42VOKP4\npl8wDmih63hQffdt5lDo+O5jpfDFaHyY\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 410, + "comment" : "x-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "3066023100b2f22aeb025c40f695850ca8d9243d671557ecdb28ba78ad2f3389e78fe685251a29dfbc2ebc1d7e5e1098b4b286db18023100d2ac24a65d1463405bd4bb117e4d1ed7f7d9b457d51dcb1fd8704ad27de5cbc11bea45f8e3cd1ecdb51981962feaa4b6", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 411, + "comment" : "x-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "3066023100f3b374deaa912309be3a08722fcd0fa17fbad8a0d674a96b1140efe2f9451e373029546b84a565dd88b6816b03c69912023100f44fcc8e2513a2574e9c88de1960e8d7f6c607fb0aa6400362ccacf86e56cc44bfa6e233a993800fe1385e747312393b", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 412, + "comment" : "x-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "3065023100de778636b0c8775a48e8f7c2da3ce056ea18c0f7b61a6ceebccdc1db0462a739a9f623b342d82b5cdba9329fd32d487002305f843dc49e8c8642d0ade1fbd635ee1ea6f6da8f980ec1d839de2b37ba7082668179cb80e7c97775e77c7afe8dfb9791", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b33600000000208b3f5ad3b3937acc9d606cc5ececab4a701f75ed42957ea4d7858d33f5c26c6ae20a9cccda56996700d6b4", + "wx" : "00fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b336", + "wy" : "208b3f5ad3b3937acc9d606cc5ececab4a701f75ed42957ea4d7858d33f5c26c6ae20a9cccda56996700d6b4" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b33600000000208b3f5ad3b3937acc9d606cc5ececab4a701f75ed42957ea4d7858d33f5c26c6ae20a9cccda56996700d6b4", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+wG6rV8Lj3m5zRBNEqq5MQFGrdfWtMAi\n2HrmcRF4uU1hjKezrxOFSxxYiHnod7M2AAAAACCLP1rTs5N6zJ1gbMXs7KtKcB91\n7UKVfqTXhY0z9cJsauIKnMzaVplnANa0\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 413, + "comment" : "y-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "30650231008f6f35102ebc10571603d65d14d45e2658e36a961d790348df0ed3ee615d55919e1c31d02e48b4c29b724e75094e88e102301674424d64d3a780b031e928ee3b246a3703868aef1afcc6b50dd217ae6bdcb5fc7f59d2b14dc4dd08f22853abef621b", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 414, + "comment" : "y-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "306602310081fdae0b7e18cca48e0bae1a4e2c96f3973b0f661ccae269c1f0535265954e76473f51710fd2eca0b014e0386bdb387e023100b4fd60411ae7ad836c8b1768bf44fe126d753781628a2b34f21fe1fbc961d21a153d3838e0200ddf8b7c16819230c0e2", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 415, + "comment" : "y-coordinate of the public key is small", + "msg" : "4d657373616765", + "sig" : "3065023100f6b94cdc2083d5c6b4908063033dbe1817f5187a80fbf21e0155ebc16c3b14b06282171a63d8c6ad173bad8aa40b84060230569db82936c0d284c752149034a28e2415b57247c723077d8a5a7c9725ebca7603de5b7a41c53fed2bed8143a9bb8beb", + "result" : "valid", + "flags" : [] + } + ] + }, + { + "key" : { + "curve" : "secp384r1", + "keySize" : 384, + "type" : "EcPublicKey", + "uncompressed" : "04fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b336ffffffffdf74c0a52c4c6c8533629f933a131354b58fe08a12bd6a815b287a71cc0a3d92951df5633325a96798ff294b", + "wx" : "00fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b336", + "wy" : "00ffffffffdf74c0a52c4c6c8533629f933a131354b58fe08a12bd6a815b287a71cc0a3d92951df5633325a96798ff294b" + }, + "keyDer" : "3076301006072a8648ce3d020106052b8104002203620004fb01baad5f0b8f79b9cd104d12aab9310146add7d6b4c022d87ae6711178b94d618ca7b3af13854b1c588879e877b336ffffffffdf74c0a52c4c6c8533629f933a131354b58fe08a12bd6a815b287a71cc0a3d92951df5633325a96798ff294b", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+wG6rV8Lj3m5zRBNEqq5MQFGrdfWtMAi\n2HrmcRF4uU1hjKezrxOFSxxYiHnod7M2/////990wKUsTGyFM2KfkzoTE1S1j+CK\nEr1qgVsoenHMCj2SlR31YzMlqWeY/ylL\n-----END PUBLIC KEY-----", + "sha" : "SHA3-384", + "type" : "EcdsaVerify", + "tests" : [ + { + "tcId" : 416, + "comment" : "y-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "306602310089d3d1a5c2ce6b637cc9e30a734ea63d34a7a72630400ee82916b79fa9a9a83b4e2faf765ddcf1fa596a4c026293ea060231009013c5c51bde3c114ae0ce19141c6c72bbf0a8f75885257f202240af212064f0fa9b1409d8c5e195a8db9d996eb1cd67", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 417, + "comment" : "y-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "306502304bb0ddb7af2d58e75b17f7ea81c618ca191efaa374026901fc1914b97b44ed64873404b40c249ee652e9685c67347881023100af0bc80678b411ce0ea78c57f50bbb9b11678e001d92f2f49ad17af4759c7a013d27668ed17b13bc01e13eb9ee68040f", + "result" : "valid", + "flags" : [] + }, + { + "tcId" : 418, + "comment" : "y-coordinate of the public key is large", + "msg" : "4d657373616765", + "sig" : "30650230024deac92bccdf77a3fe019fb5d35063c9ad9374bf1e7508218b25776815eb95f51c8c253f88991c3073c67ca8bbd5770231008da6b6f9fde42f24536413f8c2d3506171c742b6a0883de116b314d559388b41630aa24c485e090fee5f340c79486164", + "result" : "valid", + "flags" : [] + } + ] + } + ] +} |