Questions tagged [test-vectors]

A test vector is a set of inputs used to test new and/or established cryptographic designs and/or implementations.

Filter by
Sorted by
Tagged with
15 votes
1 answer
1k views

Doubt about published test vectors for gimli hash

In https://eprint.iacr.org/2017/630.pdf and https://gimli.cr.yp.to/gimli-20170627.pdf there are test vectors for the gimli hash function. I have compile the reference C code test_hash.c from https://...
gammatester's user avatar
  • 1,005
12 votes
2 answers
8k views

Are there any Secp256k1 ECDSA test examples available?

Are there any available test cases for testing elliptic curves like secp256k1 (Korblitz curves from http://www.secg.org/collateral/sec2_final.pdf)? For curves like P192 there are for example those ...
ThePiachu's user avatar
  • 1,679
9 votes
2 answers
5k views

Where are the ChaCha20 test vectors/examples?

I see in the Salsa20 specification there are test examples throughout the document to help an implementer make sure every function works as designed. Consequently the whole algorithm would work ...
Motox's user avatar
  • 146
9 votes
2 answers
7k views

Where can I find test vectors for ciphers?

While implementing ciphers and hash functions, I often face a problem: where to find test vectors for it; so that I can guarantee my program is working correctly. It is generally a tedious job to find ...
hola's user avatar
  • 603
9 votes
2 answers
6k views

Complete Set of Test-Vectors for ECDSA secp256k1

Although there are several implementations of ECDSA secp256k1 public available over the internet (the most popular being OpenSSL), it seems that there are no complete set of test-vectors available. ...
Mark Messa's user avatar
8 votes
3 answers
1k views

Testing the Fortuna random number generator?

I have implemented the Fortuna random number generator as described in chapter 10 of "Practical Cryptography" (Ferguson and Schneier, Wiley, 2003), the result can be found at http://www.seehuhn.de/...
jochen's user avatar
  • 183
6 votes
2 answers
445 views

Do test vectors ensure a cipher is free of backdoors?

If a cipher implementation passes unit tests using test vectors from some trusted source (these for AES, for example), then can we say that it is fully conforming to the specification, and must have ...
user avatar
6 votes
1 answer
322 views

Where can I find NTRU test vectors?

In some research work in 2001, it is stated that test vectors were not publicly available at the time. Then in this ESSS1v2 standard under IEEE1363 here , the appendix B mentions that the test vectors ...
Jaynjayn's user avatar
5 votes
3 answers
3k views

ChaCha20-Poly1305 test vectors

I was trying to use OpenSSL 1.1 (via Ruby) to validate the ChaCha20-Poly1305 test vector from this IETF draft: https://datatracker.ietf.org/doc/html/draft-agl-tls-chacha20poly1305-04#section-7 The ...
Jonas's user avatar
  • 779
5 votes
2 answers
1k views

What's the reason for Monte Carlo tests for block ciphers?

NIST specifies that implementations were required to create Monte Carlo test vectors for ECB and CBC mode for the AES competition. What's the reason for these tests? The only thing I can think of is ...
Maarten Bodewes's user avatar
  • 92.4k
5 votes
3 answers
3k views

Need a test suite for my RSA implementation

I have an assignment to build a software which can encrypt/decrypt by RSA method. I already did it, but my teacher said that I need to find a test suite (include: modulus, public key, private key) to ...
user63361's user avatar
5 votes
2 answers
4k views

Explanation of CAVP format for NIST Test Vectors for SHA-2 and 3

I want to run the SHA2 and SHA3 NIST algorithm test vectors provided in the zip files at the bottom of this page: http://csrc.nist.gov/groups/STM/cavp/secure-hashing.html#sha-2 I don't quite ...
Vincent Russo's user avatar
5 votes
2 answers
571 views

Elgamal test vectors

I know that Elgamal algorithms have fallen out of fashion, and they are not included in any widespread cryptographic standard nowadays. However, they are still present in several popular crypto ...
SquareRootOfTwentyThree's user avatar
5 votes
1 answer
647 views

Sites to find crypto intermediate values

Does anyone know of any sites where intermediate values of multiple crypto algorithms (not just the famous ones), including hashes, can be found? I don't just mean intermediate values of encrypting. I'...
calccrypto's user avatar
4 votes
1 answer
268 views

Does anyone have a KAT for 3DES KO-2?

Does any one have, or can refer to a Known-Answer-Test (KAT) for Triple DES Keying Option 2? (Keying Option 2 means $C = DES_{k_1}(DES^{-1}_{k_2}(DES_{k_1}(P)))$ for encryption and $P = DES^{-1}_{k_1}...
Sean B. Durkin's user avatar
4 votes
0 answers
102 views

Hasty Pudding test vectors

I’ve been implementing Hasty Pudding from its spec, but I can’t find a copy of the test data to validate my implementation against. The directory of tests links to various files in ftp://ftp.cs....
Chris Morgan's user avatar
3 votes
3 answers
3k views

Test vectors for PRESENT algorithm?

I'm looking for Test Vectors to test my implementation of PRESENT. I would like to test a different input from the usual where the key and the plaintext are either 000..000 or FFF...FFF.
Henrique's user avatar
3 votes
2 answers
247 views

Bleichenbacher attack test vectors

I was trying to understand the Bleichenbacher attack. I went through the paper of Bleichenbacher to understand it a bit more. However, I tried to get some test vectors to simulate this attack locally ...
Vikash's user avatar
  • 68
3 votes
1 answer
542 views

Public key derivation for Ed448

Another potentially silly question here, but I seem to have developed tunnel vision and I am missing something very basic. In RFC 8032 one can find a number of test vectors for Ed488 - for example: <...
Jay Smith's user avatar
3 votes
1 answer
156 views

Test Vectors for XEdDSA

Anyone aware of test vectors (preferably with intermediate values) for the XEdDSA algorithm?
Peter Waher's user avatar
3 votes
2 answers
2k views

Where can I find official test vectors for NIST SP 800-56C r1 Single Step KDF

NIST 800-56Cr1 describes a single and two (extract-expand) step KDF designed for use in key agreement routines. NIST declares that HKDF (RFC5869) is a version of the two-step variation so test vectors ...
Patrick's user avatar
  • 251
3 votes
0 answers
120 views

mCrypton - does anyone know where I can find test vectors or a reference implementation?

I am currently writing an implementation of the mCrypton lightweight block cipher (as presented in this paper). Unfortunately, the authors do not provide any test vectors. I tried to contact the ...
Huljar's user avatar
  • 31
3 votes
0 answers
726 views

Test vectors for TLS PRF function

Does anyone know where I might be able to find test vectors for the PRF function in TLS? (either 1.0 or newer). I'm trying to implement a client and I am getting the BAD Record MAC return after ...
chadianscot's user avatar
2 votes
2 answers
980 views

Wrong Test Vector for HKDF with HMAC-SHA256 [closed]

I have implemented HKDF by myself and it seems to work good. I managed to replicate all the test vectors listed here but... except this one: ...
David's user avatar
  • 29
2 votes
2 answers
1k views

64 DES full example with all the stages

I'm trying to write a code to perform encryption and decryption of 64-bit DES but I'm having a problem in verifying that my code is working correctly. My graduation project is about DES crypt-analysis ...
siba36's user avatar
  • 301
2 votes
1 answer
1k views

what are the plaintext's for the RC4 stream cipher test vectors in RFC6229?

https://www.rfc-editor.org/rfc/rfc6229 has stuff like this: ...
neubert's user avatar
  • 2,917
2 votes
1 answer
210 views

Problem reproducing AES results

First of all, I just implemented AES because I wanted to understand how it works and as a challenge to see if I could do it and I won't use to encrypt anything important, ever. The (German) Wikipedia ...
Joba's user avatar
  • 143
2 votes
1 answer
659 views

OpenSSL des-ede3 not producing same output as test vector implies it should be

I'm encrypting one of the standard TDEA/3DES/DES-EDE test vectors with openssl: ...
neubert's user avatar
  • 2,917
2 votes
1 answer
400 views

Test vectors (points) for Ed25519

I am trying to verify an Ed25519 implementation, but I can't find any test vectors for the curve points. All test vectors focus directly on signature constructions (EdDSA). I tried to use https://...
SquareRootOfTwentyThree's user avatar
2 votes
1 answer
1k views

test vectors for 3DES seem to in fact be testing DES - not 3DES

NIST SP 800-20 Appendix A has what presumably are supposed to be test vectors for 3DES except almost all of the test vectors utilize 8-byte keys and not the 24-byte keys that 3DES is supposed to have. ...
neubert's user avatar
  • 2,917
2 votes
1 answer
3k views

Where can I find Secp256k1 ECDSA test vectors?

I`m currently implementing an ECDSA library based on curves like secp256k1. I would like to test it using some test vectors, like http://csrc.nist.gov/groups/STM/cavp/documents/dss/ecdsatestvectors....
ThePiachu's user avatar
  • 1,679
2 votes
1 answer
151 views

SHAKE128 range calculation for MonteCarlo messages

For SHAKE128 NIST has provided test vectors for Monte Carlo: ...
Umadevi Palathur's user avatar
2 votes
1 answer
184 views

ChaCha matrix - tests for original implementation not passing due to bad counter encoding?

Hello everyone and already thanks for taking your time to read this! I am currently implementing ChaCha20 (256-bit key) for my bachelor thesis. I know that there are two version of ChaCha out there; ...
ekzyis's user avatar
  • 43
2 votes
1 answer
590 views

Where can I find test vectors for the PRESENT cipher with a 128-bit key?

Where can I find the test vectors for the PRESENT block cipher with a 128-bit key?
Madhu Ghattamaneni's user avatar
2 votes
1 answer
1k views

Could someone please explain test vectors of NIST for RSASSA-PSS 1024 bit?

I am new to RSASSA-PSS Signature verification algorithm. Below are the test vectors from NIST but i am not able to understand each parameter. I could understand that SHA1 is used for Hashing and e ...
danny's user avatar
  • 253
2 votes
1 answer
496 views

Is there any use for PBKDF with empty password?

As the name suggests, password based key derivation functions are used for deriving a cryptographic key from, well, a password. Is there any use for PBKDFs with empty password? Does it give any ...
buc's user avatar
  • 123
2 votes
0 answers
41 views

Does anybody have test vectors for the LBlock block cipher?

LBlock is a lightweight block cipher with 64-80 bits block-key size, designed by a group of Chinese scholars. Does anybody have LBlock test vectors? I am looking for test vectors, which contain the ...
nari's user avatar
  • 21
1 vote
2 answers
2k views

NIST HMAC Test vectors

I am searching test vectors of the HMAC-SHA256 primitive to verify the correctness of an implementation. Without hesitation I go on the NIST website to see what they offer. While reading the ...
Raoul722's user avatar
  • 2,836
1 vote
1 answer
411 views

How are long IVs used in AES-GCM?

I looked through NIST's official test vectors (CAVP) for the AES-GCM mode, and noticed that there are some test vectors in there with 8-bit or 1024-bit IVs. But as far as I understand, the GCM ...
polfosol's user avatar
  • 201
1 vote
2 answers
316 views

Implementations of GCM with 64-bit cipher

The paper The Galois/Counter Mode of Operation (GCM) describes mainly the 128-bit case, for use with 128-bit block ciphers such as AES. AES-GCM test vectors are available from NIST. The paper also ...
Craig McQueen's user avatar
1 vote
1 answer
519 views

SHA3-512 troubleshooting - is there a worked example for hashing the "zero-length string"?

(I wondered if this question should be asked on StackOverflow instead because it's a programming related issue, but it's bound to the intricacies of SHA3, which I figured was a better fit for Crypto....
Wossname's user avatar
  • 117
1 vote
1 answer
441 views

ECRYPT Salsa20 Test Vectors Interpretation

I am currently implementing Salsa20 for my bachelor thesis. After having verified all the functions needed for the final encryption function with the given test data in the specification from DJB, I ...
ekzyis's user avatar
  • 43
1 vote
1 answer
255 views

IEEE P1619/XTS, inconsistent reference implementation and test vectors [closed]

I'm testing IEEE's P1619, which is XTS mode. IEEE documents from 2007 provided both test vectors and a reference implementation. Documents from 2008 only provided the reference implementation. Here is ...
user avatar
1 vote
1 answer
1k views

Testing implementation of cryptography algorithms: Brainstorm

I wonder what kind of techniques can be used to validate implementation of cryptography algorithms? The obvious one is to run specific algorithms against publically known test vectors (i.e. from ...
Kris Kwiatkowski's user avatar
1 vote
1 answer
68 views

getting wrong rsa private exponent (d) for this particular test vector from nist cavp

In 186-2rsatestvectors.zip/SigVerRSA.rsp ...
d186's user avatar
  • 13
1 vote
1 answer
167 views

Is using only one or two test vector(s) for ChaCha20 enough for validation of coded algorithm?

For validating the ChaCha20 encryption/decryption algorithm written in VB.NET, I am looking for more ChaCha20 test vectors that are based on the final spec for ChaCha20 that can be found here. See the ...
DotNET Afficionado's user avatar
1 vote
2 answers
132 views

test vectors for IDEA

I'm implementing IDEA algorithm in java and I need test vectors for the algorithm that include plaintext,ciphertext and keys in each step to verify my code.
siba36's user avatar
  • 301
1 vote
1 answer
299 views

Are the Serpent Test Vectors incorrect?

I have recently written an implementation of Serpent and was testing it against known vectors to no avail. Using 256-bit key, I compared my encryption to the test vectors located here: http://www.cs....
toothandsticks's user avatar
1 vote
1 answer
73 views

How can I get select messages ciphers for salsa20poly1305 for unit tests?

In order to avoid memory errors, I always write safe C++ wrappers with strong type-safety for any C encryption library I use. To test my wrapper of ...
The Quantum Physicist's user avatar
1 vote
0 answers
80 views

Trouble interpreting CTR_DRBG test vector results

I've implemented a CTR_DRBG random number generator according to NIST SP 800-90A Rev. 1 and I am now testing it with test vectors provided in NIST CAVS 14.3 (drbgvectors_no_reseed\CTR_DRBG.txt). ...
MDude's user avatar
  • 23