| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package SBOM::CycloneDX::Enum::CryptoPrimitive; |
|
2
|
|
|
|
|
|
|
|
|
3
|
16
|
|
|
16
|
|
337
|
use 5.010001; |
|
|
16
|
|
|
|
|
62
|
|
|
4
|
16
|
|
|
16
|
|
99
|
use strict; |
|
|
16
|
|
|
|
|
33
|
|
|
|
16
|
|
|
|
|
582
|
|
|
5
|
16
|
|
|
16
|
|
94
|
use warnings; |
|
|
16
|
|
|
|
|
42
|
|
|
|
16
|
|
|
|
|
1074
|
|
|
6
|
16
|
|
|
16
|
|
119
|
use utf8; |
|
|
16
|
|
|
|
|
29
|
|
|
|
16
|
|
|
|
|
87
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
16
|
|
|
16
|
|
709
|
use Exporter 'import'; |
|
|
16
|
|
|
|
|
31
|
|
|
|
16
|
|
|
|
|
3454
|
|
|
9
|
|
|
|
|
|
|
our (@EXPORT_OK, %EXPORT_TAGS, %ENUM); |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
BEGIN { |
|
12
|
|
|
|
|
|
|
|
|
13
|
16
|
|
|
16
|
|
357
|
%ENUM = ( |
|
14
|
|
|
|
|
|
|
DRBG => 'drbg', |
|
15
|
|
|
|
|
|
|
MAC => 'mac', |
|
16
|
|
|
|
|
|
|
BLOCK_CIPHER => 'block-cipher', |
|
17
|
|
|
|
|
|
|
STREAM_CIPHER => 'stream-cipher', |
|
18
|
|
|
|
|
|
|
SIGNATURE => 'signature', |
|
19
|
|
|
|
|
|
|
HASH => 'hash', |
|
20
|
|
|
|
|
|
|
PKE => 'pke', |
|
21
|
|
|
|
|
|
|
XOF => 'xof', |
|
22
|
|
|
|
|
|
|
KDF => 'kdf', |
|
23
|
|
|
|
|
|
|
KEY_AGREE => 'key-agree', |
|
24
|
|
|
|
|
|
|
KEM => 'kem', |
|
25
|
|
|
|
|
|
|
AE => 'ae', |
|
26
|
|
|
|
|
|
|
COMBINER => 'combiner', |
|
27
|
|
|
|
|
|
|
KEY_WRAP => 'key-wrap', |
|
28
|
|
|
|
|
|
|
OTHER => 'other', |
|
29
|
|
|
|
|
|
|
UNKNOWN => 'unknown', |
|
30
|
|
|
|
|
|
|
); |
|
31
|
|
|
|
|
|
|
|
|
32
|
16
|
|
|
|
|
98
|
require constant; |
|
33
|
16
|
|
|
|
|
2320
|
constant->import(\%ENUM); |
|
34
|
|
|
|
|
|
|
|
|
35
|
16
|
|
|
|
|
198
|
@EXPORT_OK = sort keys %ENUM; |
|
36
|
16
|
|
|
|
|
1885
|
%EXPORT_TAGS = (all => \@EXPORT_OK); |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
|
|
40
|
2
|
|
|
2
|
1
|
28
|
sub values { sort values %ENUM } |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=encoding utf-8 |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 NAME |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
SBOM::CycloneDX::Enum::CryptoPrimitive - primitive |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
use SBOM::CycloneDX::Enum qw(CRYPTO_PRIMITIVE); |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
say CRYPTO_PRIMITIVE->BLOCK_CIPHER; |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
use SBOM::CycloneDX::Enum::CryptoPrimitive; |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
say SBOM::CycloneDX::Enum::CryptoPrimitive->PKE; |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
use SBOM::CycloneDX::Enum::CryptoPrimitive qw(:all); |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
say KDF; |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
L is ENUM package used by L. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Cryptographic building blocks used in higher-level cryptographic systems |
|
73
|
|
|
|
|
|
|
and protocols. Primitives represent different cryptographic routines: |
|
74
|
|
|
|
|
|
|
deterministic random bit generators (drbg, e.g. CTR_DRBG from NIST |
|
75
|
|
|
|
|
|
|
SP800-90A-r1), message authentication codes (mac, e.g. HMAC-SHA-256), |
|
76
|
|
|
|
|
|
|
blockciphers (e.g. AES), streamciphers (e.g. Salsa20), signatures (e.g. |
|
77
|
|
|
|
|
|
|
ECDSA), hash functions (e.g. SHA-256), public-key encryption schemes (pke, |
|
78
|
|
|
|
|
|
|
e.g. RSA), extended output functions (xof, e.g. SHAKE256), key derivation |
|
79
|
|
|
|
|
|
|
functions (e.g. pbkdf2), key agreement algorithms (e.g. ECDH), key |
|
80
|
|
|
|
|
|
|
encapsulation mechanisms (e.g. ML-KEM), authenticated encryption (ae, e.g. |
|
81
|
|
|
|
|
|
|
AES-GCM) and the combination of multiple algorithms (combiner, e.g. |
|
82
|
|
|
|
|
|
|
SP800-56Cr2). |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 CONSTANTS |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=over |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item * C, Deterministic Random Bit Generator (DRBG) is a type of |
|
90
|
|
|
|
|
|
|
pseudorandom number generator designed to produce a sequence of bits from |
|
91
|
|
|
|
|
|
|
an initial seed value. DRBGs are commonly used in cryptographic |
|
92
|
|
|
|
|
|
|
applications where reproducibility of random values is important. |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item * C, In cryptography, a Message Authentication Code (MAC) is |
|
95
|
|
|
|
|
|
|
information used for authenticating and integrity-checking a message. |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item * C, A block cipher is a symmetric key algorithm that |
|
98
|
|
|
|
|
|
|
operates on fixed-size blocks of data. It encrypts or decrypts the data in |
|
99
|
|
|
|
|
|
|
block units, providing confidentiality. Block ciphers are widely used in |
|
100
|
|
|
|
|
|
|
various cryptographic modes and protocols for secure data transmission. |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item * C, A stream cipher is a symmetric key cipher where |
|
103
|
|
|
|
|
|
|
plaintext digits are combined with a pseudorandom cipher digit stream |
|
104
|
|
|
|
|
|
|
(keystream). |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item * C, In cryptography, a signature is a digital |
|
107
|
|
|
|
|
|
|
representation of a message or data that proves its origin, identity, and |
|
108
|
|
|
|
|
|
|
integrity. Digital signatures are generated using cryptographic algorithms |
|
109
|
|
|
|
|
|
|
and are widely used for authentication and verification in secure |
|
110
|
|
|
|
|
|
|
communication. |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item * C, A hash function is a mathematical algorithm that takes an |
|
113
|
|
|
|
|
|
|
input (or 'message') and produces a fixed-size string of characters, which |
|
114
|
|
|
|
|
|
|
is typically a hash value. Hash functions are commonly used in various |
|
115
|
|
|
|
|
|
|
cryptographic applications, including data integrity verification and |
|
116
|
|
|
|
|
|
|
password hashing. |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item * C, Public Key Encryption (PKE) is a type of encryption that |
|
119
|
|
|
|
|
|
|
uses a pair of public and private keys for secure communication. The public |
|
120
|
|
|
|
|
|
|
key is used for encryption, while the private key is used for decryption. |
|
121
|
|
|
|
|
|
|
PKE is a fundamental component of public-key cryptography. |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=item * C, An XOF is an extendable output function that can take |
|
124
|
|
|
|
|
|
|
arbitrary input and creates a stream of output, up to a limit determined by |
|
125
|
|
|
|
|
|
|
the size of the internal state of the hash function that underlies the XOF. |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=item * C, A Key Derivation Function (KDF) derives key material from |
|
128
|
|
|
|
|
|
|
another source of entropy while preserving the entropy of the input. |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=item * C, In cryptography, a key-agreement is a protocol |
|
131
|
|
|
|
|
|
|
whereby two or more parties agree on a cryptographic key in such a way that |
|
132
|
|
|
|
|
|
|
both influence the outcome. |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=item * C, A Key Encapsulation Mechanism (KEM) algorithm is a |
|
135
|
|
|
|
|
|
|
mechanism for transporting random keying material to a recipient using the |
|
136
|
|
|
|
|
|
|
recipient's public key. |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=item * C, Authenticated Encryption (AE) is a cryptographic process |
|
139
|
|
|
|
|
|
|
that provides both confidentiality and data integrity. It ensures that the |
|
140
|
|
|
|
|
|
|
encrypted data has not been tampered with and comes from a legitimate |
|
141
|
|
|
|
|
|
|
source. AE is commonly used in secure communication protocols. |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=item * C, A combiner aggregates many candidates for a |
|
144
|
|
|
|
|
|
|
cryptographic primitive and generates a new candidate for the same |
|
145
|
|
|
|
|
|
|
primitive. |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=item * C, Key-wrap is a cryptographic technique used to securely |
|
148
|
|
|
|
|
|
|
encrypt and protect cryptographic keys using algorithms like AES. |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=item * C, Another primitive type. |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=item * C, The primitive is not known. |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=back |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=head1 SUPPORT |
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head2 Bugs / Feature Requests |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
Please report any bugs or feature requests through the issue tracker |
|
161
|
|
|
|
|
|
|
at L. |
|
162
|
|
|
|
|
|
|
You will be notified automatically of any progress on your issue. |
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head2 Source Code |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
This is open source software. The code repository is available for |
|
167
|
|
|
|
|
|
|
public review and contribution under the terms of the license. |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
L |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=head1 AUTHOR |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=over 4 |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=item * Giuseppe Di Terlizzi |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=back |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi. |
|
186
|
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
188
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=cut |