mirror of
https://github.com/openssl/openssl.git
synced 2026-01-25 02:56:43 +00:00
Add an initial version of an ML-DSA fuzzer. Exercises various ML-DSA appropriate APIs. Currently it is able to randomly: 1. Attempt to create raw public private keys of various valid and invalid sizes 2. Generate legitimate keys of various sizes using the keygen api 3. Perform sign/verify operations using real generated keys 4. Perform digest sign/verify operations using real generated keys 5. Do an export and import of a key using todata/fromdata 6. Do a comparison of two equal and unequal keys Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26685)
26 lines
702 B
Perl
26 lines
702 B
Perl
#!/usr/bin/env perl
|
|
# Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
# this file except in compliance with the License. You can obtain a copy
|
|
# in the file LICENSE in the source distribution or at
|
|
# https://www.openssl.org/source/license.html
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use OpenSSL::Test qw/:DEFAULT srctop_file/;
|
|
use OpenSSL::Test::Utils;
|
|
|
|
my $fuzzer = "ml-dsa";
|
|
setup("test_fuzz_${fuzzer}");
|
|
|
|
plan skip_all => "This test requires ML-DSA support"
|
|
if disabled("ml-dsa");
|
|
|
|
plan tests => 2; # one more due to below require_ok(...)
|
|
|
|
require_ok(srctop_file('test','recipes','fuzz.pl'));
|
|
|
|
fuzz_ok($fuzzer);
|