VirtualBox

source: vbox/trunk/src/libs/libtpms-0.10.0/src/tpm2/PRNG_TestVectors.h@ 108932

Last change on this file since 108932 was 108932, checked in by vboxsync, 13 days ago

libtpms-0.10.0: Applied and adjusted our libtpms changes to 0.9.6. jiraref:VBP-1320

File size: 5.5 KB
Line 
1/********************************************************************************/
2/* */
3/* PRNG Test Vectors */
4/* Written by Ken Goldman */
5/* IBM Thomas J. Watson Research Center */
6/* $Id: PRNG_TestVectors.h 1529 2019-11-21 23:29:01Z kgoldman $ */
7/* */
8/* Licenses and Notices */
9/* */
10/* 1. Copyright Licenses: */
11/* */
12/* - Trusted Computing Group (TCG) grants to the user of the source code in */
13/* this specification (the "Source Code") a worldwide, irrevocable, */
14/* nonexclusive, royalty free, copyright license to reproduce, create */
15/* derivative works, distribute, display and perform the Source Code and */
16/* derivative works thereof, and to grant others the rights granted herein. */
17/* */
18/* - The TCG grants to the user of the other parts of the specification */
19/* (other than the Source Code) the rights to reproduce, distribute, */
20/* display, and perform the specification solely for the purpose of */
21/* developing products based on such documents. */
22/* */
23/* 2. Source Code Distribution Conditions: */
24/* */
25/* - Redistributions of Source Code must retain the above copyright licenses, */
26/* this list of conditions and the following disclaimers. */
27/* */
28/* - Redistributions in binary form must reproduce the above copyright */
29/* licenses, this list of conditions and the following disclaimers in the */
30/* documentation and/or other materials provided with the distribution. */
31/* */
32/* 3. Disclaimers: */
33/* */
34/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
35/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
36/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
37/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
38/* Contact TCG Administration ([email protected]) for */
39/* information on specification licensing rights available through TCG */
40/* membership agreements. */
41/* */
42/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
43/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
44/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
45/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
46/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
47/* */
48/* - Without limitation, TCG and its members and licensors disclaim all */
49/* liability, including liability for infringement of any proprietary */
50/* rights, relating to use of information in this specification and to the */
51/* implementation of this specification, and TCG disclaims all liability for */
52/* cost of procurement of substitute goods or services, lost profits, loss */
53/* of use, loss of data or any incidental, consequential, direct, indirect, */
54/* or special damages, whether under contract, tort, warranty or otherwise, */
55/* arising in any way out of use or reliance upon this specification or any */
56/* information herein. */
57/* */
58/* (c) Copyright IBM Corp. and others, 2016 - 2019 */
59/* */
60/********************************************************************************/
61
62/* 10.1.17 PRNG_TestVectors.h */
63
64#ifndef _MSBN_DRBG_TEST_VECTORS_H
65#define _MSBN_DRBG_TEST_VECTORS_H
66//#if DRBG_ALGORITHM == TPM_ALG_AES && DRBG_KEY_BITS == 256
67#if DRBG_KEY_SIZE_BITS == 256
68
69/* Entropy is the size of the state. The state is the size of the key plus the IV. The IV is a
70 block. If Key = 256 and Block = 128 then State = 384 */
71
72#define DRBG_TEST_INITIATE_ENTROPY \
73 0x0d, 0x15, 0xaa, 0x80, 0xb1, 0x6c, 0x3a, 0x10, \
74 0x90, 0x6c, 0xfe, 0xdb, 0x79, 0x5d, 0xae, 0x0b, \
75 0x5b, 0x81, 0x04, 0x1c, 0x5c, 0x5b, 0xfa, 0xcb, \
76 0x37, 0x3d, 0x44, 0x40, 0xd9, 0x12, 0x0f, 0x7e, \
77 0x3d, 0x6c, 0xf9, 0x09, 0x86, 0xcf, 0x52, 0xd8, \
78 0x5d, 0x3e, 0x94, 0x7d, 0x8c, 0x06, 0x1f, 0x91
79#define DRBG_TEST_RESEED_ENTROPY \
80 0x6e, 0xe7, 0x93, 0xa3, 0x39, 0x55, 0xd7, 0x2a, \
81 0xd1, 0x2f, 0xd8, 0x0a, 0x8a, 0x3f, 0xcf, 0x95, \
82 0xed, 0x3b, 0x4d, 0xac, 0x57, 0x95, 0xfe, 0x25, \
83 0xcf, 0x86, 0x9f, 0x7c, 0x27, 0x57, 0x3b, 0xbc, \
84 0x56, 0xf1, 0xac, 0xae, 0x13, 0xa6, 0x50, 0x42, \
85 0xb3, 0x40, 0x09, 0x3c, 0x46, 0x4a, 0x7a, 0x22
86#define DRBG_TEST_GENERATED_INTERM \
87 0x28, 0xe0, 0xeb, 0xb8, 0x21, 0x01, 0x66, 0x50, \
88 0x8c, 0x8f, 0x65, 0xf2, 0x20, 0x7b, 0xd0, 0xa3
89#define DRBG_TEST_GENERATED \
90 0x94, 0x6f, 0x51, 0x82, 0xd5, 0x45, 0x10, 0xb9, \
91 0x46, 0x12, 0x48, 0xf5, 0x71, 0xca, 0x06, 0xc9
92#elif DRBG_KEY_SIZE_BITS == 128
93#define DRBG_TEST_INITIATE_ENTROPY \
94 0x8f, 0xc1, 0x1b, 0xdb, 0x5a, 0xab, 0xb7, 0xe0, \
95 0x93, 0xb6, 0x14, 0x28, 0xe0, 0x90, 0x73, 0x03, \
96 0xcb, 0x45, 0x9f, 0x3b, 0x60, 0x0d, 0xad, 0x87, \
97 0x09, 0x55, 0xf2, 0x2d, 0xa8, 0x0a, 0x44, 0xf8
98#define DRBG_TEST_RESEED_ENTROPY \
99 0x0c, 0xd5, 0x3c, 0xd5, 0xec, 0xcd, 0x5a, 0x10, \
100 0xd7, 0xea, 0x26, 0x61, 0x11, 0x25, 0x9b, 0x05, \
101 0x57, 0x4f, 0xc6, 0xdd, 0xd8, 0xbe, 0xd8, 0xbd, \
102 0x72, 0x37, 0x8c, 0xf8, 0x2f, 0x1d, 0xba, 0x2a
103#define DRBG_TEST_GENERATED_INTERM \
104 0xdc, 0x3c, 0xf6, 0xbf, 0x5b, 0xd3, 0x41, 0x13, \
105 0x5f, 0x2c, 0x68, 0x11, 0xa1, 0x07, 0x1c, 0x87
106#define DRBG_TEST_GENERATED \
107 0xb6, 0x18, 0x50, 0xde, 0xcf, 0xd7, 0x10, 0x6d, \
108 0x44, 0x76, 0x9a, 0x8e, 0x6e, 0x8c, 0x1a, 0xd4
109#endif
110#endif // _MSBN_DRBG_TEST_VECTORS_H
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette