RSA Working Group Robert W. Baldwin Internet Draft RSA Data Security Expiration Date: December 25, 1999 June 25, 1999 Category: Informational TESTING THE BSAFE CRYPTOGRAPHIC SECURITY COMPONENTS Status of This Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026 except that the right to produce derivative works is not granted. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/1id-abstracts.html. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This memo provides information for the Internet community. This memo does not specify an Internet standard of any kind. Distribution of this memo is unlimited. Abstract This Internet-Draft describes how to test the correct operation of a cryptographic module that conforms to the API described in draft- baldwin-bsafe-00.txt. It covers test vectors, functional tests, and error case tests. Performance and stress testing is not included. In each test the expected results are described. Copyright Notice Copyright (C) The Internet Society (1999). All Rights Reserved Baldwin Informational, Expires 12/25/1999 1 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Table of Contents 1. Introduction 2. Understanding the Test Descriptions 3. Security Considerations 4. Reference Section 5. Author's Address 6. Trademark and Patent Issues 7. Copyright Section 8. Test Cases 1 Introduction This Internet-Draft is being distributed to members of the Internet community in order to solicit their reactions to the proposals contained in it. While the issues discussed may not be directly relevant to the research problems of the Internet, they may be interesting to a number of researchers and implementers. This is the companion document for draft-baldwin-bsafe-00.txt. Whereas that document described an application programming interface (API) for a general purpose cryptographic security module, this document describes a collection of test cases to confirm that an implementation of the API is correct. These test cases are not complete, but they form a good basis for accepting the correctness of an implementation. 1.1 Organization The next section presents information to help the reader understand the test case descriptions. Test case descriptions are in the last section of this document. 2 Understanding the Test Descriptions This section provides background information to help understand the test case descriptions. It covers the general concepts that are found in most calls to the API and topics such as memory allocation, and expected values that are specific to the testing system. 2.1 Status and Error Codes All API calls return a status code that is non-zero when an unusual event or error happens. The test cases are described in terms of a symbol called "_Status" that is set to the API return value, and a symbol called "_ExpectedStatus" that is set to the expected return code. The expected value is either set to zero or to one of the Baldwin Informational, Expires 12/25/1999 2 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 error symbols, such as BE_KEY_LEN, that are defined in the API specification. 2.2 The Chooser When an algorithm object is initialized by calling a function such as B_EncryptInit, a list of algorithm methods, called the chooser, is passed to that function. The initialization routine searches the chooser list for low-level functions used to implement the algorithm. For example, the algorithm object for DES-based password encryption, called AI_MD5WithDES_CBCPad, is implemented by methods called AM_DES_ENCRYPT and AM_MD5. The AMs are listed in the chooser. The test descriptions use the symbol "_Chooser" to represent the list of AMs set up for calls to the initialize routines. The list is terminated by the symbol "NULL_PTR", which is a value defined in the API specification. For example, Set "_Chooser" to "AM_MD5", "AM_DES_ENCRYPT", "NULL_PTR". The default Chooser includes all AMs and is called DEMO_ALGORITHM_CHOOSER. It is referenced in the test cases by a phrase such as: Set "_Chooser" to DEMO_ALGORITHM_CHOOSER. 2.3 The Surrender Context Some cryptographic operations can take a long time to complete, so BSAFE includes a mechanism, the surrender context, that allows the user to abort such operations. The surrender context contains a function pointer and a data pointer. During a long operation, the API routine calls the surrender context function and the data pointer is passed to it. If the function returns a non-zero value, the operation aborts. The test cases in this document describe this mechanism in terms of the symbol "_SurrenderContext". Most cases set this symbol to NULL_PTR, which in an acceptable value to pass to the API routines. When the surrender function is being tested, the cases contain a phrase such as: Set "_SurrenderContext" to track calls. This means that "_SurrenderContext" should point to a surrender context structure as defined in the API specification, and the function must track of the number of times it is called. That count is referred to by the phrase: "_counter" for "_SurrenderContext" Baldwin Informational, Expires 12/25/1999 3 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 To simulate a user abort after five calls, a phrase such as the following is used: Set "_counter" for "_SurrenderContext" to decimal value "0". Set "_SurrenderContext" to return error when counter reaches decimal value "5". 2.4 Info Structures When algorithm and key objects are initialized, they can be given parameters that control their behavior. These parameters are passed via "info structures" that are defined in the API specification. For example, when an algorithm of type AI_RC5_CBC is initialized by calling B_SetAlgorithmInfo, a pointer to an info structure is passed that contains the RC5 parameters, such as number of rounds, and word size. The test case descriptions use a phrase such as: info structure for "AI_RC5_CBC" to mean the appropriate structure from the API specification. In this case, it is a structure called A_RC5_CBC_PARAMS. To simplify the test description, the initialization of that structure is described as a list initialization. For example, the follow code fills in structure. Note that the first and fourth parameters are parsed as hexadecimal values, and the others are parsed as decimals. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "8899AABBCCDDEEFF". To check the value of information returned by B_GetAlgorithmInfo and B_GetKeyInfo, the test cases require a way to express the expected value; this is done using the phrase like: expected info structure for "AI_RC5_CBC" Later a statement checks the equality of the two structures. This means that the test environment assumes that there are two copies of each info structure. One is for setting and getting parameters, and the other for holding the expected value for later comparison. When no parameters are passed, the test is described by a sentence like: Set "_InfoPointer" to address of info structure for "AI_MD5" initialized from "NULL_PTR". What this means is that the "_InfoPointer" should be set to NULL_PTR before being passed to the initialization routine. Baldwin Informational, Expires 12/25/1999 4 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 2.5 Loading Buffers from Info Structures Some test cases attempt to manipulate and display information returned by the B_Get*Info API routines as data buffers. This is expressed by a sentence that begins with the word "Load," for example, Load buffer "infoBuf" from info structure for "AI_RC5_CBC". This is equivalent to saying: Set buffer "infoBuf" to hex value "100000000c000000200000008899AABBCCDDEEFF". When the info structure is a pointer to a byte array such as the initialization vector of a CBC cipher, the meaning of a load is straightforward. For complicated structures such as private keys, the resulting buffer is the concatenation of the bytes that make up the fields of the structure. Values that are integers use four bytes, and byte arrays such as public key exponents are copied with the least significant byte first. 2.6 Data Buffers To simplify handling data passed to the API calls, the test cases use the concept of named buffers. Buffer are created with a maximum size, for example: Create buffer "input" of decimal value "100" bytes. Buffers can be initialized from hexadecimal constants or ascii strings as, follows: Set buffer "input" to hex value "6665". Set buffer "input" to string value "BA". For hexadecimal values, pairs of characters become an eight-bit value, which is stored in successive memory locations. It is also possible to initialize one buffer from another, as follows. Set buffer "expected" to contents of buffer "input". These buffers keep track of the number of bytes that are initialized and the number that are free. Normally bytes are appended to output buffers and read from the beginning of input buffers. The special sentence: Finalize buffer "input". Baldwin Informational, Expires 12/25/1999 5 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 means that the number of initialized bytes will be set to zero when it is next used as an output buffer, but until then an operation like: Display buffer "input". will display all the initialized bytes even though the buffer has been finalized. The amount of initialized data in a buffer can be directly manipulated by a sentence like: Set length of buffer "input" to decimal value "10". This changes the initialized length of the buffer without changing the contents, which is particularly convenient for tests that are trying different input sizes. 2.7 Data Append and Extract Buffers can be manipulated by concatenation like: Append buffer "input" with hex value "6768". Sub-ranges of bytes in a buffer can be extracted. For example, the following sentence means that "toBuf" should be set to the first five bytes of "fromBuf". Set buffer "toBuf" to bytes extracted from buffer "fromBuf" starting at offset decimal value "0" extending for decimal value "5" bytes. 2.8 Incrementing and Decrementing Buffers In order to iterate over a range of values, such as key size, the test cases use a phrase such as: Increment buffer "keySize" by decimal value "8". The decimal value is converted to a 16-bit integer that is added to the first two bytes of the value in the buffer "keySize". Buffer values can be converted into integers that are passed as parameters to API calls or as part of the initialization of info structures. The bytes in the buffer are converted to unsigned integers treating them as least significant byte first. Thus, a two byte buffer containing the hexadecimal value "01" becomes the integer one, and "FF01" becomes five hundred and eleven. Baldwin Informational, Expires 12/25/1999 6 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 2.9 The ITEM structure The API specification includes a data structure called "ITEM" that expresses the location and length of an array of bytes. The routines, B_EncodeDigestInfo and B_DecodeDigestInfo, have parameters that are pointers to ITEM structures. This is expressed by the following phrase: address of ITEM describing buffer "digest" The ITEM structure would identify the start of the buffer and the number of initialized bytes. 2.10 Displaying and Checking Results The test case descriptions include expected results using sentences such as: Check equality of "_Status" with "_ExpectedStatus". Check equality of info structure for "infoType" with expected info structure for "infoType". Check equality of buffer "dataObject" with hex value "09aa". The equality checks can be over integer values like "_Status", buffers (expressed as hex or string values or the contents of a named buffer), or info structures. If any check fails the test case does not pass, though it may be worth continuing with the rest of the test case to get more information about the nature of the failure. To help with manual debugging of the test cases, there is often a sentence about displaying a value before checking it against an expected value. If everything is working, these could be ignored, but during testing they may be helpful. The following are examples of such sentences. Display "_counter" for "_SurrenderContext". Display "_Chooser". Display info structure for "infoType". Display buffer "digest". Display buffer "digest" as ascii string. 2.11 Loops Baldwin Informational, Expires 12/25/1999 7 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 To help test a range of parameters for the API calls, the test case descriptions include loops that can be nested. The number of times that a loop is iterated is specified and when the loop is done, it is helpful to display performance data such as execution times. Please refer to the following example: Begin a loop of decimal value "32" iterations. Set "_InfoPointer" to address of info structure for "AI_RSAKeyGen" initialized from contents of buffer "keySize", "010001". Call B_SetAlgorithmInfo passing "generateAlg" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment buffer "keySize" by decimal value "8". End the loop and display execution times. The preceding example tests initializing a key generator algorithm using different key sizes. 2.12 Memory Allocation Errors Several test cases confirm that the implementation behaves reasonably when the platform runs out of memory. Memory is allocated via a user supplied routine called "T_malloc" which returns zero if the allocation succeeded. To simulate memory errors the tests call for that routine to return an error or return its normal value. See the following example. Set "_T_malloc" to return errors. Set "_ExpectedStatus" to "BE_ALLOC". Call B_SetAlgorithmInfo passing "des" and "AI_DES_CBC_IV8" and "1122334455667788". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_T_malloc" to return normal. The preceding confirms that one API routine detects and reports memory allocation errors. 3 Security Considerations This document provides test cases that help ensure that an implementation of the cryptographic API described in draft-baldwin- bsafe-00.txt is behaving as expected. The security of applications built on top of that API will depend on its correctness, so testing is very important. In addition good software development practices should be followed such as code review, especially for new code introduced to fix bugs. The test cases are not exhaustive, so they cannot in themselves ensure correctness. Baldwin Informational, Expires 12/25/1999 8 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Other features of a well-written cryptographic module cannot be tested via its API. For example, all sensitive data such as keys should be zeroed as soon as possible to reduce the chances of leaking them inadvertently. Issues like these are beyond the scope of this document. 4 References Consult the following references for a better understanding of the algorithms and processes exercised by the test cases described in this document. draft-baldwin-bsafe-00.txt Baldwin, et al., BSAFE Cryptographic Security Components, May 1999. FIPS PUB 46-1 National Bureau of Standards. FIPS Publication 46-1: Data Encryption Standard, January 1988. FIPS PUB 81 National Bureau of Standards. FIPS Publication 81: DES Modes of Operation, December 1980. FIPS PUB 180-1 National Institute of Standards and Technology. FIPS Publication 180-1: Secure Hash, May 1993. FIPS PUB 186 National Institute of Standards and Technology. FIPS Publication 186: Digital Signature Standard, May 1994. P1363 Draft D1 IEEE. Standard Specifications for Public Key Cryptography, December 1997. RFC 1113 J. Linn. RFC 1113: Privacy Enhancement for Internet Electronic Mail: Part I, Message Encipherment and Authentication Procedures, August 1989. RFC 1319 B. Kaliski. The MD2 Message-Digest Algorithm, April 1992. RFC 1321 R. Rivest. The MD5 Message-Digest Algorithm, April 1992. RFC 1423 Baldwin Informational, Expires 12/25/1999 9 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 D. Balenson. RFC 1423: Privacy Enhancement for Internet Electronic Mail: Part III Algorithms, Modes, and Identifiers, February 1993. X.208 CCITT. Recommendation X.208: Specification of Basic Encoding Rules for Abstract Syntax Notation One (ASN.1), 1988. X.209 CCITT. Recommendation X.209: Specification of Abstract Syntax Notation One (ASN.1), 1988. X.509 CCITT. Recommendation X.509: The Directory Authentication Framework, 1988. X9.31 Draft Digital signatures Using Reversible Public Key Cryptography for the Financial Services Industry. December 1997. X9.44 Draft Key management using reversible public key cryptography for the financial services industry, January 1998. X9.52 Draft Triple Data Encryption Algorithm Modes of Operation, December 1997. X9.57 Draft ANSI. Certificate Management, N5-95, June 15, 1995. X9.62 Draft ANSI. The Elliptic Curve Digital Signature Algorithm (ECDSA), August 29, 1997. X9.63 Draft Public Key Cryptography for the Financial Services Industry: Elliptic Curve Key Agreement and Transport Protocol, December 1997. [NIST91] NIST. Special Publication 500-202: Stable Implementation Agreements for Open Systems Interconnection Protocols. Version 5, Edition 1, Part 1,. December 1991. PKCS Suite The following references are from the RSA Data Security Public-Key Cryptography Standards (PKCS) suite. Baldwin Informational, Expires 12/25/1999 10 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 PKCS documents are available by anonymous FTP from the host ftp.rsa.com in the files pub/pkcs/pkcs*.ps, or by sending electronic mail to pkcs@rsa.com. PKCS 1 RSA Data Security PKCS 1: RSA Encryption Standard, Version 1.5, November 1993. PKCS 3 RSA Data Security PKCS 3: Diffie-Hellman Key Agreement Standard, Version 1.4, November 1993. PKCS 5 RSA Data Security PKCS 5: Password-Based Encryption Standard, Version 1.5, November 1993. PKCS 7 RSA Data Security PKCS 7: Cryptographic Message Syntax Standard, Version 1.5, November 1993. PKCS 8 RSA Data Security PKCS 8: Private-Key Information Syntax Standard, Version 1.2, November 1993. 5 Author Information Robert W. Baldwin Plus Five Consulting, Inc. 990 Amarillo Avenue Palo Alto, CA 94303 Voice: +1 650-852-9675 Fax: +1 650-852-9675 Email: baldwin@plusfive.com, baldwin@lcs.mit.edu 6 Trademarks and Patents RC2, RC4, and RC5 are registered trademarks, and BCERT, BSAFE, MD2, MD4, MD5, PKCS, RC5, RC6, RSA Public Key Cryptosystem, S/MAIL and TIPEM are trademarks of RSA Data Security. The RSA Public Key Cryptosystem@ is protected by U.S. Patent 4,405,829. The RC5@ algorithm is protected by U.S. Patents 5,724,428, and 5,835,600. 7 Copyright Baldwin Informational, Expires 12/25/1999 11 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Copyright The Internet Society June 1999. All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNETENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be found in BCP-11. Copies of claims of rights mad available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF Secretariat. 8 Test Cases There are 179 test case descriptions. Each description begins with a phrase like: This is the start of test case "TVDES00". and ends with the phrase like: This is the end of test case "TVDES00". These phrases can be used to find and separate the cases. Baldwin Informational, Expires 12/25/1999 12 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 This is the start of test case "TV111300". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: RFC 1113 vectors test Note: ------------------------------------------------------- Create algorithm object "rfc1113". Call B_CreateAlgorithmObject passing "rfc1113". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "inputData" of decimal value "100" bytes. Create buffer "encodedData" of decimal value "100" bytes. Create buffer "decodedData" of decimal value "100" bytes. Create buffer "expectedResult" of decimal value "100" bytes. Note: Initialize, set up expected and input data Set "_InfoPointer" to address of info structure for "AI_RFC1113Recode" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "rfc1113" and "AI_RFC1113Recode" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "expectedResult" with string value "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+ /". Set buffer "inputData" to hex value "00108310518720928b30d38f411 49351559761969b71d79f8218a39259a7a29aabb2dbafc31cb3d35db7e39ebbf 3dfbf". Call Call B_EncodeInit passing "rfc1113". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncodeUpdate passing "rfc1113" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Call B_EncodeFinal passing "rfc1113" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and Baldwin Informational, Expires 12/25/1999 13 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call Call B_DecodeInit passing "rfc1113". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecodeUpdate passing "rfc1113" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "expectedResult" and length of initialized bytes in buffer "expectedResult" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Call B_DecodeFinal passing "rfc1113" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "decodedData" with contents of buffer "inputData". This is the end of test case "TV111300". This is the start of test case "TVDHKA01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 1024 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 1020 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Note: The first party uses AI_MD5Random with a predetermined Baldwin Informational, Expires 12/25/1999 14 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: initialization Note: vector to generate its private key. Note: The second party uses AI_MD2Random with it own given Note: initialization vector Note: to generate its private key. Note: Both parties then exchange their public keys to compute Note: the shared Note: secret key. The generated secret keys are compared to Note: each other as well Note: the validated test vector. Note: Summary Note: Given 1024 bit prime and base, and two different Note: initialization vectors, Note: generate key pairs using MD5Random for first party and Note: MD2Random for Note: second party. Compare computed secret key to expected Note: test vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "NULL_PTR". Set "_Chooser" to "AM_MD2_RANDOM", "AM_MD5_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD5RandIV" of decimal value "200" bytes. Create buffer "MD2RandIV" of decimal value "200" bytes. Create buffer "outputA" of decimal value "500" bytes. Create buffer "outputB" of decimal value "500" bytes. Create buffer "BERString" of decimal value "700" bytes. Create buffer "publicKey1" of decimal value "500" bytes. Create buffer "publicKey2" of decimal value "500" bytes. Create buffer "sharedKey" of decimal value "500" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "3082011a06092a864886f70d010 3013082010b02818100dbcd42df86e82fb68043278858d367129f6c7bb36c90c 0732104ba84a39609d0e29ea6eb0ea5eb8627e0b158220fc142bb41e7c6043d6 Baldwin Informational, Expires 12/25/1999 15 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 977313265a979fb6704253010a166a94c2f31106bfe2fa0ff1c8a2b6f8bb61ed 59748c5a163df75c13a86922e7a0ee61cb9bd362fd356dcbbdf007f4b05bdce0 266547f884236c0f4130281802a88dee01f73b9d1ebaac980dd63da367413f7e 87eb53d1d676ec33c2aeec8178079e0a90af6e2915f8da4fb2a25473968010f0 2f0fa775fd71eac415f8e243e1ed54b6f594509130a9c1714d64e681660b353f 392a3f17d90a31665a7ddc7e4a33dc24ad0879414e7409213ea7cf841d872508 f387d9e1a3f9b9b124d9ee583020203fc". Set buffer "MD5RandIV" to hex value "23d986c764b8b77a2394f7a32f9 678a2395f8c4768d7c235". Set buffer "MD2RandIV" to hex value "1a9576d61839a56c71b68bb0960 e01f7e6a62d3083e31448a98d03e7". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "5ac14c93fe7426b9e354b02756 b430aadc9a219bc37aa477293b0478e8ee96ac619009f3f3b509cb6cf8b3f053 a0362d607acf3c210746f91d62164b1cd16050ba7790129edd96d25da7057fb2 81a29724a4d9efb4a8c80e78ea50fd62fd8f2eb1a3267fcab766c7f33b7ff9aa a6d501b266421644ac8931a5dcd6fb22b56259". Set buffer "publicKey2" to hex value "cb7ce208f7df9e030948ae3b7e 4d3ca8a9b1b8ce7ea6347e52ba7236786a79c481d77d8851bb99ef0af0a8ee85 e1e1c1c85361258e7505f9a972c183086d011649df80b0cbbe017d2b4c509b02 610b8d733e235f86e3552c15eba074108a5b64d620e3e9f9effd93a1eecf56dc 898ed5d60fb78e31d334a033a83c76851d5246". Set buffer "sharedKey" to hex value "d2eade2c91679262c1ded50d9cd bc01a009527df57bad5c7f8349f9214cbe4576fdd8ab4480fef6ab54d32fd88e d1ab5e57fc0e1177632818f99bab51756e9138c403301e369af1be611095a5a5 b5b84e1c89353b300cec8ecd26c7297674b6aa9d9e6eae900d0a33a930ceda95 6541de57a0b7198df4999ba137ecfe5cc6d32". Note: Initialize an AI_MD5Random Algorithm for first party Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of Baldwin Informational, Expires 12/25/1999 16 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 first initialized byte in "MD5RandIV" and length of initialized bytes in "MD5RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Initialize an AI_MD2Random Algorithm for second party Create algorithm object "diffRandomAlgorithm". Call B_CreateAlgorithmObject passing "diffRandomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "diffRandomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "diffRandomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "diffRandomAlgorithm" and address of first initialized byte in "MD2RandIV" and length of initialized bytes in "MD2RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 17 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "diffRandomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer "publicKey2". Baldwin Informational, Expires 12/25/1999 18 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA01". This is the start of test case "TVDHKA02". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 256 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 255 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Note: Both parties use the same AI_MD2Random stream to generate Note: their Note: private keys. This stream is first initialized with Baldwin Informational, Expires 12/25/1999 19 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: default vector, used Note: by the first party and then reused by the second party. Note: Both parties then exchange their public keys in order to Note: compute their shared Note: secret key. The generated secret keys are compared to Note: each other as well Note: the expected test vector. Note: Summary Note: Given 256 bit prime and base, both parties, using a Note: single MD2Random stream, Note: generate key pairs. The computed secret key are compared Note: to an expected Note: test output vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD2_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD2RandIV" of decimal value "100" bytes. Create buffer "outputA" of decimal value "100" bytes. Create buffer "outputB" of decimal value "100" bytes. Create buffer "BERString" of decimal value "400" bytes. Create buffer "publicKey1" of decimal value "100" bytes. Create buffer "publicKey2" of decimal value "100" bytes. Create buffer "sharedKey" of decimal value "100" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "305606092a864886f70d0103013 049022100e258c44a865a04f557e37d29434d78483e007d1ff291650b88f2673 b37f9d73702200848be4dd9cb89f026f154f4cbf7647e889f5470cc32b203024 4ea155b4f7312020200ff". Set buffer "MD2RandIV" to hex value "". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "2256491874c200af37d9a4f143 Baldwin Informational, Expires 12/25/1999 20 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 7b66b9404dfea12d6a4b8ae86cd922b38ea6a6". Set buffer "publicKey2" to hex value "2bd79041f043c06d015c8ea70b 5a0bc63aec6364cffbb1b3fa83bbd14111ba37". Set buffer "sharedKey" to hex value "7517dddd0748b77d6975ddf611e eb0b01839183947be7c1d9216ce41582b907c". Note: Initialize an AI_MD2Random Algorithm Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "MD2RandIV" and length of initialized bytes in "MD2RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Baldwin Informational, Expires 12/25/1999 21 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer Baldwin Informational, Expires 12/25/1999 22 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA02". This is the start of test case "TVDHKA03". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 256 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 255 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Note: Both parties use the same AI_MD2Random stream to generate Baldwin Informational, Expires 12/25/1999 23 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: their Note: private keys. This stream is first initialized with a Note: zero vector, used Note: by the first party and then reused by the second party. Note: Both parties then exchange their public keys in order to Note: compute their shared Note: secret key. The generated secret keys are compared to Note: each other as well Note: the expected test vector. Note: Summary Note: Given 256 bit prime and base, both parties, using a Note: single MD2Random stream Note: generate key pairs. The computed secret key are compared Note: to an expected Note: test output vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD2_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD2RandIV" of decimal value "256" bytes. Create buffer "outputA" of decimal value "500" bytes. Create buffer "outputB" of decimal value "500" bytes. Create buffer "BERString" of decimal value "700" bytes. Create buffer "publicKey1" of decimal value "500" bytes. Create buffer "publicKey2" of decimal value "500" bytes. Create buffer "sharedKey" of decimal value "500" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "305606092a864886f70d0103013 049022100e258c44a865a04f557e37d29434d78483e007d1ff291650b88f2673 b37f9d73702200848be4dd9cb89f026f154f4cbf7647e889f5470cc32b203024 4ea155b4f7312020200ff". Set buffer "MD2RandIV" to hex value "000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 Baldwin Informational, Expires 12/25/1999 24 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "258df51efcb0eb0e91c4faadc1 611c52338a8669fc3968422c086a99007e183b". Set buffer "publicKey2" to hex value "4370b03dc70378a4f758b46e11 2afd6182bd87ac1d958ca10af4232bcc2d4b46". Set buffer "sharedKey" to hex value "52726473d2435e45ee4177da4aa 4dfbbec2fcdb58e8496396b9547cd891e7849". Note: Initialize an AI_MD2Random Algorithm Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "MD2RandIV" and length of initialized bytes in "MD2RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 25 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 26 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA03". This is the start of test case "TVDHKA04". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Baldwin Informational, Expires 12/25/1999 27 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test Diffie-Hellman Key Agreement using 256 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 255 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Note: Both parties use the same AI_MD2Random object to generate Note: their Note: private keys. This object is first initialized with a Note: given vector, used Note: by the first party and then reused by the second party. Note: Both parties then exchange their public keys to compute Note: their shared Note: secret key. The generated secret keys are compared to Note: each other as well Note: the expected test vector. Note: Summary Note: Given 256 bit prime and base, both parties, using a Note: single MD2Random stream Note: generate key pairs. The computed secret key are compared Note: to an expected Note: test output vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD2_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD2RandIV" of decimal value "100" bytes. Create buffer "outputA" of decimal value "100" bytes. Create buffer "outputB" of decimal value "100" bytes. Create buffer "BERString" of decimal value "400" bytes. Create buffer "publicKey1" of decimal value "100" bytes. Create buffer "publicKey2" of decimal value "100" bytes. Baldwin Informational, Expires 12/25/1999 28 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "sharedKey" of decimal value "100" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "305606092a864886f70d0103013 049022100e258c44a865a04f557e37d29434d78483e007d1ff291650b88f2673 b37f9d73702200848be4dd9cb89f026f154f4cbf7647e889f5470cc32b203024 4ea155b4f7312020200ff". Set buffer "MD2RandIV" to hex value "1111111111111111". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "5b8b3dbadf868513443a77e26e 78611ed94bdbde5a8dda55fd80b6ee9fd65b62". Set buffer "publicKey2" to hex value "0704b308d65333b4c8374036a2 192a6c340b73a05b7766b605944c922f599e25". Set buffer "sharedKey" to hex value "77fa3337e3ea610b61a2d4d9fd3 b75e406dae13a089f684f628f2a1e7ee2b2d6". Note: Initialize an AI_MD2Random Algorithm Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "MD2RandIV" and length of initialized bytes in "MD2RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Baldwin Informational, Expires 12/25/1999 29 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" Baldwin Informational, Expires 12/25/1999 30 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA04". This is the start of test case "TVDHKA05". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 31 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 256 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 255 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Note: The first party uses AI_MD2Random with a given Note: initialization Note: vector to generate its private key. The second party uses Note: AI_MD5Random Note: with a given initialization vector to generate its Note: private key. Note: Both parties then exchange their public keys in order to Note: compute their shared Note: secret key. The generated secret keys are compared to Note: each other as well Note: the expected test vector. Note: Summary Note: Given 256 bit prime and base, and two different Note: initialization vectors, Note: generate key pairs using MD2Random for first party and Note: MD5Random for Note: second party. Compare computed secret key to expected Note: test vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD2_RANDOM", "AM_MD5_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD5RandIV" of decimal value "200" bytes. Baldwin Informational, Expires 12/25/1999 32 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "MD2RandIV" of decimal value "200" bytes. Create buffer "outputA" of decimal value "100" bytes. Create buffer "outputB" of decimal value "100" bytes. Create buffer "BERString" of decimal value "400" bytes. Create buffer "publicKey1" of decimal value "100" bytes. Create buffer "publicKey2" of decimal value "100" bytes. Create buffer "sharedKey" of decimal value "100" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "305606092a864886f70d0103013 049022100e258c44a865a04f557e37d29434d78483e007d1ff291650b88f2673 b37f9d73702200848be4dd9cb89f026f154f4cbf7647e889f5470cc32b203024 4ea155b4f7312020200ff". Set buffer "MD2RandIV" to hex value "1111111111111111". Set buffer "MD5RandIV" to hex value "2222222222222222". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "5b8b3dbadf868513443a77e26e 78611ed94bdbde5a8dda55fd80b6ee9fd65b62". Set buffer "publicKey2" to hex value "54f1f6c5701e4301e806252fa2 1ad748b65e625fd763017b60ff560e32e9aa83". Set buffer "sharedKey" to hex value "1073ea0d67069431757a09c202a d224372b41d5eb38b07f436dd2b0228e8add4". Note: Initialize an AI_MD2Random Algorithm for first party Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "MD2RandIV" and length of initialized bytes in "MD2RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 33 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Initialize an AI_MD5Random Algorithm for second party Create algorithm object "diffRandomAlgorithm". Call B_CreateAlgorithmObject passing "diffRandomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "diffRandomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "diffRandomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "diffRandomAlgorithm" and address of first initialized byte in "MD5RandIV" and length of initialized bytes in "MD5RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer Baldwin Informational, Expires 12/25/1999 34 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "diffRandomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 35 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA05". This is the start of test case "TVDHKA06". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 256 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 250 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Using Note: distinct AI_MD5Random streams, each party generates its Note: own private key. Note: Both parties then exchange their public keys in order to Note: compute their shared Note: secret key. The generated secret keys are compared to Note: each other as well Note: the expected test vector. Note: Summary Baldwin Informational, Expires 12/25/1999 36 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Given 256 bit prime and base, and two different Note: initialization vectors, Note: generate key pairs using MD5Random for both parties. Note: Compare computed secret key to expected test vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD5_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD5RandIV1" of decimal value "200" bytes. Create buffer "MD5RandIV2" of decimal value "200" bytes. Create buffer "outputA" of decimal value "100" bytes. Create buffer "outputB" of decimal value "100" bytes. Create buffer "BERString" of decimal value "400" bytes. Create buffer "publicKey1" of decimal value "100" bytes. Create buffer "publicKey2" of decimal value "100" bytes. Create buffer "sharedKey" of decimal value "100" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "305706092a864886f70d0103013 04a022100fb3c81d44a514f036074162330e5930dfb8bc1362b340f79f10a56b dc9e0cb9f0221008b2075349fef00f168614cf5c50d3268ff3c939824ad85c2a 8237f196ba889c3020200fa". Set buffer "MD5RandIV1" to hex value "1415161718191a1b868788898a 8b8c8d". Set buffer "MD5RandIV2" to hex value "1c1d1e1f202122238e8f909192 939495". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "c37aa9bfca38ef8c393afa8694 144198b8c315abfbb8c4f8fdff2305ffc39ee0". Set buffer "publicKey2" to hex value "6fb23248ecd17e729d45ea7cb5 e18f3e629d3cabde0730376b6686e5f9cac2f8". Baldwin Informational, Expires 12/25/1999 37 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "sharedKey" to hex value "e67b0aa166e697339d2ab922242 c9c71b3524943673d9a59fffeb6be337c409b". Note: Initialize an AI_MD5Random Algorithm for first party Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "MD5RandIV1" and length of initialized bytes in "MD5RandIV1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Initialize an AI_MD5Random Algorithm for second party Create algorithm object "diffRandomAlgorithm". Call B_CreateAlgorithmObject passing "diffRandomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "diffRandomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "diffRandomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "diffRandomAlgorithm" and address of first initialized byte in "MD5RandIV2" and length of initialized bytes in "MD5RandIV2" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 38 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 39 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "diffRandomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Baldwin Informational, Expires 12/25/1999 40 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA06". This is the start of test case "TVDHKA07". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 256 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 246 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Note: The first party uses AI_MD5Random with a given Note: initialization vector to Note: generate its private key. The second party uses Note: AI_MD2Random with a Note: given initialization vector to generate its private key. Note: Both parties then exchange their public keys in order to Note: compute their shared Note: secret key. The generated secret keys are compared to Note: each other as well Note: the expected test vector. Note: Summary Note: Given 256 bit prime and base, and two different Note: initialization vectors, Note: generate key pairs using distinct MD5Random streams for Note: each party. Note: Compare computed secret key to expected test vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD2_RANDOM", "AM_MD5_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 41 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD2RandIV" of decimal value "200" bytes. Create buffer "MD5RandIV" of decimal value "200" bytes. Create buffer "outputA" of decimal value "100" bytes. Create buffer "outputB" of decimal value "100" bytes. Create buffer "BERString" of decimal value "400" bytes. Create buffer "publicKey1" of decimal value "100" bytes. Create buffer "publicKey2" of decimal value "100" bytes. Create buffer "sharedKey" of decimal value "100" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "305606092a864886f70d0103013 049022100e7a16d36abadc1d0a635ede9b09409dafd40833bed2de7df617fce4 0424de9b90220043ddbaf7de9d0b663b9c726599362332123aa3f3056eca33cb ebc5602f160aa020200f6". Set buffer "MD5RandIV" to hex value "71263a457a26571d23657f6f35e 67f129a85e472d18b56". Set buffer "MD2RandIV" to hex value "3c285c6c583d27a549bbb23859a 1f2816345a51236f3ef2a542d1b56". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "c8a1e5d14ce2ab219685e0d085 a8ab78e161dd18958d27ff2977b5727516c073". Set buffer "publicKey2" to hex value "2f2b40c49f13577ef90fbd8906 01ea7c282c8329c7e17e0221183211b62d77c0". Set buffer "sharedKey" to hex value "30509f5a6175d22c8c0ea766fe4 e72508be661d37809464e829f152467c3dc9d". Note: Initialize an AI_MD5Random Algorithm for first party Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 42 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "MD5RandIV" and length of initialized bytes in "MD5RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Initialize an AI_MD2Random Algorithm for second party Create algorithm object "diffRandomAlgorithm". Call B_CreateAlgorithmObject passing "diffRandomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "diffRandomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "diffRandomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "diffRandomAlgorithm" and address of first initialized byte in "MD2RandIV" and length of initialized bytes in "MD2RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Baldwin Informational, Expires 12/25/1999 43 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display info structure for "AI_DHKeyAgree". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "diffRandomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 44 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "outputB" with contents of buffer "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA07". This is the start of test case "TVDHKA08". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 300 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 290 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Baldwin Informational, Expires 12/25/1999 45 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Both parties use the same AI_MD2Random object to generate Note: their Note: private keys. This object is initialized with the default Note: vector, used Note: by the first party and then reused by the second party. Note: Both parties then exchange their public keys to compute Note: their shared Note: secret key. The generated secret keys are compared to Note: each other as well Note: the expected test vector. Note: Summary Note: Given 300 bit prime and base, both parties, using a Note: single MD2Random stream Note: generate key pairs. The computed secret key are compared Note: to an expected Note: test output vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD2_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD2RandIV" of decimal value "100" bytes. Create buffer "outputA" of decimal value "100" bytes. Create buffer "outputB" of decimal value "100" bytes. Create buffer "BERString" of decimal value "400" bytes. Create buffer "publicKey1" of decimal value "100" bytes. Create buffer "publicKey2" of decimal value "100" bytes. Create buffer "sharedKey" of decimal value "100" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "306106092a864886f70d0103013 05402260c7fdfb89ef76a1e3c795febb4fa73dd5d0756c30ff5be5ef9e4ff056 cf122e343721a554767022603ab528e75b353e8935d9f5454ef3204747ea8b00 c97f8d0277516d5fcbef1a3c2ba8d90180e02020122". Set buffer "MD2RandIV" to hex value "". Baldwin Informational, Expires 12/25/1999 46 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "01f4b285e206ffd9e2626f4b14 1cbccf4c37ca504d7a849d425adce0bb08d7c09660dbee9a64". Set buffer "publicKey2" to hex value "02d04256a5fcf8bab73ac22df8 688edb557e84ebb43b7bce26451c7d9fbbe7306d0cd502a631". Set buffer "sharedKey" to hex value "00db3b3072f1e90b6bba1197dc0 e73b37674a4b7cbbe8ec3095fcc93c8ef15dbd5ba5d93e066". Note: Initialize an AI_MD2Random Algorithm Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "MD2RandIV" and length of initialized bytes in "MD2RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Baldwin Informational, Expires 12/25/1999 47 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 48 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA08". This is the start of test case "TVDHKA09". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 300 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 290 bit private Note: exponents. Baldwin Informational, Expires 12/25/1999 49 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: This information is provided in the form of a BER encoded Note: string. Note: Both parties use the same AI_MD2Random object to generate Note: their Note: private keys. This object is initialized with a zero Note: vector, used Note: by the first party and then reused by the second party. Note: Both parties then exchange their public keys in order to Note: compute their shared Note: secret key. The generated secret keys are compared to Note: each other as well Note: the expected test vector. Note: Summary Note: Given 300 bit prime and base, both parties, using a Note: single MD2Random stream Note: generate key pairs. The computed secret key are compared Note: to an expected Note: test output vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD2_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD2RandIV" of decimal value "256" bytes. Create buffer "outputA" of decimal value "100" bytes. Create buffer "outputB" of decimal value "100" bytes. Create buffer "BERString" of decimal value "400" bytes. Create buffer "publicKey1" of decimal value "100" bytes. Create buffer "publicKey2" of decimal value "100" bytes. Create buffer "sharedKey" of decimal value "100" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "306106092a864886f70d0103013 05402260c7fdfb89ef76a1e3c795febb4fa73dd5d0756c30ff5be5ef9e4ff056 cf122e343721a554767022603ab528e75b353e8935d9f5454ef3204747ea8b00 c97f8d0277516d5fcbef1a3c2ba8d90180e02020122". Baldwin Informational, Expires 12/25/1999 50 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "MD2RandIV" to hex value "000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "01685726135d90b1724e7c7e13 23e1e3ae7554b848ed82bb26eddf65540bdc84d46ec64b5aa9". Set buffer "publicKey2" to hex value "0aa7ae5ae28d98d2ca7d817671 202caa2edf76c8ebc9f1f7b60c01fd40ccac7f53b4fd0b569a". Set buffer "sharedKey" to hex value "09494f96a9641fd6be6142d8443 c6bd5391ca6f4c7e5b93816f102cc412e8c1476f5269240d8". Note: Initialize an AI_MD2Random Algorithm Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "MD2RandIV" and length of initialized bytes in "MD2RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer Baldwin Informational, Expires 12/25/1999 51 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Baldwin Informational, Expires 12/25/1999 52 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA09". This is the start of test case "TVDHKA10". Baldwin Informational, Expires 12/25/1999 53 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 300 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 290 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Note: Both parties use the same AI_MD2Random object to generate Note: their Note: private keys. This object is initialized with a given Note: test vector, used Note: by the first party and then reused by the second party. Note: Both parties then exchange their public keys in order to Note: compute their shared Note: secret key. The generated secret keys are compared to Note: each other as well Note: the expected test vector. Note: Summary Note: Given 300 bit prime and base, both parties, using a Note: single MD2Random stream Note: generate key pairs. The computed secret key are compared Note: to an expected Note: test output vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD2_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD2RandIV" of decimal value "100" bytes. Create buffer "outputA" of decimal value "100" bytes. Baldwin Informational, Expires 12/25/1999 54 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "outputB" of decimal value "100" bytes. Create buffer "BERString" of decimal value "400" bytes. Create buffer "publicKey1" of decimal value "100" bytes. Create buffer "publicKey2" of decimal value "100" bytes. Create buffer "sharedKey" of decimal value "100" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "306106092a864886f70d0103013 05402260c7fdfb89ef76a1e3c795febb4fa73dd5d0756c30ff5be5ef9e4ff056 cf122e343721a554767022603ab528e75b353e8935d9f5454ef3204747ea8b00 c97f8d0277516d5fcbef1a3c2ba8d90180e02020122". Set buffer "MD2RandIV" to hex value "123456789abcdef0". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "0a4cf11676a3a91ff33cd1f727 62ee3aef1b64bb3acf7bd82b47e5323a9457084f58a06bdace". Set buffer "publicKey2" to hex value "070f06c116dec187fe28c82000 9629510279a5bebd18760d5f8cda6e3edbca9560760e311066". Set buffer "sharedKey" to hex value "05ab11f65f73d8fbe909c5f6b9a 90aaca01a9e168191dab2148d2ff0645256680dd0148eea6d". Note: Initialize an AI_MD2Random Algorithm Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "MD2RandIV" and length of initialized bytes in "MD2RandIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Baldwin Informational, Expires 12/25/1999 55 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Baldwin Informational, Expires 12/25/1999 56 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) Baldwin Informational, Expires 12/25/1999 57 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 This is the end of test case "TVDHKA10". This is the start of test case "TVDHKA11". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 479 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 470 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Note: The first party uses AI_MD5Random with a given Note: initialization Note: vector to generate its private key. The second party uses Note: AI_MD2Random Note: with the same initialization vector to generate its Note: private key. Note: Both parties then exchange their public keys to compute Note: their shared Note: secret key. The generated secret keys are compared to Note: each other as well Note: the expected test vector. Note: Summary Note: Given 479 bit prime and base, and an initialization Note: vector, Note: generate key pairs using MD5Random for first party and Note: MD2Random for Note: second party. Compare computed secret key to expected Note: test vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD2_RANDOM", "AM_MD5_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Baldwin Informational, Expires 12/25/1999 58 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "randIV" of decimal value "200" bytes. Create buffer "outputA" of decimal value "100" bytes. Create buffer "outputB" of decimal value "100" bytes. Create buffer "BERString" of decimal value "400" bytes. Create buffer "publicKey1" of decimal value "100" bytes. Create buffer "publicKey2" of decimal value "100" bytes. Create buffer "sharedKey" of decimal value "100" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "30818e06092a864886f70d01030 1308180023c6d861a736462e5f2628eefbf4c9913522a4dfde5b655b02ef2519 3616bd3f5ddd36d6321ec01a8f0c4fd4e44d9e02fb019e45e19b42f469d434e6 70d023c1785465a832ac028ad4ee07b8dc73b0b59612c2747b3e26e3f8589796 87df06da851a17d2eca9c05e06d3da832092fd7d816566c80151cc95c6409720 20201d6". Set buffer "randIV" to hex value "23f974e01b90f6104c664e960f3e95 8b1f9571c26c38b2". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "44e5ae0ba8d11d23f3187f42c1 55da508394ff569b7d3640da5e16eea192979a3c71fd729b086b10baef83b8c0 9457f754f5589ca38ff188348edce2". Set buffer "publicKey2" to hex value "20b46b27bc1baaa4a3e4e58d90 690e1a6cc070013040aa551aac3642212aeb8d4c915adce34aef1fcf57682b94 9f733cf82e740c1d276d42fdde5df0". Set buffer "sharedKey" to hex value "43f90fd12d83934f2a65ab08ed5 fb107053c6646a8b47d78c6306b87a719808105b9c2f4d650523e37a71eccc97 d12de962ad25ee68c3bdb99795ab4". Note: Initialize an AI_MD5Random Algorithm for first party Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 59 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "randIV" and length of initialized bytes in "randIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Initialize an AI_MD2Random Algorithm for second party Create algorithm object "diffRandomAlgorithm". Call B_CreateAlgorithmObject passing "diffRandomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "diffRandomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "diffRandomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "diffRandomAlgorithm" and address of first initialized byte in "randIV" and length of initialized bytes in "randIV" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Baldwin Informational, Expires 12/25/1999 60 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "diffRandomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer Baldwin Informational, Expires 12/25/1999 61 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA11". This is the start of test case "TVDHKA12". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 512 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 511 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Note: Using distinct AI_MD5Random streams, each party generates Baldwin Informational, Expires 12/25/1999 62 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: its own private Note: key. Both parties then exchange their public keys to in Note: order to compute Note: their shared secret key. The generated secret keys are Note: compared to each Note: other as well the expected test vector. Note: Summary Note: Given 512 bit prime and base, and two different Note: initialization vectors, Note: generate key pairs using MD5Random for both parties. Note: Compare computed shared secret key to expected test Note: vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD5_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD5RandIV1" of decimal value "200" bytes. Create buffer "MD5RandIV2" of decimal value "200" bytes. Create buffer "outputA" of decimal value "200" bytes. Create buffer "outputB" of decimal value "200" bytes. Create buffer "BERString" of decimal value "400" bytes. Create buffer "publicKey1" of decimal value "200" bytes. Create buffer "publicKey2" of decimal value "200" bytes. Create buffer "sharedKey" of decimal value "200" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "30819706092a864886f70d01030 1308189024100e6d2dfe4e920d8ef148e748d6c950001cb5876fac1ac581f7a1 9cf734ce38b6f861d984bbc03662a759c9b345be8ea7d7b4a616ff6f7f13a9cd cd0c125aff23302402a597600fb7e925757c6765cb36d29e1f6848a0e93a79ec 8734bfd71678e12e46aefa61126f704f548349140cef758cfb587e8d76448876 4e680b7063f52322e020201ff". Set buffer "MD5RandIV1" to hex value "a6d23d4f974e01b90f6010a49c 76c64e9610f03e89a58b14". Baldwin Informational, Expires 12/25/1999 63 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "MD5RandIV2" to hex value "d928f5693b271c906a82d175d9 20a019b465e72f19c210". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "465407b618285cbf54b3bf1d3e f3db175480cf25b3609abb2ef76fe4a5c5c7426fe01404b39d2acc2fa399d65e f4b6638f75f808bd10f84b7b73389d578ebe67". Set buffer "publicKey2" to hex value "7eece1b6fcfd45856668fc9f17 91f003edea3897280a689f53589b0a3d45c3d266e02950b4de1e9cc386403be2 db588cdb184d275b964a44a43035cd60a55b4c". Set buffer "sharedKey" to hex value "c23efa13121622463c226c2d1bd 9e37b6d7798ef14b489de5c544de540bb6fcb6ef052b28188739b1eafaa71b92 7a8d94be259451c375f41f0d47b2f3f2a2ae4". Note: Initialize an AI_MD5Random Algorithm for first party Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "MD5RandIV1" and length of initialized bytes in "MD5RandIV1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Initialize an AI_MD5Random Algorithm for second party Create algorithm object "diffRandomAlgorithm". Call B_CreateAlgorithmObject passing "diffRandomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "diffRandomAlgorithm" and Baldwin Informational, Expires 12/25/1999 64 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "diffRandomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "diffRandomAlgorithm" and address of first initialized byte in "MD5RandIV2" and length of initialized bytes in "MD5RandIV2" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Baldwin Informational, Expires 12/25/1999 65 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "diffRandomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Baldwin Informational, Expires 12/25/1999 66 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA12". This is the start of test case "TVDHKA13". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test Diffie-Hellman Key Agreement using 705 bit prime Note: A test vector consisting of a fixed prime and a fixed Note: base are Note: passed to both parties to generate 701 bit private Note: exponents. Note: This information is provided in the form of a BER encoded Note: string. Note: Using distinct AI_MD2Random streams, each party generates Note: its own private Note: key. Both parties then exchange their public keys in Note: order to compute their Note: shared secret key. The generated secret keys are compared Note: to each other as Note: well the expected test vector. Note: Summary Note: Given 705 bit prime and base, and two different Note: initialization vectors, Note: generate key pairs using MD2Random for both parties. Note: Compare computed shared secret key to expected test Note: vector. Note: ------------------------------------------------------- Note: Start with the GlobalInit Baldwin Informational, Expires 12/25/1999 67 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "AM_DH_KEY_AGREE", "AM_MD2_RANDOM", "NULL_PTR". Note: Setup data objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "MD2RandIV1" of decimal value "200" bytes. Create buffer "MD2RandIV2" of decimal value "200" bytes. Create buffer "outputA" of decimal value "200" bytes. Create buffer "outputB" of decimal value "200" bytes. Create buffer "BERString" of decimal value "600" bytes. Create buffer "publicKey1" of decimal value "200" bytes. Create buffer "publicKey2" of decimal value "200" bytes. Create buffer "sharedKey" of decimal value "200" bytes. Note: Input Test Vectors Set buffer "BERString" to hex value "3081c806092a864886f70d01030 13081ba025901ec9b7e86e486a2ba7916b7e23b0cd2f0f1ad3c73ca74728081c b2b2723ec413b6fccf5a1d95ac3b4d46048bca1adef04c33a05453a3a4df1f37 fd0db4a2640969704adc5886bffebbcf11e537224715dbddab00300c2480d025 9008c2e4cc68ccf22470201bdedbabe7a1ded8d05a1a9ece2d23c51245aafd3d 4892ff04b8095952b92ced6e23b9eb723df2227362631dfa6aec48095d8a2150 dc37da9228c67315e27a38d708aa1ebe711bc217f374889281d020202bd". Set buffer "MD2RandIV1" to hex value "0102030405060708090a0b0c0d 0e0f". Set buffer "MD2RandIV2" to hex value "6b8107278d84858f8c81838a8d 5cb7ba13d82c6f". Note: Expected Output Test Vectors Set buffer "publicKey1" to hex value "000ee00218ab5f5688eb741853 e81b882c9d043e41115018847e748291ce651dee73c66c8300802f67d4d3def9 5850f152811c72db7affd82f8331975ad694ccea61d8512ad4e60810870471b3 cf767b137ebb54610c305b9a". Set buffer "publicKey2" to hex value "006abb11ff2e618a9119ee9b2c 5d865fd472a8e1681d52edc2754d051ff6e855be96b79712f14ff11a6beea880 3155b6934de8e3ea8c8dc5e0ff031e3ab49c065f5f71fe8db9f4e7b85811bfde 6526f9b3f0fd134f546c947f". Set buffer "sharedKey" to hex value "00945b88af739157b2ed3e4042d Baldwin Informational, Expires 12/25/1999 68 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 ff2228db8bc29c50f7f01a0a13b240fc4af309ea360951fcda19a84e77629335 6b3046e27e81f241cc691555efe629089a1420fb22c62f6c254aa018faf46021 7457847c64ceca7fe860f33". Note: Initialize an AI_MD2Random Algorithm for first party Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "MD2RandIV1" and length of initialized bytes in "MD2RandIV1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Initialize an AI_MD2Random Algorithm for second party Create algorithm object "diffRandomAlgorithm". Call B_CreateAlgorithmObject passing "diffRandomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "diffRandomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "diffRandomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "diffRandomAlgorithm" and address of first initialized byte in "MD2RandIV2" and length of initialized bytes in "MD2RandIV2" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 69 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for first party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmA" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Echo data from BER encoded string. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgree". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgree". Display info structure for "AI_DHKeyAgree". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup key generator for second party. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "BERString". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate private and public keys for first party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 70 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "outputA" by "_OutputLen". Check equality of buffer "outputA" with contents of buffer "publicKey1". Note: Generate private and public keys for second party, and Note: test public key Note: against test vector. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "diffRandomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Check equality of buffer "outputB" with contents of buffer "publicKey2". Note: First party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: test if first party has produced the correct shared Note: secret key Check equality of buffer "outputA" with contents of buffer "sharedKey". Note: Second party is computing shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "publicKey1" and length of initialized bytes in buffer "publicKey1" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 71 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: test if second party has produced the correct shared Note: secret key Note: DataEquals (outputA, @outputB) This is the end of test case "TVDHKA13". This is the start of test case "TVHMCMD5". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Generate 24 byte key and use it to perform HMAC and test Note: it against Note: test vector generated by running SET based code Create buffer "keytext" of decimal value "24" bytes. Set buffer "keytext" to hex value "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 b0b". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate an HMAC code. Create algorithm object "HMAC_Digester". Call B_CreateAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_HMAC" initialized from "AI_MD5", "NULL_PTR". Call B_SetAlgorithmInfo passing "HMAC_Digester" and "AI_HMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 72 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "dataToDigest" of decimal value "32" bytes. Create buffer "HMACdigest" of decimal value "64" bytes. Set buffer "dataToDigest" to hex value "4869205468657265". Note: Use the private key to sign. Call Call B_DigestInit passing "HMAC_Digester" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "HMAC_Digester" and address of first initialized byte in buffer "dataToDigest" and length of initialized bytes in buffer "dataToDigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "HMAC_Digester" and address of next free byte in buffer "HMACdigest" and address of "_OutputLen" and length of free bytes in buffer "HMACdigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "HMACdigest" by "_OutputLen". Finalize buffer "HMACdigest". Check equality of buffer "HMACdigest" with hex value "9294727a3638bb1c13f48ef8158bfc9d". Display buffer "HMACdigest". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVHMCMD5". This is the start of test case "TVMD2R00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Baldwin Informational, Expires 12/25/1999 73 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_MD2Random using BSafe 3.0 behavior. Note: Note there are different expected results for BSafe 3.0 Note: and BSafe 2.x. This file has the expected results for Note: BSafe 3.0. Note: Depends on: Note: AI_MD2 Note: AI_MD2Random Note: Test cases: Note: - For a given one byte seed check the result against the Note: expected MD2 operations. Generate 16, 12, 32 bytes. Note: - For a given 100 byte seed check the result against the Note: expected MD2 operations. Generate 16, 12, 32 bytes. Note: - Check the result for a two bytes seed passed as two Note: calls to RandomUpdate matches one call. Generate Note: 48 bytes to check state incrementing. Note: - Check adding new seed bytes after GenerateBytes call. Note: Call RandomUpdate twice and generate 32 bytes. Note: ---------------------------------------------------------- Note: ------- Note: Choose the BSafe 3.0 AM Set "_Chooser" to "AM_MD2", "AM_MD2_RANDOM", "NULL_PTR". Note: Start with the GlobalInit Set "_Chooser" to "AM_MD2", "AM_MD2_RANDOM", "NULL_PTR". Note: Setup Data Objects Create buffer "oneByte" of decimal value "1" bytes. Create buffer "twoBytes" of decimal value "2" bytes. Create buffer "bigSeed" of decimal value "256" bytes. Create buffer "randomOutput" of decimal value "1000" bytes. Create buffer "digestOutput" of decimal value "1000" bytes. Note: ---------------------------------------------------------- Note: ------- Note: Setup Algorithm Objects Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Baldwin Informational, Expires 12/25/1999 74 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "digestAlgorithm". Call B_CreateAlgorithmObject passing "digestAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlgorithm" and "AI_MD2" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ------- Note: - For a given one byte seed check the result against the Note: expected MD2 operations. Note: Seed the generator Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "oneByte" to hex value "12". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "oneByte" and length of initialized bytes in buffer "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of Baldwin Informational, Expires 12/25/1999 75 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "3238a25051baa87ca3455dc022feae65". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "f68063d0de9ca6be78f7e5a9a0f8e81d". Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with contents of buffer "digestOutput". Note: Check buffering of available output bytes. Set "_OutputLen" to decimal value "12". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 76 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "bb6e5d9c97a90efe660477ea". Set "_OutputLen" to decimal value "32". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "fdd7d3084a708d50bf142042f6c999b231bc8c66a8429d4afd93179c1d10c31 0". Note: Compute expected result for subsequent values Set buffer "digestOutput" to hex value "3238a25051baa87ca3455dc0 22feae66". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "bb6e5d9c97a90efe660477eafdd7d308". Set buffer "digestOutput" to hex value "3238a25051baa87ca3455dc0 22feae67". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of Baldwin Informational, Expires 12/25/1999 77 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "4a708d50bf142042f6c999b231bc8c66". Set buffer "digestOutput" to hex value "3238a25051baa87ca3455dc0 22feae68". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "a8429d4afd93179c1d10c31056ec9606". Note: ---------------------------------------------------------- Note: ------- Note: - For a given 100 byte seed check the result against the Note: expected MD2 operations. Generate 16, 12, 32 bytes. Note: Seed the generator Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "bigSeed" to hex value "01020304050607080910010203040 5060708091001020304050607080910010203040506070809100102030405060 7080910010203040506070809100102030405060708091001020304050607080 9100102030405060708091001020304050607080910". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "bigSeed" and length of initialized bytes in "bigSeed" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 78 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "bigSeed" and length of initialized bytes in buffer "bigSeed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "ea04d524b856cf388246997ea7946295". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "0d2dc33854380f4d3c7f79896fecdc7e". Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" Baldwin Informational, Expires 12/25/1999 79 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with contents of buffer "digestOutput". Note: Check buffering of available output bytes. Set "_OutputLen" to decimal value "12". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "b265099d7511e8d82b831d61". Set "_OutputLen" to decimal value "32". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "6ee6449da723bac4922a13ec71a984d5d596cbc189433d94b3f0f12fd6dd530 5". Note: Compute expected result for subsequent values Set buffer "digestOutput" to hex value "ea04d524b856cf388246997e a7946296". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 80 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "b265099d7511e8d82b831d616ee6449d". Set buffer "digestOutput" to hex value "ea04d524b856cf388246997e a7946297". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "a723bac4922a13ec71a984d5d596cbc1". Set buffer "digestOutput" to hex value "ea04d524b856cf388246997e a7946298". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "89433d94b3f0f12fd6dd53059cc78c96". Note: ---------------------------------------------------------- Note: ------- Baldwin Informational, Expires 12/25/1999 81 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Check the result for a two bytes seed passed as two Note: calls to RandomUpdate matches one call. Generate 48 Note: bytes. Note: Seed the generator Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "oneByte" to hex value "12". Set buffer "twoBytes" to hex value "1212". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "twoBytes" and length of initialized bytes in buffer "twoBytes" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 82 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "eccf29fc41d08258138218a46f3eb070". Note: Check incrementing state. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "fd953e253b75afbf0dad460bb5e654ed". Note: Check incrementing state. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 83 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "72d9a38e80e63dd1b62b889b61972301". Note: ---------------------------------------------------------- Note: ------- Note: - Check adding new seed bytes after GenerateBytes call. Note: Call RandomUpdate twice and generate 32 bytes. Note: NOTE this in continued from the previous test. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "15b0a1c7931ca323304ca81b9080df47". Note: Check incrementing state. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value Baldwin Informational, Expires 12/25/1999 84 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "c3c9320871f47a7d6408cce64fad29f7". Note: ---------------------------------------------------------- Note: ------- Note: Cleanup. Call Call B_DestroyAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVMD2R00". This is the start of test case "TVMD2RX0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_MD2Random. Note: Note there are different expected results for BSafe 3.0 Note: and BSafe 2.x. This file has the expected results for Note: BSafe 2.x. Note: Depends on: Note: AI_MD2 Note: AI_MD2Random Note: Test cases: Note: - For a given one byte seed check the result against the Note: expected MD2 operations. Generate 16, 12, 32 bytes. Note: - For a given 100 byte seed check the result against the Note: expected MD2 operations. Generate 16, 12, 32 bytes. Note: - Check the result for a two bytes seed passed as two Note: calls to RandomUpdate matches one call. Generate Note: 48 bytes to check state incrementing. Note: - Check adding new seed bytes after GenerateBytes call. Note: Call RandomUpdate twice and generate 32 bytes. Note: ---------------------------------------------------------- Note: ------- Note: Choose the BSafe 2.x AM Set "_Chooser" to "AM_MD2", "AM_MD2_RANDOM_2X", "NULL_PTR". Note: Start with the GlobalInit Set "_Chooser" to "AM_MD2", "AM_MD2_RANDOM_2X", "NULL_PTR". Note: Setup Data Objects Create buffer "oneByte" of decimal value "1" bytes. Create buffer "twoBytes" of decimal value "2" bytes. Create buffer "bigSeed" of decimal value "256" bytes. Baldwin Informational, Expires 12/25/1999 85 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "randomOutput" of decimal value "1000" bytes. Create buffer "digestOutput" of decimal value "1000" bytes. Note: ---------------------------------------------------------- Note: ------- Note: Setup Algorithm Objects Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "digestAlgorithm". Call B_CreateAlgorithmObject passing "digestAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlgorithm" and "AI_MD2" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ------- Note: - For a given one byte seed check the result against the Note: expected MD2 operations. Note: Seed the generator Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "oneByte" to hex value "12". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Baldwin Informational, Expires 12/25/1999 86 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "oneByte" and length of initialized bytes in buffer "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "3238a25051baa87ca3455dc022feae65". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "f68063d0de9ca6be78f7e5a9a0f8e81d". Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 87 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with contents of buffer "digestOutput". Note: Check buffering of available output bytes. Set "_OutputLen" to decimal value "12". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "bb6e5d9c97a90efe660477ea". Set "_OutputLen" to decimal value "32". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "fdd7d3084a708d50bf142042f6c999b231bc8c66a8429d4afd93179c1d10c31 0". Note: Compute expected result for subsequent values Set buffer "digestOutput" to hex value "3238a25051baa87ca3455dc0 22feae66". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Baldwin Informational, Expires 12/25/1999 88 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "bb6e5d9c97a90efe660477eafdd7d308". Set buffer "digestOutput" to hex value "3238a25051baa87ca3455dc0 22feae67". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "4a708d50bf142042f6c999b231bc8c66". Set buffer "digestOutput" to hex value "3238a25051baa87ca3455dc0 22feae68". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "a8429d4afd93179c1d10c31056ec9606". Note: ---------------------------------------------------------- Note: ------- Note: - For a given 100 byte seed check the result against the Note: expected MD2 operations. Generate 16, 12, 32 bytes. Note: Seed the generator Baldwin Informational, Expires 12/25/1999 89 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "bigSeed" to hex value "01020304050607080910010203040 5060708091001020304050607080910010203040506070809100102030405060 7080910010203040506070809100102030405060708091001020304050607080 9100102030405060708091001020304050607080910". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "bigSeed" and length of initialized bytes in "bigSeed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "bigSeed" and length of initialized bytes in buffer "bigSeed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "ea04d524b856cf388246997ea7946295". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 90 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "0d2dc33854380f4d3c7f79896fecdc7e". Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with contents of buffer "digestOutput". Note: Check buffering of available output bytes. Set "_OutputLen" to decimal value "12". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "b265099d7511e8d82b831d61". Set "_OutputLen" to decimal value "32". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "6ee6449da723bac4922a13ec71a984d5d596cbc189433d94b3f0f12fd6dd530 5". Note: Compute expected result for subsequent values Baldwin Informational, Expires 12/25/1999 91 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "digestOutput" to hex value "ea04d524b856cf388246997e a7946296". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "b265099d7511e8d82b831d616ee6449d". Set buffer "digestOutput" to hex value "ea04d524b856cf388246997e a7946297". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "a723bac4922a13ec71a984d5d596cbc1". Set buffer "digestOutput" to hex value "ea04d524b856cf388246997e a7946298". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of Baldwin Informational, Expires 12/25/1999 92 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "89433d94b3f0f12fd6dd53059cc78c96". Note: ---------------------------------------------------------- Note: ------- Note: - Check the result for a two bytes seed passed as two Note: calls to RandomUpdate matches one call. Generate 48 Note: bytes. Note: Seed the generator Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "oneByte" to hex value "12". Set buffer "twoBytes" to hex value "1212". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "twoBytes" and length of initialized bytes in buffer "twoBytes" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of Baldwin Informational, Expires 12/25/1999 93 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "f90fb28bd2b947ab518f36b9d1a29e15". Note: Check incrementing state. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Baldwin Informational, Expires 12/25/1999 94 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "20d30acb63c3b8a99bae95aba6eeaa79". Note: Check incrementing state. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "e7999274a64f621fb8e1afbd3dec379e". Note: ---------------------------------------------------------- Note: ------- Note: - Check adding new seed bytes after GenerateBytes call. Note: Call RandomUpdate twice and generate 32 bytes. Note: NOTE this in continued from the previous test. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "3e0c8de693c53a7f9172ec2b3f54c2fc". Baldwin Informational, Expires 12/25/1999 95 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Check incrementing state. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "0503fe51bb2c2c30e72f29bbe92857d0". Note: ---------------------------------------------------------- Note: ------- Note: Cleanup. Call Call B_DestroyAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVMD2RX0". This is the start of test case "TVMD5R00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_MD5Random. Note: Note there are different expected results for BSafe 3.0 Note: and BSafe 2.x. This file has the expected results for Note: BSafe 3.0. Note: Depends on: Note: AI_MD5 Note: AI_MD5Random Note: Test cases: Note: - For a given one byte seed check the result against the Note: expected MD5 operations. Generate 16, 12, 32 bytes. Note: - For a given 100 byte seed check the result against the Note: expected MD5 operations. Generate 16, 12, 32 bytes. Note: - Check the result for a two bytes seed passed as two Note: calls to RandomUpdate matches one call. Generate Note: 48 bytes to check state incrementing. Note: - Check adding new seed bytes after GenerateBytes call. Note: Call RandomUpdate twice and generate 32 bytes. Note: ---------------------------------------------------------- Note: ------- Baldwin Informational, Expires 12/25/1999 96 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Start with the GlobalInit Set "_Chooser" to "AM_MD5", "AM_MD5_RANDOM", "NULL_PTR". Note: Setup Data Objects Create buffer "oneByte" of decimal value "1" bytes. Create buffer "twoBytes" of decimal value "2" bytes. Create buffer "bigSeed" of decimal value "256" bytes. Create buffer "randomOutput" of decimal value "1000" bytes. Create buffer "digestOutput" of decimal value "1000" bytes. Note: ---------------------------------------------------------- Note: ------- Note: Setup Algorithm Objects Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "digestAlgorithm". Call B_CreateAlgorithmObject passing "digestAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlgorithm" and "AI_MD5" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ------- Note: - For a given one byte seed check the result against the Note: expected MD5 operations. Note: Seed the generator Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "oneByte" to hex value "12". Baldwin Informational, Expires 12/25/1999 97 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "oneByte" and length of initialized bytes in buffer "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "a8445619abd08f3ba0ebfcb31183f7f9". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "8acde574aef013204fe182aa51ec69b5". Note: Generate random values Baldwin Informational, Expires 12/25/1999 98 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with contents of buffer "digestOutput". Note: Check buffering of available output bytes. Set "_OutputLen" to decimal value "12". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "d726cd43c4f84ebc77113a7a". Set "_OutputLen" to decimal value "32". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "c2274a2696bb57fcd2c25a05d496b22a7f24fa640fd54d23d487d412d277588 2". Note: Compute expected result for subsequent values Set buffer "digestOutput" to hex value "a8445619abd08f3ba0ebfcb3 1183f7fa". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 99 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "d726cd43c4f84ebc77113a7ac2274a26". Set buffer "digestOutput" to hex value "a8445619abd08f3ba0ebfcb3 1183f7fb". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "96bb57fcd2c25a05d496b22a7f24fa64". Set buffer "digestOutput" to hex value "a8445619abd08f3ba0ebfcb3 1183f7fc". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value Baldwin Informational, Expires 12/25/1999 100 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "0fd54d23d487d412d27758823b728ee9". Note: ---------------------------------------------------------- Note: ------- Note: - For a given 100 byte seed check the result against the Note: expected MD5 operations. Generate 16, 12, 32 bytes. Note: Seed the generator Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "bigSeed" to hex value "01020304050607080910010203040 5060708091001020304050607080910010203040506070809100102030405060 7080910010203040506070809100102030405060708091001020304050607080 9100102030405060708091001020304050607080910". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "bigSeed" and length of initialized bytes in "bigSeed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "bigSeed" and length of initialized bytes in buffer "bigSeed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "524a61a4d4483b31ac7870fe608fe67f". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and Baldwin Informational, Expires 12/25/1999 101 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "5163b51d0d5e0b49ce2cc153249d2e98". Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with contents of buffer "digestOutput". Note: Check buffering of available output bytes. Set "_OutputLen" to decimal value "12". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "611a19becad1de78b09ce0ee". Set "_OutputLen" to decimal value "32". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 102 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "dc0eeda18cc2db2329db2fd6f8b518d506892872e5e3f0b3fcc06f8f6d29b35 e". Note: Compute expected result for subsequent values Set buffer "digestOutput" to hex value "524a61a4d4483b31ac7870fe 608fe680". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "611a19becad1de78b09ce0eedc0eeda1". Set buffer "digestOutput" to hex value "524a61a4d4483b31ac7870fe 608fe681". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "8cc2db2329db2fd6f8b518d506892872". Set buffer "digestOutput" to hex value "524a61a4d4483b31ac7870fe 608fe682". Baldwin Informational, Expires 12/25/1999 103 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "e5e3f0b3fcc06f8f6d29b35e3d9d652a". Note: ---------------------------------------------------------- Note: ------- Note: - Check the result for a two bytes seed passed as two Note: calls to RandomUpdate matches one call. Generate 48 Note: bytes. Note: Seed the generator Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "oneByte" to hex value "12". Set buffer "twoBytes" to hex value "1212". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 104 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "twoBytes" and length of initialized bytes in buffer "twoBytes" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with contents of buffer "digestOutput". Note: Check incrementing state. Baldwin Informational, Expires 12/25/1999 105 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "8d7e8ea536685ec32e5935167b53fe2d". Note: Check incrementing state. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "838d1fb10127c5d82578763633362e9e". Note: ---------------------------------------------------------- Note: ------- Note: - Check adding new seed bytes after GenerateBytes call. Note: Call RandomUpdate twice and generate 32 bytes. Note: NOTE this in continued from the previous test. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 106 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "575f1385fd30489fe3b8bd31d3cc033d". Note: Check incrementing state. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "1c4165877827f7b37b388046740fe7c2". Note: ---------------------------------------------------------- Note: ------- Note: Cleanup. Call Call B_DestroyAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVMD5R00". This is the start of test case "TVMD5RX0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_MD5Random. Note: Note there are different expected results for BSafe 3.0 Note: and BSafe 2.x. This file has the expected results for Note: BSafe 2.x. Note: Depends on: Note: AI_MD5 Note: AI_MD5Random Note: Test cases: Note: - For a given one byte seed check the result against the Note: expected MD5 operations. Generate 16, 12, 32 bytes. Note: - For a given 100 byte seed check the result against the Note: expected MD5 operations. Generate 16, 12, 32 bytes. Baldwin Informational, Expires 12/25/1999 107 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Check the result for a two bytes seed passed as two Note: calls to RandomUpdate matches one call. Generate Note: 48 bytes to check state incrementing. Note: - Check adding new seed bytes after GenerateBytes call. Note: Call RandomUpdate twice and generate 32 bytes. Note: ---------------------------------------------------------- Note: ------- Note: Choose the BSafe 2.x AM Set "_Chooser" to "AM_MD5", "AM_MD5_RANDOM_2X", "NULL_PTR". Note: Start with the GlobalInit Set "_Chooser" to "AM_MD5", "AM_MD5_RANDOM_2X", "NULL_PTR". Note: Setup Data Objects Create buffer "oneByte" of decimal value "1" bytes. Create buffer "twoBytes" of decimal value "2" bytes. Create buffer "bigSeed" of decimal value "256" bytes. Create buffer "randomOutput" of decimal value "1000" bytes. Create buffer "digestOutput" of decimal value "1000" bytes. Note: ---------------------------------------------------------- Note: ------- Note: Setup Algorithm Objects Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "digestAlgorithm". Call B_CreateAlgorithmObject passing "digestAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlgorithm" and "AI_MD5" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 108 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ------- Note: - For a given one byte seed check the result against the Note: expected MD5 operations. Note: Seed the generator Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "oneByte" to hex value "12". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "oneByte" and length of initialized bytes in buffer "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "a8445619abd08f3ba0ebfcb31183f7f9". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of Baldwin Informational, Expires 12/25/1999 109 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "8acde574aef013204fe182aa51ec69b5". Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with contents of buffer "digestOutput". Note: Check buffering of available output bytes. Set "_OutputLen" to decimal value "12". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "d726cd43c4f84ebc77113a7a". Set "_OutputLen" to decimal value "32". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "c2274a2696bb57fcd2c25a05d496b22a7f24fa640fd54d23d487d412d277588 Baldwin Informational, Expires 12/25/1999 110 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 2". Note: Compute expected result for subsequent values Set buffer "digestOutput" to hex value "a8445619abd08f3ba0ebfcb3 1183f7fa". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "d726cd43c4f84ebc77113a7ac2274a26". Set buffer "digestOutput" to hex value "a8445619abd08f3ba0ebfcb3 1183f7fb". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "96bb57fcd2c25a05d496b22a7f24fa64". Set buffer "digestOutput" to hex value "a8445619abd08f3ba0ebfcb3 1183f7fc". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 111 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "0fd54d23d487d412d27758823b728ee9". Note: ---------------------------------------------------------- Note: ------- Note: - For a given 100 byte seed check the result against the Note: expected MD5 operations. Generate 16, 12, 32 bytes. Note: Seed the generator Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "bigSeed" to hex value "01020304050607080910010203040 5060708091001020304050607080910010203040506070809100102030405060 7080910010203040506070809100102030405060708091001020304050607080 9100102030405060708091001020304050607080910". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "bigSeed" and length of initialized bytes in "bigSeed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "bigSeed" and length of initialized bytes in buffer "bigSeed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of Baldwin Informational, Expires 12/25/1999 112 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "524a61a4d4483b31ac7870fe608fe67f". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "5163b51d0d5e0b49ce2cc153249d2e98". Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with contents of buffer "digestOutput". Note: Check buffering of available output bytes. Set "_OutputLen" to decimal value "12". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 113 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "611a19becad1de78b09ce0ee". Set "_OutputLen" to decimal value "32". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "dc0eeda18cc2db2329db2fd6f8b518d506892872e5e3f0b3fcc06f8f6d29b35 e". Note: Compute expected result for subsequent values Set buffer "digestOutput" to hex value "524a61a4d4483b31ac7870fe 608fe680". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "611a19becad1de78b09ce0eedc0eeda1". Set buffer "digestOutput" to hex value "524a61a4d4483b31ac7870fe 608fe681". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of Baldwin Informational, Expires 12/25/1999 114 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "8cc2db2329db2fd6f8b518d506892872". Set buffer "digestOutput" to hex value "524a61a4d4483b31ac7870fe 608fe682". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Check equality of buffer "digestOutput" with hex value "e5e3f0b3fcc06f8f6d29b35e3d9d652a". Note: ---------------------------------------------------------- Note: ------- Note: - Check the result for a two bytes seed passed as two Note: calls to RandomUpdate matches one call. Generate 48 Note: bytes. Note: Seed the generator Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "oneByte" to hex value "12". Set buffer "twoBytes" to hex value "1212". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 115 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute expected result Call Call B_DigestInit passing "digestAlgorithm" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "twoBytes" and length of initialized bytes in buffer "twoBytes" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Call B_DigestUpdate passing "digestAlgorithm" and address of first initialized byte in buffer "digestOutput" and length of initialized bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlgorithm" and address of next free byte in buffer "digestOutput" and address of "_OutputLen" and length of free bytes in buffer "digestOutput" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digestOutput" by "_OutputLen". Finalize buffer "digestOutput". Display buffer "digestOutput". Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and Baldwin Informational, Expires 12/25/1999 116 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "8a4ffc0a687886737471aaf56e4cf00e". Note: Check incrementing state. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "9dbc89de920b3b25ac76d4bbac0d07c2". Note: Check incrementing state. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "4ba70d8b917eba2a773221f05d9ba801". Note: ---------------------------------------------------------- Note: ------- Note: - Check adding new seed bytes after GenerateBytes call. Note: Call RandomUpdate twice and generate 32 bytes. Note: NOTE this in continued from the previous test. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 117 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "oneByte" and length of initialized bytes in "oneByte" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate random values Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "1149e830ebd0bc369c93972546848056". Note: Check incrementing state. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "randomOutput" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randomOutput" by "_OutputLen". Finalize "randomOutput". Display buffer "randomOutput". Check equality of buffer "randomOutput" with hex value "e750dd1984707fc77eca05341abab605". Note: ---------------------------------------------------------- Note: ------- Note: Cleanup. Call Call B_DestroyAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVMD5RX0". This is the start of test case "TVOAEP01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: OAEP Encode/Decode vectors test Baldwin Informational, Expires 12/25/1999 118 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: This script pads the message in "inputData" to the size Note: of "expected result" Note: using PKCS #1 V2.0 encryption padding. Note: ------------------------------------------------------- Create algorithm object "pkcsoaep". Call B_CreateAlgorithmObject passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seedValue" of decimal value "20" bytes. Create buffer "encodedData" of decimal value "700" bytes. Create buffer "decodedData" of decimal value "700" bytes. Create buffer "expectedResult" of decimal value "700" bytes. Create buffer "inputData" of decimal value "700" bytes. Set buffer "inputData" with string value "Copyright (c) 1991-1998 RSA Data Security, a Security Dynamics Company. License to copy this document is not granted to anyone unless the proper authority at RSA or Security Dynamics says so; and then you are not allowed to do anything with this document that the aforementioned authority person says that you can do. So there. Like you would really want to rip off a Btest script anyway, eh? Hey! Go get your own test data.". Set buffer "seedValue" to hex value "919191919191919191919191919 1919191919191". Set buffer "expectedResult" to hex value "005a4c67ca990e9d2ab09a d19cae81261a8ab8ce05daaf717b3ec7d6db71e719c1040afb8921b64552629a df68eb9ad1fcd6ab2e394e98594c6844180ab6b0bf726e1ac1e93394ae600ac9 8c33328d08bfb086fad41add244e861608056dfa36894ac70bffa7441ed48f59 9ccc0b255cdeb353b162e1c4b26748e9476f0f4e883b85437473aff1c0396ae8 dd960841dda166655ba8aa684097c783fdadf7b39c4bb464094b7d8b356e6846 1243d74e2f5c3046bbac5fb1f60edb1c82472309390e28458723c404065e4972 e6568c3f6ac98bfa05f9829d0fff337bcca1841db95a5af3e42c761fd94e1f2a 157f85622c9e9c534c7b57d46c8d3d4ce839ad9a0773925ad9566f3da79a593a bba40379818df05cbbf39fd4a44c35cba3139d6474f908170249b9f29ebc3d40 9d22e9a3dfec8a170645fff1ef94e58b986593b629d367f9e2c1152142f7c770 b7f307228b45b2c46cccdcf9d2989c1706b032359e01d296f122280c65287f3f cfd4c2bebca09b4a137e6d05c9264f8ee13548ddf4c1e3a47d185ec6d9e0b65a c7f523b126d4c29a83d4a41bc7740ba7b0b225172702faab8922bc7e0f09f756 38fbd9eb29f2d52255cefe30394f7fde37b6f911f7959da6d866123fe2af4e79 f486af65839f9f9d9f8920dd0ad7fac72357abbf64aaa34cd8b02b513a54451a 6590178185179dbf3c961d5106ea7cd088900aa61362df91eb70e9b8f0987a7c 34f7a89bc2d842ae7438449599a1cbe3e762b437a07fe8b422f76a202f4519d0 7524374ac395d44a01b81c40dc97166299e1a8c95f7f1cf330b1a99d43a7bf54 873a23ea140b7d7a5d6bf1bf4b57adbf86b594d59e91a9a9dcb99d64df64a7af 9704a51680739a1e8944ab0167b9f9601b0425ed1675c30808fcd634122cca4c 87b080331aa149cc10864f4f47fb6ac51ff941cc940bd1280def33652d7528b9 01ecd2cb752f43339bc2cf2f191330b817". Baldwin Informational, Expires 12/25/1999 119 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test a single encode and decode cycle against Note: a test vector and for functional reciprocity. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEPRecode" initialized from "sha1", "mgf1", "sha1", "specifiedParameters",. Call B_SetAlgorithmInfo passing "pkcsoaep" and "AI_PKCS_OAEPRecode" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData" and address of "_OutputLen" and length of free bytes in buffer "inputData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "seedValue" and address of "_OutputLen" and length of free bytes in buffer "seedValue" and address of first initialized byte in buffer "seedValue" and length of initialized bytes in buffer "seedValue" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "seedValue" by "_OutputLen". Call B_EncodeFinal passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call Call B_DecodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecodeUpdate passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of Baldwin Informational, Expires 12/25/1999 120 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Call B_DecodeFinal passing "pkcsoaep" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". Call Call B_DestroyAlgorithmObject passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Test a encode and decode with multiple updates against Note: a test vector and for functional reciprocity. Create algorithm object "pkcsoaep". Call B_CreateAlgorithmObject passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seedValue" of decimal value "20" bytes. Create buffer "encodedData" of decimal value "700" bytes. Create buffer "decodedData" of decimal value "700" bytes. Create buffer "inputData1" of decimal value "100" bytes. Create buffer "inputData2" of decimal value "100" bytes. Create buffer "inputData3" of decimal value "100" bytes. Create buffer "inputData4" of decimal value "100" bytes. Create buffer "inputData5" of decimal value "100" bytes. Create buffer "inputData6" of decimal value "100" bytes. Create buffer "inputData7" of decimal value "100" bytes. Create buffer "inputData8" of decimal value "100" bytes. Set buffer "inputData1" with string value "Copyright (c) 1991-1998 RSA Data Secur". Baldwin Informational, Expires 12/25/1999 121 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "inputData2" with string value "ity, a Security Dynamics Company. License to copy this document ". Set buffer "inputData3" with string value "is not granted to anyone unless the proper authority at RSA or S". Set buffer "inputData4" with string value "ecurity Dynamics says so; and then you are not allowed to do any". Set buffer "inputData5" with string value "thing with this document that the aforementioned authority perso". Set buffer "inputData6" with string value "n says that you can do. So there. Like you would really want to ". Set buffer "inputData7" with string value "rip off a Btest script anyway, eh? Hey! Go get your own test da". Set buffer "inputData8" with string value "ta.". Set buffer "seedValue" to hex value "919191919191919191919191919 1919191919191". Create buffer "expectedResult1" of decimal value "20" bytes. Create buffer "expectedResult2" of decimal value "700" bytes. Note: Initialize, set up expected and input data Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEPRecode" initialized from "sha1", "mgf1", "sha1", "specifiedParameters",. Call B_SetAlgorithmInfo passing "pkcsoaep" and "AI_PKCS_OAEPRecode" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData1" and address of "_OutputLen" and length of free bytes in buffer "inputData1" and address of first initialized byte in buffer "inputData1" and length of initialized bytes in buffer "inputData1" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData1" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData2" and address of "_OutputLen" and length of free bytes in buffer "inputData2" and address of first initialized byte in buffer "inputData2" and length of initialized bytes in buffer "inputData2" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 122 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "inputData2" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData3" and address of "_OutputLen" and length of free bytes in buffer "inputData3" and address of first initialized byte in buffer "inputData3" and length of initialized bytes in buffer "inputData3" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData3" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData4" and address of "_OutputLen" and length of free bytes in buffer "inputData4" and address of first initialized byte in buffer "inputData4" and length of initialized bytes in buffer "inputData4" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData4" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData5" and address of "_OutputLen" and length of free bytes in buffer "inputData5" and address of first initialized byte in buffer "inputData5" and length of initialized bytes in buffer "inputData5" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData5" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData6" and address of "_OutputLen" and length of free bytes in buffer "inputData6" and address of first initialized byte in buffer "inputData6" and length of initialized bytes in buffer "inputData6" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData6" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData7" and address of "_OutputLen" and length of free bytes in buffer "inputData7" and address of first initialized byte in buffer "inputData7" and length of initialized bytes in buffer "inputData7" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData7" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData8" and address of "_OutputLen" and length of free bytes in buffer "inputData8" and address of first initialized byte in buffer "inputData8" and length of initialized bytes in buffer "inputData8" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 123 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "inputData8" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "seedValue" and address of "_OutputLen" and length of free bytes in buffer "seedValue" and address of first initialized byte in buffer "seedValue" and length of initialized bytes in buffer "seedValue" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "seedValue" by "_OutputLen". Call B_EncodeFinal passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Call Call B_DecodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecodeUpdate passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Call B_DecodeFinal passing "pkcsoaep" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". This is the end of test case "TVOAEP01". This is the start of test case "TVOAEP02". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Baldwin Informational, Expires 12/25/1999 124 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: OAEP Encode/Decode vectors test with BER initialization. Note: This script pads the message in "inputData" to the size Note: of "expected result" Note: using PKCS #1 V2.0 encryption padding. Note: ------------------------------------------------------- Create algorithm object "pkcsoaep". Call B_CreateAlgorithmObject passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seedValue" of decimal value "20" bytes. Create buffer "encodedData" of decimal value "700" bytes. Create buffer "decodedData" of decimal value "700" bytes. Create buffer "expectedResult" of decimal value "700" bytes. Create buffer "inputData" of decimal value "700" bytes. Set buffer "inputData" with string value "Copyright (c) 1991-1998 RSA Data Security, a Security Dynamics Company. License to copy this document is not granted to anyone unless the proper authority at RSA or Security Dynamics says so; and then you are not allowed to do anything with this document that the aforementioned authority person says that you can do. So there. Like you would really want to rip off a Btest script anyway, eh? Hey! Go get your own test data.". Set buffer "seedValue" to hex value "919191919191919191919191919 1919191919191". Set buffer "expectedResult" to hex value "005a4c67ca990e9d2ab09a d19cae81261a8ab8ce05daaf717b3ec7d6db71e719c1040afb8921b64552629a df68eb9ad1fcd6ab2e394e98594c6844180ab6b0bf726e1ac1e93394ae600ac9 8c33328d08bfb086fad41add244e861608056dfa36894ac70bffa7441ed48f59 9ccc0b255cdeb353b162e1c4b26748e9476f0f4e883b85437473aff1c0396ae8 dd960841dda166655ba8aa684097c783fdadf7b39c4bb464094b7d8b356e6846 1243d74e2f5c3046bbac5fb1f60edb1c82472309390e28458723c404065e4972 e6568c3f6ac98bfa05f9829d0fff337bcca1841db95a5af3e42c761fd94e1f2a 157f85622c9e9c534c7b57d46c8d3d4ce839ad9a0773925ad9566f3da79a593a bba40379818df05cbbf39fd4a44c35cba3139d6474f908170249b9f29ebc3d40 9d22e9a3dfec8a170645fff1ef94e58b986593b629d367f9e2c1152142f7c770 b7f307228b45b2c46cccdcf9d2989c1706b032359e01d296f122280c65287f3f cfd4c2bebca09b4a137e6d05c9264f8ee13548ddf4c1e3a47d185ec6d9e0b65a c7f523b126d4c29a83d4a41bc7740ba7b0b225172702faab8922bc7e0f09f756 38fbd9eb29f2d52255cefe30394f7fde37b6f911f7959da6d866123fe2af4e79 f486af65839f9f9d9f8920dd0ad7fac72357abbf64aaa34cd8b02b513a54451a 6590178185179dbf3c961d5106ea7cd088900aa61362df91eb70e9b8f0987a7c 34f7a89bc2d842ae7438449599a1cbe3e762b437a07fe8b422f76a202f4519d0 7524374ac395d44a01b81c40dc97166299e1a8c95f7f1cf330b1a99d43a7bf54 873a23ea140b7d7a5d6bf1bf4b57adbf86b594d59e91a9a9dcb99d64df64a7af Baldwin Informational, Expires 12/25/1999 125 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 9704a51680739a1e8944ab0167b9f9601b0425ed1675c30808fcd634122cca4c 87b080331aa149cc10864f4f47fb6ac51ff941cc940bd1280def33652d7528b9 01ecd2cb752f43339bc2cf2f191330b817". Note: Test a single encode and decode cycle against Note: a test vector and for functional reciprocity. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEPRecodeBER" initialized from "304506092a864886f70d01 01073038a00b300906052b0e03021a0500a118301606092a864886f70d010108 300906052b0e03021a0500a20f300d06092a864886f70d0101090400". Call B_SetAlgorithmInfo passing "pkcsoaep" and "AI_PKCS_OAEPRecodeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEPRecode". Call B_GetAlgorithmInfo passing "_InfoPointer" and "pkcsoaep" and "AI_PKCS_OAEPRecode". Display info structure for "AI_PKCS_OAEPRecode". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData" and address of "_OutputLen" and length of free bytes in buffer "inputData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "seedValue" and address of "_OutputLen" and length of free bytes in buffer "seedValue" and address of first initialized byte in buffer "seedValue" and length of initialized bytes in buffer "seedValue" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "seedValue" by "_OutputLen". Call B_EncodeFinal passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 126 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call Call B_DecodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecodeUpdate passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Call B_DecodeFinal passing "pkcsoaep" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". Call Call B_DestroyAlgorithmObject passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Test a encode and decode with multiple updates against Note: a test vector and for functional reciprocity. Create algorithm object "pkcsoaep". Call B_CreateAlgorithmObject passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seedValue" of decimal value "20" bytes. Baldwin Informational, Expires 12/25/1999 127 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "encodedData" of decimal value "700" bytes. Create buffer "decodedData" of decimal value "700" bytes. Create buffer "inputData1" of decimal value "100" bytes. Create buffer "inputData2" of decimal value "100" bytes. Create buffer "inputData3" of decimal value "100" bytes. Create buffer "inputData4" of decimal value "100" bytes. Create buffer "inputData5" of decimal value "100" bytes. Create buffer "inputData6" of decimal value "100" bytes. Create buffer "inputData7" of decimal value "100" bytes. Create buffer "inputData8" of decimal value "100" bytes. Set buffer "inputData1" with string value "Copyright (c) 1991-1998 RSA Data Secur". Set buffer "inputData2" with string value "ity, a Security Dynamics Company. License to copy this document ". Set buffer "inputData3" with string value "is not granted to anyone unless the proper authority at RSA or S". Set buffer "inputData4" with string value "ecurity Dynamics says so; and then you are not allowed to do any". Set buffer "inputData5" with string value "thing with this document that the aforementioned authority perso". Set buffer "inputData6" with string value "n says that you can do. So there. Like you would really want to ". Set buffer "inputData7" with string value "rip off a Btest script anyway, eh? Hey! Go get your own test da". Set buffer "inputData8" with string value "ta.". Set buffer "seedValue" to hex value "919191919191919191919191919 1919191919191". Create buffer "expectedResult1" of decimal value "20" bytes. Create buffer "expectedResult2" of decimal value "700" bytes. Note: Initialize, set up expected and input data Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEPRecode" initialized from "sha1", "mgf1", "sha1", "specifiedParameters",. Call B_SetAlgorithmInfo passing "pkcsoaep" and "AI_PKCS_OAEPRecode" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData1" and address of "_OutputLen" and length of free bytes in buffer "inputData1" and address of Baldwin Informational, Expires 12/25/1999 128 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 first initialized byte in buffer "inputData1" and length of initialized bytes in buffer "inputData1" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData1" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData2" and address of "_OutputLen" and length of free bytes in buffer "inputData2" and address of first initialized byte in buffer "inputData2" and length of initialized bytes in buffer "inputData2" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData2" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData3" and address of "_OutputLen" and length of free bytes in buffer "inputData3" and address of first initialized byte in buffer "inputData3" and length of initialized bytes in buffer "inputData3" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData3" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData4" and address of "_OutputLen" and length of free bytes in buffer "inputData4" and address of first initialized byte in buffer "inputData4" and length of initialized bytes in buffer "inputData4" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData4" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData5" and address of "_OutputLen" and length of free bytes in buffer "inputData5" and address of first initialized byte in buffer "inputData5" and length of initialized bytes in buffer "inputData5" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData5" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData6" and address of "_OutputLen" and length of free bytes in buffer "inputData6" and address of first initialized byte in buffer "inputData6" and length of initialized bytes in buffer "inputData6" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData6" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData7" and address of "_OutputLen" and Baldwin Informational, Expires 12/25/1999 129 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of free bytes in buffer "inputData7" and address of first initialized byte in buffer "inputData7" and length of initialized bytes in buffer "inputData7" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData7" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData8" and address of "_OutputLen" and length of free bytes in buffer "inputData8" and address of first initialized byte in buffer "inputData8" and length of initialized bytes in buffer "inputData8" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData8" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "seedValue" and address of "_OutputLen" and length of free bytes in buffer "seedValue" and address of first initialized byte in buffer "seedValue" and length of initialized bytes in buffer "seedValue" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "seedValue" by "_OutputLen". Call B_EncodeFinal passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Call Call B_DecodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecodeUpdate passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Call B_DecodeFinal passing "pkcsoaep" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 130 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". This is the end of test case "TVOAEP02". This is the start of test case "TVOAEP03". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: OAEP Encode/Decode vectors test with BER initialization. Note: This script pads the message in "inputData" to the size Note: of "expected result" Note: using PKCS #1 V2.0 encryption padding. Note: ------------------------------------------------------- Create algorithm object "pkcsoaep". Call B_CreateAlgorithmObject passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seedValue" of decimal value "20" bytes. Create buffer "encodedData" of decimal value "700" bytes. Create buffer "decodedData" of decimal value "700" bytes. Create buffer "expectedResult" of decimal value "700" bytes. Create buffer "inputData" of decimal value "700" bytes. Create buffer "parmData" of decimal value "16" bytes. Set buffer "inputData" with string value "Copyright (c) 1991-1998 RSA Data Security, a Security Dynamics Company. License to copy this document is not granted to anyone unless the proper authority at RSA or Security Dynamics says so; and then you are not allowed to do anything with this document that the aforementioned authority person says that you can do. So there. Like you would really want to rip off a Btest script anyway, eh? Hey! Go get your own test data.". Set buffer "seedValue" to hex value "919191919191919191919191919 1919191919191". Set buffer "parmData" to hex value "0123456789abcdeffedcba987654 3210". Set buffer "expectedResult" to hex value "00f2d028637058956033ed Baldwin Informational, Expires 12/25/1999 131 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 15003f97692010379a9fecf612681074b7a1c6446f8ebcd4f5eb6a65511f629a df68eb9ad1fcd6ab2e394e98594c6844180ab6b0bf726e1ac1e93394ae600ac9 8c33328d08bfb086fad41add244e861608056dfa36894ac70bffa7441ed48f59 9ccc0b255cdeb353b162e1c4b26748e9476f0f4e883b85437473aff1c0396ae8 dd960841dda166655ba8aa684097c783fdadf7b39c4bb464094b7d8b356e6846 1243d74e2f5c3046bbac5fb1f60edb1c82472309390e28458723c404065e4972 e6568c3f6ac98bfa05f9829d0fff337bcca1841db95a5af3e42c761fd94e1f2a 157f85622c9e9c534c7b57d46c8d3d4ce839ad9a0773925ad9566f3da79a593a bba40379818df05cbbf39fd4a44c35cba3139d6474f908170249b9f29ebc3d40 9d22e9a3dfec8a170645fff1ef94e58b986593b629d367f9e2c1152142f7c770 b7f307228b45b2c46cccdcf9d2989c1706b032359e01d296f122280c65287f3f cfd4c2bebca09b4a137e6d05c9264f8ee13548ddf4c1e3a47d185ec6d9e0b65a c7f523b126d4c29a83d4a41bc7740ba7b0b225172702faab8922bc7e0f09f756 38fbd9eb29f2d52255cefe30394f7fde37b6f911f7959da6d866123fe2af4e79 f486af65839f9f9d9f8920dd0ad7fac72357abbf64aaa34cd8b02b513a54451a 6590178185179dbf3c961d5106ea7cd088900aa61362df91eb70e9b8f0987a7c 34f7a89bc2d842ae7438449599a1cbe3e762b437a07fe8b422f76a202f4519d0 7524374ac395d44a01b81c40dc97166299e1a8c95f7f1cf330b1a99d43a7bf54 873a23ea140b7d7a5d6bf1bf4b57adbf86b594d59e91a9a9dcb99d64df64a7af 9704a51680739a1e8944ab0167b9f9601b0425ed1675c30808fcd634122cca4c 87b080331aa149cc10864f4f47fb6ac51ff941cc940bd1280def33652d7528b9 01ecd2cb752f43339bc2cf2f191330b817". Note: Test a single encode and decode cycle against Note: a test vector and for functional reciprocity. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEPRecodeBER" initialized from "304806092a864886f70d01 0107303ba00b300906052b0e03021a0500a118301606092a864886f70d010108 300906052b0e03021a0500a212301006092a864886f70d0101090403012345". Call B_SetAlgorithmInfo passing "pkcsoaep" and "AI_PKCS_OAEPRecodeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEPRecode". Call B_GetAlgorithmInfo passing "_InfoPointer" and "pkcsoaep" and "AI_PKCS_OAEPRecode". Display info structure for "AI_PKCS_OAEPRecode". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData" and address of "_OutputLen" and length of free bytes in buffer "inputData" and address of first initialized byte in buffer "inputData" and length of Baldwin Informational, Expires 12/25/1999 132 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "seedValue" and address of "_OutputLen" and length of free bytes in buffer "seedValue" and address of first initialized byte in buffer "seedValue" and length of initialized bytes in buffer "seedValue" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "seedValue" by "_OutputLen". Call B_EncodeFinal passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call Call B_DecodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecodeUpdate passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Call B_DecodeFinal passing "pkcsoaep" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". Call Call B_DestroyAlgorithmObject passing "pkcsoaep". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 133 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Test a encode and decode with multiple updates against Note: a test vector and for functional reciprocity. Create algorithm object "pkcsoaep". Call B_CreateAlgorithmObject passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seedValue" of decimal value "20" bytes. Create buffer "encodedData" of decimal value "700" bytes. Create buffer "decodedData" of decimal value "700" bytes. Create buffer "inputData1" of decimal value "100" bytes. Create buffer "inputData2" of decimal value "100" bytes. Create buffer "inputData3" of decimal value "100" bytes. Create buffer "inputData4" of decimal value "100" bytes. Create buffer "inputData5" of decimal value "100" bytes. Create buffer "inputData6" of decimal value "100" bytes. Create buffer "inputData7" of decimal value "100" bytes. Create buffer "inputData8" of decimal value "100" bytes. Set buffer "inputData1" with string value "Copyright (c) 1991-1998 RSA Data Secur". Set buffer "inputData2" with string value "ity, a Security Dynamics Company. License to copy this document ". Set buffer "inputData3" with string value "is not granted to anyone unless the proper authority at RSA or S". Set buffer "inputData4" with string value "ecurity Dynamics says so; and then you are not allowed to do any". Set buffer "inputData5" with string value "thing with this document that the aforementioned authority perso". Set buffer "inputData6" with string value "n says that you can do. So there. Like you would really want to ". Set buffer "inputData7" with string value "rip off a Btest script anyway, eh? Hey! Go get your own test da". Set buffer "inputData8" with string value "ta.". Set buffer "seedValue" to hex value "919191919191919191919191919 1919191919191". Create buffer "expectedResult1" of decimal value "20" bytes. Create buffer "expectedResult2" of decimal value "700" bytes. Baldwin Informational, Expires 12/25/1999 134 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Initialize, set up expected and input data Note: Should be able to decode properly without P-params Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEPRecode" initialized from "sha1", "mgf1", "sha1", "specifiedParameters",. Call B_SetAlgorithmInfo passing "pkcsoaep" and "AI_PKCS_OAEPRecode" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEPRecodeBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "pkcsoaep" and "AI_PKCS_OAEPRecodeBER". Display info structure for "AI_PKCS_OAEPRecodeBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData1" and address of "_OutputLen" and length of free bytes in buffer "inputData1" and address of first initialized byte in buffer "inputData1" and length of initialized bytes in buffer "inputData1" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData1" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData2" and address of "_OutputLen" and length of free bytes in buffer "inputData2" and address of first initialized byte in buffer "inputData2" and length of initialized bytes in buffer "inputData2" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData2" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData3" and address of "_OutputLen" and length of free bytes in buffer "inputData3" and address of first initialized byte in buffer "inputData3" and length of initialized bytes in buffer "inputData3" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData3" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free Baldwin Informational, Expires 12/25/1999 135 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "inputData4" and address of "_OutputLen" and length of free bytes in buffer "inputData4" and address of first initialized byte in buffer "inputData4" and length of initialized bytes in buffer "inputData4" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData4" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData5" and address of "_OutputLen" and length of free bytes in buffer "inputData5" and address of first initialized byte in buffer "inputData5" and length of initialized bytes in buffer "inputData5" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData5" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData6" and address of "_OutputLen" and length of free bytes in buffer "inputData6" and address of first initialized byte in buffer "inputData6" and length of initialized bytes in buffer "inputData6" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData6" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData7" and address of "_OutputLen" and length of free bytes in buffer "inputData7" and address of first initialized byte in buffer "inputData7" and length of initialized bytes in buffer "inputData7" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData7" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "inputData8" and address of "_OutputLen" and length of free bytes in buffer "inputData8" and address of first initialized byte in buffer "inputData8" and length of initialized bytes in buffer "inputData8" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "inputData8" by "_OutputLen". Call B_EncodeUpdate passing "pkcsoaep" and address of next free byte in buffer "seedValue" and address of "_OutputLen" and length of free bytes in buffer "seedValue" and address of first initialized byte in buffer "seedValue" and length of initialized bytes in buffer "seedValue" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "seedValue" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 136 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncodeFinal passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Call Call B_DecodeInit passing "pkcsoaep". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecodeUpdate passing "pkcsoaep" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Call B_DecodeFinal passing "pkcsoaep" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". This is the end of test case "TVOAEP03". This is the start of test case "TVRC4MAC". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: RC4 with MAC vectors test Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RC4_ENCRYPT", "AM_RC4_DECRYPT", "AM_MAC", "AM_RC4_WITH_MAC_ENCRYPT", "AM_RC4_WITH_MAC_DECRYPT", Baldwin Informational, Expires 12/25/1999 137 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR". Create algorithm object "macAlg". Call B_CreateAlgorithmObject passing "macAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rc4EncAlg". Call B_CreateAlgorithmObject passing "rc4EncAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rc4MACEncAlg". Call B_CreateAlgorithmObject passing "rc4MACEncAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rc4MACDecAlg". Call B_CreateAlgorithmObject passing "rc4MACDecAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "inputData" of decimal value "100" bytes. Create buffer "cypherText" of decimal value "100" bytes. Create buffer "expected" of decimal value "100" bytes. Create buffer "plainText" of decimal value "100" bytes. Create key object "rc4Key". Call B_CreateKeyObject passing "rc4Key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "rc4MacKey". Call B_CreateKeyObject passing "rc4MacKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "key8" of decimal value "8" bytes. Create buffer "key4" of decimal value "4" bytes. Create buffer "temp" of decimal value "16" bytes. Note: Case 1: Mac len = 4 Note: Initialize, set up expected and input data Note: The first 4 bytes of the key is the key for RC4WithMAC Note: algorithm. Note: The last 4 bytes is the salt for RC4WithMAC algorithm. Set buffer "key8" to hex value "fedcba9876543210". Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "key8". Call B_SetKeyInfo passing "rc4Key" and "KI_Item" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 138 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "rc4EncAlg" and "AI_RC4" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "4". Call B_SetAlgorithmInfo passing "macAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "inputData" to hex value "0123456789abcdeffedcba98765 43210". Note: Simulate RC4 With MAC algorithm by first encrypt using Note: RC4 algorithm and Note: then MAC algorithm. Call Call B_EncryptInit passing "rc4EncAlg" and "rc4Key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Call Call B_DigestInit passing "macAlg" and "rc4Key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "macAlg" and address of first initialized byte in buffer "key8" and length of initialized bytes in buffer "key8" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "macAlg" and address of first Baldwin Informational, Expires 12/25/1999 139 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "temp" to hex value "00000000". Call B_DigestUpdate passing "macAlg" and address of first initialized byte in buffer "temp" and length of initialized bytes in buffer "temp" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "macAlg" and address of next free byte in buffer "temp" and address of "_OutputLen" and length of free bytes in buffer "temp" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "temp" by "_OutputLen". Finalize buffer "temp". Call B_EncryptUpdate passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and address of first initialized byte in buffer "temp" and length of initialized bytes in buffer "temp" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Call B_EncryptFinal passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Finalize buffer "expected". Note: Now encrypt the inputData using RC4 with MAC algorithm Set buffer "key4" to hex value "fedcba98". Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "key4". Call B_SetKeyInfo passing "rc4MacKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 140 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_RC4WithMAC" initialized from "76543210", "4". Call B_SetAlgorithmInfo passing "rc4MACEncAlg" and "AI_RC4WithMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4WithMAC" initialized from "76543210", "4". Call B_SetAlgorithmInfo passing "rc4MACDecAlg" and "AI_RC4WithMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "rc4MACEncAlg" and "rc4MacKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "rc4MACEncAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "rc4MACEncAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with contents of buffer "expected". Check equality of buffer "cypherText" with hex value "dae10fb4e886c6671003cb322806393d929f6334". Note: Decryption Call Call B_DecryptInit passing "rc4MACDecAlg" and "rc4MacKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "rc4MACDecAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and Baldwin Informational, Expires 12/25/1999 141 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "rc4MACDecAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: Mac len = 2 Note: Initialize, set up expected and input data Note: The first 4 bytes of the key is the key for RC4WithMAC Note: algorithm. Note: The last 4 bytes is the salt for RC4WithMAC algorithm. Call Call B_DestroyAlgorithmObject passing "macAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc4MACEncAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc4MACDecAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "macAlg". Call B_CreateAlgorithmObject passing "macAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rc4MACEncAlg". Call B_CreateAlgorithmObject passing "rc4MACEncAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rc4MACDecAlg". Call B_CreateAlgorithmObject passing "rc4MACDecAlg". Baldwin Informational, Expires 12/25/1999 142 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4WithMAC" initialized from "76543210", "2". Call B_SetAlgorithmInfo passing "rc4MACEncAlg" and "AI_RC4WithMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4WithMAC" initialized from "76543210", "2". Call B_SetAlgorithmInfo passing "rc4MACDecAlg" and "AI_RC4WithMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "2". Call B_SetAlgorithmInfo passing "macAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "plainText" to decimal value "0". Set length of buffer "cypherText" to decimal value "0". Note: Simulate RC4 With MAC algorithm by first encrypt using Note: RC4 algorithm and Note: then MAC algorithm. Call Call B_EncryptInit passing "rc4EncAlg" and "rc4Key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Call Call B_DigestInit passing "macAlg" and "rc4Key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 143 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "macAlg" and address of first initialized byte in buffer "key8" and length of initialized bytes in buffer "key8" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "macAlg" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "temp" to hex value "0000". Call B_DigestUpdate passing "macAlg" and address of first initialized byte in buffer "temp" and length of initialized bytes in buffer "temp" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "macAlg" and address of next free byte in buffer "temp" and address of "_OutputLen" and length of free bytes in buffer "temp" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "temp" by "_OutputLen". Finalize buffer "temp". Call B_EncryptUpdate passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and address of first initialized byte in buffer "temp" and length of initialized bytes in buffer "temp" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Call B_EncryptFinal passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Finalize buffer "expected". Note: Now encrypt the inputData using RC4 with MAC algorithm Call Call B_EncryptInit passing "rc4MACEncAlg" and "rc4MacKey" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 144 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "rc4MACEncAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "rc4MACEncAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with contents of buffer "expected". Check equality of buffer "cypherText" with hex value "dae10fb4e886c6671003cb322806393d6476". Note: Decryption Call Call B_DecryptInit passing "rc4MACDecAlg" and "rc4MacKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "rc4MACDecAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "rc4MACDecAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 145 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Mac len = 8 Note: Initialize, set up expected and input data Note: The first 4 bytes of the key is the key for RC4WithMAC Note: algorithm. Note: The last 4 bytes is the salt for RC4WithMAC algorithm. Call Call B_DestroyAlgorithmObject passing "macAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc4MACEncAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc4MACDecAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "macAlg". Call B_CreateAlgorithmObject passing "macAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rc4MACEncAlg". Call B_CreateAlgorithmObject passing "rc4MACEncAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rc4MACDecAlg". Call B_CreateAlgorithmObject passing "rc4MACDecAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4WithMAC" initialized from "76543210", "8". Call B_SetAlgorithmInfo passing "rc4MACEncAlg" and "AI_RC4WithMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4WithMAC" initialized from "76543210", "8". Call B_SetAlgorithmInfo passing "rc4MACDecAlg" and "AI_RC4WithMAC" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 146 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "8". Call B_SetAlgorithmInfo passing "macAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "plainText" to decimal value "0". Set length of buffer "cypherText" to decimal value "0". Note: Simulate RC4 With MAC algorithm by first encrypt using Note: RC4 algorithm and Note: then MAC algorithm. Call Call B_EncryptInit passing "rc4EncAlg" and "rc4Key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Call Call B_DigestInit passing "macAlg" and "rc4Key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "macAlg" and address of first initialized byte in buffer "key8" and length of initialized bytes in buffer "key8" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "macAlg" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "temp" to hex value "0000000000000000". Call B_DigestUpdate passing "macAlg" and address of first initialized byte in buffer "temp" and length of initialized Baldwin Informational, Expires 12/25/1999 147 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "temp" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "macAlg" and address of next free byte in buffer "temp" and address of "_OutputLen" and length of free bytes in buffer "temp" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "temp" by "_OutputLen". Finalize buffer "temp". Call B_EncryptUpdate passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and address of first initialized byte in buffer "temp" and length of initialized bytes in buffer "temp" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Call B_EncryptFinal passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Finalize buffer "expected". Note: Now encrypt the inputData using RC4 with MAC algorithm Call Call B_EncryptInit passing "rc4MACEncAlg" and "rc4MacKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "rc4MACEncAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "rc4MACEncAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" Baldwin Informational, Expires 12/25/1999 148 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with contents of buffer "expected". Check equality of buffer "cypherText" with hex value "dae10fb4e886c6671003cb322806393d7110b2ab11b2db55". Note: Decryption Call Call B_DecryptInit passing "rc4MACDecAlg" and "rc4MacKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "rc4MACDecAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "rc4MACDecAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 4: Mac len = 16 Note: Initialize, set up expected and input data Note: The first 4 bytes of the key is the key for RC4WithMAC Note: algorithm. Note: The last 4 bytes is the salt for RC4WithMAC algorithm. Call Call B_DestroyAlgorithmObject passing "macAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 149 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "rc4MACEncAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc4MACDecAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "macAlg". Call B_CreateAlgorithmObject passing "macAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rc4MACEncAlg". Call B_CreateAlgorithmObject passing "rc4MACEncAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rc4MACDecAlg". Call B_CreateAlgorithmObject passing "rc4MACDecAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4WithMAC" initialized from "76543210", "16". Call B_SetAlgorithmInfo passing "rc4MACEncAlg" and "AI_RC4WithMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4WithMAC" initialized from "76543210", "16". Call B_SetAlgorithmInfo passing "rc4MACDecAlg" and "AI_RC4WithMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "16". Call B_SetAlgorithmInfo passing "macAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "plainText" to decimal value "0". Set length of buffer "cypherText" to decimal value "0". Note: Simulate RC4 With MAC algorithm by first encrypt using Note: RC4 algorithm and Note: then MAC algorithm. Baldwin Informational, Expires 12/25/1999 150 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "rc4EncAlg" and "rc4Key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Call Call B_DigestInit passing "macAlg" and "rc4Key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "macAlg" and address of first initialized byte in buffer "key8" and length of initialized bytes in buffer "key8" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "macAlg" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "temp" to hex value "00000000000000000000000000000000 ". Call B_DigestUpdate passing "macAlg" and address of first initialized byte in buffer "temp" and length of initialized bytes in buffer "temp" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "macAlg" and address of next free byte in buffer "temp" and address of "_OutputLen" and length of free bytes in buffer "temp" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "temp" by "_OutputLen". Finalize buffer "temp". Call B_EncryptUpdate passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and Baldwin Informational, Expires 12/25/1999 151 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of free bytes in buffer "expected" and address of first initialized byte in buffer "temp" and length of initialized bytes in buffer "temp" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Call B_EncryptFinal passing "rc4EncAlg" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Finalize buffer "expected". Note: Now encrypt the inputData using RC4 with MAC algorithm Call Call B_EncryptInit passing "rc4MACEncAlg" and "rc4MacKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "rc4MACEncAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "rc4MACEncAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with contents of buffer "expected". Check equality of buffer "cypherText" with hex value "dae10fb4e886c6671003cb322806393dc339816703b3f0525fb5023177faa91 3". Note: Decryption Baldwin Informational, Expires 12/25/1999 152 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "rc4MACDecAlg" and "rc4MacKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "rc4MACDecAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "rc4MACDecAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". This is the end of test case "TVRC4MAC". This is the start of test case "TVRKG931". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: 1024 bit key vector test based on X9.31 example 4.1 for Note: AI_RSAStrongKeyGen, Note: KI_RSAPublic, KI_RSAPrivate Note: AI_FormatX931, AI_SignVerify Note: Depending on AI_DummyRandom algorithm Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DUMMY_RANDOM_MULT", "AM_FORMAT_X931", "AM_EXTRACT_X931", "AM_RSA_CRT_X931_ENCRYPT", "AM_RSA_X931_DECRYPT", "AM_RSA_STRONG_KEY_GEN", "NULL_PTR". Note: Set up random object for param and key generation Baldwin Informational, Expires 12/25/1999 153 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DummyRandomMult" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_DummyRandomMult" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "512" bytes. Set buffer "seed" to hex value "1A1916DDB29B4EB7EB6732E128192E8A AC41C576C822D93EA433D8CD81F035EC57EFE822955149D3BFF70C53520D769D 6D76646C7A792E16EBD89FE6FC5B605A649339DFC925A86A4C6D150B71B9EEA0 2D68885F5009B98BD9841A5CF72EE770DE50CB09ACCEA9134E4CAA16D2350A21 D775C404CC1092495D867E64065DEE3E7955F2EBC7D47A2D7C9953388F97DDDC 3E1CA19C35CA659EDC2FC3256D29C2627479C086A699A49C4C9CEE7EF7BD1B34 321DE34A". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate RSA Keypair Create algorithm object "rsaKeyGen". Call B_CreateAlgorithmObject passing "rsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAStrongKeyGen" initialized from "1024", "3". Call B_SetAlgorithmInfo passing "rsaKeyGen" and "AI_RSAStrongKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 154 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "rsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "rsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the RSA public Set "_ExpectedInfoPointer" to address of expected info structure for "KI_RSAPublic" initialized from "acd1cc46dfe54fe8f9786672664ca2690d0ad7e5003bc6427954d939eee8b27 152e6a947450d7fa980172de064d6569a28a83fe70fa840f5e9802cb8984ab34 bd5c1e6399ec21e4d3a3a69be4e676f395aafef7c4925fd4faee9f9e5e48af43 15df0ec2db9ad7a350b3df2f4d15dc0039846d1aca3527b1a75049e3fe34f43b d", "03". Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Check equality of info structure for "KI_RSAPublic" with expected info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the DSA private Set "_ExpectedInfoPointer" to address of expected info structure for "KI_RSAPrivate" initialized from "acd1cc46dfe54fe8f9786672664ca2690d0ad7e5003bc6427954d939eee8b27 152e6a947450d7fa980172de064d6569a28a83fe70fa840f5e9802cb8984ab34 bd5c1e6399ec21e4d3a3a69be4e676f395aafef7c4925fd4faee9f9e5e48af43 15df0ec2db9ad7a350b3df2f4d15dc0039846d1aca3527b1a75049e3fe34f43b d", "1ccda20bcffb8d517ee9666866621b11822c7950d55f4bb5bee37989a7d 17312e326718be0d79546eaae87a56623b919b1715ffbd7f16028fc400774196 1c88c5d7b4daaac8d36a98c9efbb26c8a4a0e6bc15b358e528a1ac9d0f042beb 93bca16b541b33f80c933a3b769285c462ed5677bfe89df07bed5c127fd13241 d3c4b". Set "_InfoPointer" to address of info structure for "KI_RSAPrivate". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_RSAPrivate". Check equality of info structure for "KI_RSAPrivate" with Baldwin Informational, Expires 12/25/1999 155 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 expected info structure for "KI_RSAPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now use the generated key in signing and verifying Create buffer "signature" of decimal value "1024" bytes. Create algorithm object "x931RSASigner". Call B_CreateAlgorithmObject passing "x931RSASigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SignVerify" initialized from "rsaSignX931", "0", "sha1", "0", "formatX931", "128", "3". Call B_SetAlgorithmInfo passing "x931RSASigner" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "x931RSAVerifier". Call B_CreateAlgorithmObject passing "x931RSAVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SignVerify" initialized from "rsaVerifyX931", "0", "sha1", "0", "formatX931", "128", "3". Call B_SetAlgorithmInfo passing "x931RSAVerifier" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: Sign 3 bytes Set buffer "seed" to hex value "616263". Call Call B_SignInit passing "x931RSASigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "x931RSASigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "x931RSASigner" and address of next Baldwin Informational, Expires 12/25/1999 156 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "061D355237E2A05866867110D32F1D8D3C5193F5CB7AC3892B7FBE89D0D85DB 544E136A549DFCF75297EA9ECE21F0855893BBF23099884E5EDAC82EDFAE44AF 0453AB631CCBA5C76EDD13CBD3D51F37FE40B9A5DD6483513386F5C70401687D FC27D1DDAF6EDBD18CEFAD5CF817504C08F482D262AD3577AA2705AAF0905657 8". Note: Verify the signature of the seed Call Call B_VerifyInit passing "x931RSAVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "x931RSAVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "x931RSAVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVRKG931". This is the start of test case "TVRKG932". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: 1536 bit key vector test based on X9.31 example 4.2 for Note: AI_RSAStrongKeyGen, Note: KI_RSAPublic, KI_RSAPrivate Note: AI_FormatX931, AI_SignVerify Note: Depending on AI_DummyRandom algorithm Baldwin Informational, Expires 12/25/1999 157 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DUMMY_RANDOM_MULT", "AM_FORMAT_X931", "AM_EXTRACT_X931", "AM_RSA_CRT_X931_ENCRYPT", "AM_RSA_X931_DECRYPT", "AM_RSA_STRONG_KEY_GEN", "NULL_PTR". Note: Set up random object for param and key generation Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DummyRandomMult" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_DummyRandomMult" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "512" bytes. Set buffer "seed" to hex value "1A1916DDB29B4EB7EB6732E128192E8A AC41C576C822D93EA433D8CD81F035EC57EFE822955149D3BFF70C53520D769D 6D76646C7A792E16EBD89FE6FC5B605A649339DFC925A86A4C6D150B71B9EEA0 2D68885F5009B98BD9841A5CF72EE770DE50CB09ACCEA9134E4CAA16D2350A21 D775C404CC1092495D867E64065DEE3E7955F2EBC7D47A2D7C9953388F97DDDC 3E1CA19C35CA659EDC2FC3256D29C2627479C086A699A49C4C9CEE7EF7BD1B34 321DE34A". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate RSA Keypair Create algorithm object "rsaKeyGen". Call B_CreateAlgorithmObject passing "rsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAStrongKeyGen" initialized from "1536", "3". Baldwin Informational, Expires 12/25/1999 158 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "rsaKeyGen" and "AI_RSAStrongKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "rsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "rsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPrivate". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_RSAPrivate". Display info structure for "KI_RSAPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_RSAPrivate" initialized from "99f4b516fb3dacdb0e8f2c208c7c4271d1a51c040d0934014370ae59132f2fa ef9ff6fb3a89fb0b5f36b36121641c2f9582f3dd80a2f0a5807609c3ce2c5ec4 bf46977b85e0bb4394705bc3108b3b6813ad0e86577a460b65b95bb013295218 e4125ab763388f354a22528daf643c179ddf787dce34a5486e2870d1cf17166c f847ef3cdcd9c00a4938a3782e6fe7a5f3872c1d35a602f741403dccb1f704d0 3b612dd472a89f353cf085a641b1ab8fd5e5aefb9fadf0426aaf32cd0e2dc436 1", "066a32364a77e733cb45f72c05da82c4be118bd5808b0cd562cf5c990b7 74ca74a6aa4a77c5bfcb23f79cceb6b9812ca63aca293ab174b19004eb12d341 d94832a2f0fa7ae95d22d0da03d2cb5b2279ab7c8b4598fa6d95cee7b9275621 b8c10877092d44c0f33ad4dde5e0c4cff980a81cb1b622155ffb0baee8fa4a60 d30fc886ff4063271988e6498227a80efcaa44fa19071717be1b3344f5cd4d42 a2d3b78283fea3c92c5c421f2258cff1cf86f1a08211c2ffa20f53d467d4d231 bc8b3". Set "_InfoPointer" to address of info structure for "KI_RSAPrivate". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and Baldwin Informational, Expires 12/25/1999 159 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "KI_RSAPrivate". Check equality of info structure for "KI_RSAPrivate" with expected info structure for "KI_RSAPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the DSA private Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Display info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_RSAPublic" initialized from "99f4b516fb3dacdb0e8f2c208c7c4271d1a51c040d0934014370ae59132f2fa ef9ff6fb3a89fb0b5f36b36121641c2f9582f3dd80a2f0a5807609c3ce2c5ec4 bf46977b85e0bb4394705bc3108b3b6813ad0e86577a460b65b95bb013295218 e4125ab763388f354a22528daf643c179ddf787dce34a5486e2870d1cf17166c f847ef3cdcd9c00a4938a3782e6fe7a5f3872c1d35a602f741403dccb1f704d0 3b612dd472a89f353cf085a641b1ab8fd5e5aefb9fadf0426aaf32cd0e2dc436 1", "03". Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Check equality of info structure for "KI_RSAPublic" with expected info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now use the generated key in signing and verifying Create buffer "signature" of decimal value "1024" bytes. Create algorithm object "x931RSASigner". Call B_CreateAlgorithmObject passing "x931RSASigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SignVerify" initialized from "rsaSignX931", "0", "sha1", "0", "formatX931", "192", "3". Call B_SetAlgorithmInfo passing "x931RSASigner" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 160 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "x931RSAVerifier". Call B_CreateAlgorithmObject passing "x931RSAVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SignVerify" initialized from "rsaVerifyX931", "0", "sha1", "0", "formatX931", "192", "3". Call B_SetAlgorithmInfo passing "x931RSAVerifier" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: Sign 3 bytes Set buffer "seed" to hex value "616263". Call Call B_SignInit passing "x931RSASigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "x931RSASigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "x931RSASigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "2bd1aedbe89a4da184ed40155c8b2f2980b98158ac6eab6df6c440f6af07f5f 88e00f3682b5e74a01929727bb6464f31b9b5b9343e1b4d75bf317211e274db9 0b11105720d363c0506c2803723f121d68c94ba70bf2e8cfbc379f4ecb7754b6 19e524f9fc336d70a597d0d89a0a314b25191040425c0f7740755b8e51cb6201 786c14fb910dc6193bb65790c002b38d1ce05e473bcfb670496c2c51d236410c 7129bf0ac3e29519e42eb3aed76f75f8233a91e87f566ebdfbb5fef46987da4a 7". Note: Verify the signature of the seed Call Call B_VerifyInit passing "x931RSAVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 161 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "x931RSAVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "x931RSAVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVRKG932". This is the start of test case "TVRKG933". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: 2024 bit key vector test based on X9.31 example 4.2 for Note: AI_RSAStrongKeyGen, Note: KI_RSAPublic, KI_RSAPrivate Note: AI_FormatX931, AI_SignVerify Note: Depending on AI_DummyRandom algorithm Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DUMMY_RANDOM_MULT", "AM_FORMAT_X931", "AM_EXTRACT_X931", "AM_RSA_CRT_X931_ENCRYPT", "AM_RSA_X931_DECRYPT", "AM_RSA_STRONG_KEY_GEN", "NULL_PTR". Note: Set up random object for param and key generation Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DummyRandomMult" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_DummyRandomMult" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 162 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "700" bytes. Set buffer "seed" to hex value "1a1916ddb29b4eb7eb6732e128192e8a ac41c576c822d93ea433e532cf6e17e192b694e1313a3ce043534cd24e264e77 3f7bde8d9a190ef1a5ab841c4d3932a85b48d428875dd710176489e6973dcbb9 dc379432c26b33aa6fb3b19b03e06bd8afdfd0452aa293a77fee18a6a41aed3a daecc8d8f4f25c2dd7b13fcdf8b6c0b4c92673bf924b50d498da2a16e373dd40 5ad110bea0137317b3081f2654ce23e5f7770f8728670c1d867e64065dee3e79 55f2ebc7D2DDB9275760C8AACFC46AD6C3D78F0788D18733D6B024043E04AE70 E71794C0231ACBAD28FC0FC137D8CFA848747594F6EE8D5D318C6962A70AB471 BA439B1227EEEAFDEAB75AC119D72178BAF4685B931DF1C87E230F33EB120CDF E7A618A48C63B2069E62610152752C113990A21A551FE17F6F711CE812197E1C 9CE5DEA6". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate RSA Keypair Create algorithm object "rsaKeyGen". Call B_CreateAlgorithmObject passing "rsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAStrongKeyGen" initialized from "2048", "3". Call B_SetAlgorithmInfo passing "rsaKeyGen" and "AI_RSAStrongKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "rsaKeyGen" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 163 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "rsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the RSA public Set "_ExpectedInfoPointer" to address of expected info structure for "KI_RSAPublic" initialized from "bcca30ca5280bc51e758dbaffedfe46a5d2a78d83969e154780f9b27ad4e76e 63e8fa96029c04de3f2c4b01fecbebb44fc2f5f8ac69bd0e3278ff0658a6f9ac 23bcfb2c9aaaf1ac4d5571a55d3b1ec3550cf34d8f789235dd3b5c4e2f3df176 119d918f2d35e805b62fc35fee5fd07854824b9846dc1665e35a31873bf6a24f e50842d0aa0305c35d0f45b0d7c2f1e9432d850d67956d383bbef52fc2acbf7a e6f7ca21488a56456bdf6672696ee037c3caa2199904e37aa40134e10155fc81 393a225bd129c4b3bc91ad3a5fc958a6abcabe3550390b67787625d78f8d3172 b673c4482ce354b8951d7e8c4ddce5d4cdfa6790c6ce8c02c8d807ae26f27fe3 3", "03". Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Check equality of info structure for "KI_RSAPublic" with expected info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the RSA private Set "_ExpectedInfoPointer" to address of expected info structure for "KI_PKCS_RSAPrivate" initialized from "bcca30ca5280bc51e758dbaffedfe46a5d2a78d83969e154780f9b27ad4e76e 63e8fa96029c04de3f2c4b01fecbebb44fc2f5f8ac69bd0e3278ff0658a6f9ac 23bcfb2c9aaaf1ac4d5571a55d3b1ec3550cf34d8f789235dd3b5c4e2f3df176 119d918f2d35e805b62fc35fee5fd07854824b9846dc1665e35a31873bf6a24f e50842d0aa0305c35d0f45b0d7c2f1e9432d850d67956d383bbef52fc2acbf7a e6f7ca21488a56456bdf6672696ee037c3caa2199904e37aa40134e10155fc81 393a225bd129c4b3bc91ad3a5fc958a6abcabe3550390b67787625d78f8d3172 b673c4482ce354b8951d7e8c4ddce5d4cdfa6790c6ce8c02c8d807ae26f27fe3 3", "03", "1f770821b86aca0da68ecf47ffcffb670f8714240991a58e14029 9dbf237be7bb517f19006f56250a8761d5aa7751f362a07e541cbc4a2d08697f d6641bd4475b4a29dcc471d2f20ce392f0e4df2fcb38d77de24294185e4f89e4 b7b28a52e902ef98428788fc00f3b2a08ffd0ff8140e15b7440bcf5910fb39b2 ebdf53c5b7f6ebdf0be32d25578bcb7ca7f69e9375ee4de1494b8b292ab453a2 c685e2074e076b64187b22ad43772fe2d5abe9193c074a37f7fc32bfdad5623a 3dddbe84a379f0409251f576019cfd516971cfef05ad8268ce844087763cde93 Baldwin Informational, Expires 12/25/1999 164 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 9f11e2a8678ef2c6ef63d2aa48c997c7c75548d9d4eb23043583c3eac1cd990e 6a4178b18eb", "e532cf6e17e192b694e1313a3ce043534cd24e264e773f7bd e8d9a190ef1a5ab841c4d3932a85b48d428875dd710176489e6973dcbb9dc379 432c26b33aa6fb3b19b03e06bd8afdfd0452aa293a77fee18a6a41aed3adaecc 8d8f4f25c2dd7b13fcdf8b6c0c8a33e72998487de550e0d7188aa87b2cf20d5c 7f83eb0c95ed0c1", "d2ddb9275760c8aacfc46ad6c3d78f0788d18733d6b02 4043e04ae70e71794c0231acbad28fc0fc137d8cfa848747594f6ee8d5d318c6 962a70ab471ba439b1227eeeafdeab75ac119d72178baf4685b931df1c87e230 f33eb120cdfe7a618a48c63b2069e6cccff4653797d04279f6740fc3a7350a19 6a9ac22d459188697f3", "98cc8a4965410c79b89620d17dead78cdde1896ed efa2a52945e66bb5f4bc3c7ad68337b771ae785e2c5af93e4b564edb14464d3d d2692cfb821d6f222719fcd211202959d3b1fea8ad8c7170d1a554965c46d674 8d1e74885e5f8a192c93a762a895079d5db177ef71103053ee35eb3a105c7052 1df6b392ffad475db948b2b", "8c93d0c4e4eb3071dfd84739d7e50a0505e10 4cd39cac2ad7eadc9a09a0fb8801767327370a80a80cfe5dfc585a2f90df9f45 e3e21084641c4b1cda126d7bcb6c549f1fe9c7a3c80bbe4c0fb274d9ae7b7694 bdafec20a229cb6b33fefc4106db2ed2159bef33354d98cfba8ad6fbf9a2b52d 1a235c10f1bc817383b65af0ff7", "ba91456e8aafa0451a3f564d6580a1d89 79f85f33a9c46c8f904328b5f2743d65e98563d158fb4d289efc8b39fd79e969 dae6152c8cc3b1f2bce9f5cb7f593eed9e50169edecf82b0361828852c7b700c a3655d434916fc5a13eef4ffa4136f41e3ef11aa76a67294480d8eb6973bafd7 7c2d8ca6c33ad71c079d3d65e30352a". Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_PKCS_RSAPrivate". Check equality of info structure for "KI_PKCS_RSAPrivate" with expected info structure for "KI_PKCS_RSAPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now use the generated key in signing and verifying Create buffer "signature" of decimal value "1024" bytes. Create algorithm object "x931RSASigner". Call B_CreateAlgorithmObject passing "x931RSASigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SignVerify" initialized from "rsaSignX931", "0", "sha1", "0", "formatX931", "256", "3". Call B_SetAlgorithmInfo passing "x931RSASigner" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "x931RSAVerifier". Call B_CreateAlgorithmObject passing "x931RSAVerifier". Baldwin Informational, Expires 12/25/1999 165 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SignVerify" initialized from "rsaVerifyX931", "0", "sha1", "0", "formatX931", "256", "3". Call B_SetAlgorithmInfo passing "x931RSAVerifier" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: Sign 3 bytes Set buffer "seed" to hex value "616263". Call Call B_SignInit passing "x931RSASigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "x931RSASigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "x931RSASigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Display buffer "signature". Check equality of buffer "signature" with contents of buffer "signature". Check equality of buffer "signature" with hex value "2b6557434af5230b2693648c2c797a47e197da08d4aef6f3d49edfa22e7332a 227366f2bc597e0d54863c84e9139aeadc9d174604119fad959b2bf8eddfb15c a6b06c3efd7f6a740719e541d289833845f5ae3888003711ecb1027cf8600c20 a3719903592c63533ab7258eba709f5f45b8e9df33532cc70d9165be2aa7bce2 99c951d585f74c3fc25685788abc3325714fdf5933ca6ac528ebbead99e02dc7 9c1151156bc59dbb8f32bdfab92f7b28fb35c646a281cdd75460f07436a140bc b47a971cf157d0773888b9c07723e774922fcdfd204cd4bc317b4d5f6ef6f4cb 4e6840bb56e2ddef88c349e8fd9cba049d1df2329848a7f4227e44021813b7f8 d". Baldwin Informational, Expires 12/25/1999 166 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Verify the signature of the seed Call Call B_VerifyInit passing "x931RSAVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "x931RSAVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "x931RSAVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVRKG933". This is the start of test case "TVRKG935". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: 1024 bit key vector test based on X9.31 example 4.5 for Note: AI_RSAStrongKeyGen, Note: KI_RSAPublic, KI_RSAPrivate Note: AI_FormatX931, AI_SignVerify Note: Depending on AI_DummyRandom algorithm Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DUMMY_RANDOM_MULT", "AM_FORMAT_X931", "AM_EXTRACT_X931", "AM_RSA_CRT_X931_ENCRYPT", "AM_RSA_X931_DECRYPT", "AM_RSA_STRONG_KEY_GEN", "NULL_PTR". Note: Set up random object for param and key generation Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 167 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DummyRandomMult" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_DummyRandomMult" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "512" bytes. Set buffer "seed" to hex value "1857FA8D9D0B0E4E033B68CE401A416A 5C0DAB5E4CEB97EB9EECDBB3CB4C375C0ECD2FD300DB4F08547293CA004CEDD2 019CE79CA08A15EEFB25DD3BAF981823961F4148FF03C6E96930B78C7A758D69 BC5070137900403807A4198C4AD4DBA81A560183DD19BA1A5A797EB98BEFF431 2D0C9EF7EEAA4A5347999FE76FB7876064BBEC66CB409A7739EF5A5906613DC3 7225D41D2BEB1F9F5EBF4CC95B6BF916A47C5EF2146BE00ECD4A1C5D88B3E85A 9569BE97". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate RSA Keypair Create algorithm object "rsaKeyGen". Call B_CreateAlgorithmObject passing "rsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAStrongKeyGen" initialized from "1024", "2". Call B_SetAlgorithmInfo passing "rsaKeyGen" and "AI_RSAStrongKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "rsaKeyGen" and "_Chooser" and Baldwin Informational, Expires 12/25/1999 168 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "rsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the RSA public Set "_ExpectedInfoPointer" to address of expected info structure for "KI_RSAPublic" initialized from "ccd34c2f4d95ffad1420e666c07e39d1450a13304c3f5891ede57595c772a36 91ab51d2bece1476b8f22ae223365f183bc3ee2d4cacdba3ad0c4d4781c523a1 0efe6203d6f3bc226bf9a459727b8f122c482d8c86019f9a869329187096430a 6c67cb103742bcbc66906ad23836ebabb511d5d80ab8cb59974e9aac62d785c4 5", "02". Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Check equality of info structure for "KI_RSAPublic" with expected info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the RSA private Set "_ExpectedInfoPointer" to address of expected info structure for "KI_RSAPrivate" initialized from "ccd34c2f4d95ffad1420e666c07e39d1450a13304c3f5891ede57595c772a36 91ab51d2bece1476b8f22ae223365f183bc3ee2d4cacdba3ad0c4d4781c523a1 0efe6203d6f3bc226bf9a459727b8f122c482d8c86019f9a869329187096430a 6c67cb103742bcbc66906ad23836ebabb511d5d80ab8cb59974e9aac62d785c4 5", "199a6985e9b2bff5a2841cccd80fc73a28a142660987eb123dbcaeb2b8e e546d2356a3a57d9c28ed71e455c4466cbe307787dc5a9959b7475a189a8f038 a4741e4b10153be08c26e4401f7ab6e7e96092caf07c0870b13b64f669667302 9ec2c77aabc397fa528a245d7073ce69cc9bdcd7bef91599dca484000c0bd8ab 0814e". Set "_InfoPointer" to address of info structure for "KI_RSAPrivate". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_RSAPrivate". Check equality of info structure for "KI_RSAPrivate" with expected info structure for "KI_RSAPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 169 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Now use the generated key in signing and verifying Create buffer "signature" of decimal value "1024" bytes. Create algorithm object "x931RSASigner". Call B_CreateAlgorithmObject passing "x931RSASigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SignVerify" initialized from "rsaSignX931", "0", "sha1", "0", "formatX931", "128", "3". Call B_SetAlgorithmInfo passing "x931RSASigner" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "x931RSAVerifier". Call B_CreateAlgorithmObject passing "x931RSAVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SignVerify" initialized from "rsaVerifyX931", "0", "sha1", "0", "formatX931", "128", "3". Call B_SetAlgorithmInfo passing "x931RSAVerifier" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: Sign 3 bytes Set buffer "seed" to hex value "616263". Call Call B_SignInit passing "x931RSASigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "x931RSASigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "x931RSASigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 170 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "232F0E08EB9A23957646697FC7884796D39A04FD0EFF5B72B60813D4E691917 891C96603876D08793AAD86DAF2E6187FF62C226E81BD6B993B27091E0864895 AF10F222AEB022961B444D312EA3DB7891D4550B280CF24693D4465B957E53CB DB0F8C29D2B5EE1545D6C91A45EAAACEC0096D8A5E4CFE06A2CD320BDF853D81 7". Note: Verify the signature of the seed Call Call B_VerifyInit passing "x931RSAVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "x931RSAVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "x931RSAVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVRKG935". This is the start of test case "TVRSAP01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, PKCS RSA encryption and decryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_ENCRYPT", "AM_MD2_RANDOM", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 171 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Use the following random algorithm object througout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "2" bytes. Set buffer "seed" to hex value "0000". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Input the value given and check the result against the Note: result Note: produced by BSAFE 2.1.2 Note: Use an the following 777-bit keypair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "01aff1bfa898e4656dc06f97f5cda85 345e4813a92e57c39a72f277a4dfeaad685507241f61b0c5e744a2bf12ee2b16 2d7674c8de231bedbf3af349bf92199d2e97c735033c39e109fac775d12ebdae d0132ee1e9125816f8099c84b93f946379cb7", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 172 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "01aff1bfa898e4656dc06f97f 5cda85345e4813a92e57c39a72f277a4dfeaad685507241f61b0c5e744a2bf12 ee2b162d7674c8de231bedbf3af349bf92199d2e97c735033c39e109fac775d1 2ebdaed0132ee1e9125816f8099c84b93f946379cb7", "010001", "cb58ef16ab2bd3085130f80433168c657a06d0917951fb3e56b7aa1f6fc5f38 9fd6e5cd944b09503002c21b625e8c69476687355240df3c2177d7564c2780bb baa855b70103cf7a540c5d7e7136cbcb6aa8d5518b3ae9032f7468b7d81ee616 d89", "1fb6d010eab6f59a4421a6778f911a33148eb2a70513d9b5648a30d8b 27874bfea18ee6a869ad6d5236b538a62a46f1325", "0d9eb46fbf1a16db07b 10030fed4d1ce687b613520575a33c48502801c4ba475d46dac29e667d89af03 2b64e103d5f97ab", "1145d240c4756d82ddc4ae13c43fb55348c907886bfd8 9bf7fc8bc1de9e62d403151eed85a038f2a7aa603d40531a5c579", "0d0596d85c6b123d19ee7613622191f2f9dc34c579856afda1bfd5f32c9a79c 41a753d2cd658a53505c046a2fe4ddf8e7f", "0382dd6cc2d80db494cc60908 1b56d37e4dcbc592ffedaa02a225ee8a09204a4b094ab514f69d668b8423499d ae135ffac". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt and decrypt the following data. Create buffer "input" of decimal value "32" bytes. Set buffer "input" to hex value "10cae34ddaf234b5feedd98ac544e02 79ae2c5c14d1ec835feb6f48aeb26414b". Create buffer "output" of decimal value "98" bytes. Note: Public key encryption. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_PKCS_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 173 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "0192bb944584995809f6414d0ec12d8a64356cbdc7a21ccccd3c09f3a0c49da ed0f2731c6b16368346f5dd46f065292461aaca8cf1f5d862d43e97c05024984 78be39a44e512698e3b0cf7db816914d328dec9d5728a63ae906514e8fd493b0 8f219". Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Private key encryption. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next Baldwin Informational, Expires 12/25/1999 174 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "010851a47f356b9d3487c1e0625802e0ff87f48ac4df12b2efa2baacab9f99b e7d379ee8d9408c4e981f3c058bd7bc66df6a3cb57371adf08ef9d02a15c0439 2064b6dbac3d154b86ca59384df6c7ede557460ef95415b4eed56325d5982a90 5efb7". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVRSAP01". This is the start of test case "TVRSAP02". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, PKCS RSA encryption and decryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_ENCRYPT", "AM_MD5_RANDOM", "NULL_PTR". Note: Use the following random algorithm object througout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 175 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "2" bytes. Set buffer "seed" to hex value "0000". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-1 Note: Input the value given and check the result against the Note: result Note: produced by BSAFE 2.1.2 Note: Use an the following 1994-bit keypair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "03a886ca1029bb5ee2e8e455b2dd4a3 632315cf58e0c5ad9a5422bff4dbe7a0cec258ae7932e49c58986c56f932ca88 501187e8e92aa4a28fb2e83ed107a2b4b1c63bd6ba18e00d0bd6b359fe01f7b5 66895f943c40f5d012149ea4c4a7337e1fe5498b40728616509219ba54323bb6 e78a84ab7b74fb3b195afab14aa9ad0061cb813693a6de691c42164385ca6b9d 8173aba42180aa3d2fadd63118adcdc23be6e30921ff4a23460ec413f9ee3a17 d516359cbcd6d411aab16db5d697c388cfd4e3f295e4a7413b7fa06032fc6700 fb6a64be8b8400040282938a1dbfe550f3e3bb9b1807dd67474dee187307f0fe 088437c44e19ecd9e50e9", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 176 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "03a886ca1029bb5ee2e8e455b 2dd4a3632315cf58e0c5ad9a5422bff4dbe7a0cec258ae7932e49c58986c56f9 32ca88501187e8e92aa4a28fb2e83ed107a2b4b1c63bd6ba18e00d0bd6b359fe 01f7b566895f943c40f5d012149ea4c4a7337e1fe5498b40728616509219ba54 323bb6e78a84ab7b74fb3b195afab14aa9ad0061cb813693a6de691c42164385 ca6b9d8173aba42180aa3d2fadd63118adcdc23be6e30921ff4a23460ec413f9 ee3a17d516359cbcd6d411aab16db5d697c388cfd4e3f295e4a7413b7fa06032 fc6700fb6a64be8b8400040282938a1dbfe550f3e3bb9b1807dd67474dee1873 07f0fe088437c44e19ecd9e50e9", "010001", "024b1b3cff86f9f4d131893 b84672007fbcd60667c479888cb0641c8ca7737d2741451113dfe8db6edb1748 2aef4172d5273859b61aca9d3292c8efe060f60a6b4c47e5244345ea47dab013 219f20283380b94f97ba6d9fa44612f25e6a2768d11c0fcfe1762a4340fd666d 9e2ce3ac95590c34e8af7c741f401edb185e02af243897e26dca7e106731f97e 263d9afbb8e488c4bfad7e3a26f28855a456f377a897c208301ee5bddfaa58e7 f43a0fdd206bfa53bf11e7ef0aab81e2424f29ee71833c21eaabdfe8550dd145 c361f224d9a45cf77fa71fd87bb60685557b1aabfdda51263bd6b07e02893e2a 85f6bda02a2f7554494e6edb62311", "1ead516e9ba0f918d62db10280e1518 50820e6e56179a4ad05d63c3cc7af0c15924d21e62974fa7260c9dfd579da1f0 5039b5e6830cd793cad1361501bc67eac1bdd5af6beedf8135e06cb53060a8ab 633c9e6246de5398183aa4e4f22f0b28342a573361a6d1615e0549f2d0805e84 355ac3f155e1e102423a7bb36e5", "1e87522f167933e0f9055fab0a16ce84a 5b276781a33588a34a5d8797695ea1c98abb89b2505f88dfbf0ed9642b291268 b512dd7d23f9593d5121b78792f600370654dc8b4ad173784218b11d913555dd 491fb5bcd7440273d4ad62b98bf9247cc1a1333ff20d91abaaf5e34249353cae ef8944d347670583e394d6db5", "1822cf3e122e5dae3fdd2536ce05f9288cd 3ae36ed3152f25af44ae29b4d4b59b1890451dd6e4f1a2cb2c86c6279ce0c18e 1662eddaedc6373dd1aa477a5fdc6160a5be665244019a4d1fda92dc89f88694 8c1cd09b5df3fda42e567f81a9ea90d87b514ed47c4a7a39f90b95265ab6f46f 9c58c5f4791f58d240bf54d", "11929b3ff793b4c51f1274cb23779550cd803 8a9518b94bf99268dc0fcfdb650d7a0a116cceceef1ebbff742b309ce7b7d5e3 1213628db94c8e52f62dd7ee3a9971cf8f53aeb179e21349db49c5b809c0e2c2 99fe257b445e2061dd9e2870350c8af89b6387953ff0acebf4f0c6eb1a0f285a bf7f4e6e82c234520c8b1", "020086ab73e7b4cd307f963c0f50d6468c6a589 a8ae5ef82211d58600569c9e3ecc5839543131cad2880fff40289fff44cafa4a 1eb56e5211a48e8193b10c9320f5d5d66966aaa7bd5eac0d5d04d78621267b2c 9cbb1dcda49b94f1a88ffc4bc4b949e4c28baa9a4e310de344db17b974aa2e16 41cfd727ad46d16ec96". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt and decrypt the following data. Create buffer "input" of decimal value "32" bytes. Set buffer "input" to hex value "2b98bf9247cc1a1333ff2f894422cf3 Baldwin Informational, Expires 12/25/1999 177 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 536c36ed3152f25af446ecb2c2eddaedc". Create buffer "output" of decimal value "251" bytes. Note: Public key encryption. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_PKCS_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "0016c2127c2b9168f3a05c206f6b916184f55bdc94937f0e0751234be72dc91 a70827014583dd56096544c527e3d183ff9eaf634ec1d1515c58031c782fc367 ba1f5a94ed3ef5d7be7024dfd71766fa1f1cc6fa6107e782d554e0012c8c4591 d8717f81f850cfc56b4696ff8cc46d04021ba26c2dd40e2a82cbdd54a2c07cc9 b2412fe5a584f6a10d051c5ca8d38882e0b1c1f1d21e171fb2b7d3c5f614d9aa 0b5bfee22ce6afced8096590e34545467a80a2ace4f53577b1da62bfe38516c8 760c509406b1037908f648739aa0c52a2c4ace9364eb9ee645270466f64f8338 4b16403bc5610adf98296e7c4e0da75344fb811ad8bdfcd2a7899". Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 178 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Private key encryption. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "018a5aeb53a816ed677c0d3240807025dfed44ac0c8a92a2461bd847a2aa257 f437ea8977666b09f07ea83dbe6dbed5e7c0f28723decf099a3dfd569825a457 0f96bdbec49e2b8f7d8a67d5e01e13469661403debc70bff9fcba6dbd226c80a 27e25b4f9eb01b53fe904a11ec46cdf2447df4512b7dc2fb4f4f2050f99f7e8d a526122d352b55ee3db2cea7deecb3e7611de03ca8a350c83217449d2a3c87a0 d80c587b92937f83e16d6f42e69761981f5d64148861dd1a5790b58cd702ee21 e18abd310d5d2604a4adeeaaf2274a0c0caf43c1a48d0ffe8264e756fa223f1b 51b6741dd7d21e8b52224dc2cf86c1c030b2a323c69122980a85d". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 179 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------- This is the end of test case "TVRSAP02". This is the start of test case "TVRSAPK1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, PKCS 1 V2 OAEP RSA encryption and Note: decryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_ENCRYPT", "AM_MD2_RANDOM", "NULL_PTR". Note: Use the following random algorithm object througout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "2" bytes. Set buffer "seed" to hex value "0000". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Input the value given and check the result. Baldwin Informational, Expires 12/25/1999 180 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Use the following 777-bit keypair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "01aff1bfa898e4656dc06f97f5cda85 345e4813a92e57c39a72f277a4dfeaad685507241f61b0c5e744a2bf12ee2b16 2d7674c8de231bedbf3af349bf92199d2e97c735033c39e109fac775d12ebdae d0132ee1e9125816f8099c84b93f946379cb7", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "01aff1bfa898e4656dc06f97f 5cda85345e4813a92e57c39a72f277a4dfeaad685507241f61b0c5e744a2bf12 ee2b162d7674c8de231bedbf3af349bf92199d2e97c735033c39e109fac775d1 2ebdaed0132ee1e9125816f8099c84b93f946379cb7", "010001", "cb58ef16ab2bd3085130f80433168c657a06d0917951fb3e56b7aa1f6fc5f38 9fd6e5cd944b09503002c21b625e8c69476687355240df3c2177d7564c2780bb baa855b70103cf7a540c5d7e7136cbcb6aa8d5518b3ae9032f7468b7d81ee616 d89", "1fb6d010eab6f59a4421a6778f911a33148eb2a70513d9b5648a30d8b 27874bfea18ee6a869ad6d5236b538a62a46f1325", "0d9eb46fbf1a16db07b 10030fed4d1ce687b613520575a33c48502801c4ba475d46dac29e667d89af03 2b64e103d5f97ab", "1145d240c4756d82ddc4ae13c43fb55348c907886bfd8 9bf7fc8bc1de9e62d403151eed85a038f2a7aa603d40531a5c579", "0d0596d85c6b123d19ee7613622191f2f9dc34c579856afda1bfd5f32c9a79c 41a753d2cd658a53505c046a2fe4ddf8e7f", "0382dd6cc2d80db494cc60908 1b56d37e4dcbc592ffedaa02a225ee8a09204a4b094ab514f69d668b8423499d ae135ffac". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt and decrypt the following data. Create buffer "input" of decimal value "32" bytes. Set buffer "input" with string value "RSA Data Security Bsafe Toolkit". Baldwin Informational, Expires 12/25/1999 181 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "encryptedResult" of decimal value "400" bytes. Set buffer "encryptedResult" to hex value "0118f15daa7e60ec2a8b7 6c3e3c94c6e1c684b98461d6986f442f695e5568472b30f8bb304d039a1ef705 c29c59f50e6c9b5066aa3d5af6e29f2a2608c9f4016eb7195d230274334631e5 8925129b36b3be655adbdbbeac5f7319ce1104fe39d1786". Create buffer "output" of decimal value "200" bytes. Note: Public key encryption. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEP_RSAPublic" initialized from "sha1", "mgf1", "sha1", "specifiedParameters",. Call B_SetAlgorithmInfo passing "encryptObj" and "AI_PKCS_OAEP_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "encryptedResult" with contents of buffer "output". Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEP_RSAPublic". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptObj" and "AI_PKCS_OAEP_RSAPublic". Baldwin Informational, Expires 12/25/1999 182 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display info structure for "AI_PKCS_OAEP_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "output" of decimal value "200" bytes. Note: Private key decryption. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEP_RSAPrivate" initialized from "sha1", "mgf1", "sha1", "specifiedParameters",. Call B_SetAlgorithmInfo passing "decryptObj" and "AI_PKCS_OAEP_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "encryptedResult" and length of initialized bytes in buffer "encryptedResult" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "input" with contents of buffer "output". Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEP_RSAPrivate". Baldwin Informational, Expires 12/25/1999 183 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptObj" and "AI_PKCS_OAEP_RSAPrivate". Display info structure for "AI_PKCS_OAEP_RSAPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVRSAPK1". This is the start of test case "TVRSAPK2". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, PKCS 1 V2 OAEP RSA encryption and Note: decryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_ENCRYPT", "AM_MD2_RANDOM", "NULL_PTR". Note: Use the following random algorithm object througout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "2" bytes. Set buffer "seed" to hex value "0000". Baldwin Informational, Expires 12/25/1999 184 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Input the value given and check the result. Note: Use the following 777-bit keypair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "01aff1bfa898e4656dc06f97f5cda85 345e4813a92e57c39a72f277a4dfeaad685507241f61b0c5e744a2bf12ee2b16 2d7674c8de231bedbf3af349bf92199d2e97c735033c39e109fac775d12ebdae d0132ee1e9125816f8099c84b93f946379cb7", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "01aff1bfa898e4656dc06f97f 5cda85345e4813a92e57c39a72f277a4dfeaad685507241f61b0c5e744a2bf12 ee2b162d7674c8de231bedbf3af349bf92199d2e97c735033c39e109fac775d1 2ebdaed0132ee1e9125816f8099c84b93f946379cb7", "010001", "cb58ef16ab2bd3085130f80433168c657a06d0917951fb3e56b7aa1f6fc5f38 9fd6e5cd944b09503002c21b625e8c69476687355240df3c2177d7564c2780bb baa855b70103cf7a540c5d7e7136cbcb6aa8d5518b3ae9032f7468b7d81ee616 d89", "1fb6d010eab6f59a4421a6778f911a33148eb2a70513d9b5648a30d8b 27874bfea18ee6a869ad6d5236b538a62a46f1325", "0d9eb46fbf1a16db07b 10030fed4d1ce687b613520575a33c48502801c4ba475d46dac29e667d89af03 2b64e103d5f97ab", "1145d240c4756d82ddc4ae13c43fb55348c907886bfd8 9bf7fc8bc1de9e62d403151eed85a038f2a7aa603d40531a5c579", "0d0596d85c6b123d19ee7613622191f2f9dc34c579856afda1bfd5f32c9a79c 41a753d2cd658a53505c046a2fe4ddf8e7f", "0382dd6cc2d80db494cc60908 1b56d37e4dcbc592ffedaa02a225ee8a09204a4b094ab514f69d668b8423499d Baldwin Informational, Expires 12/25/1999 185 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 ae135ffac". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt and decrypt the following data. Create buffer "input" of decimal value "32" bytes. Set buffer "input" with string value "RSA Data Security Bsafe Toolkit". Create buffer "encryptedResult" of decimal value "400" bytes. Set buffer "encryptedResult" to hex value "0118f15daa7e60ec2a8b7 6c3e3c94c6e1c684b98461d6986f442f695e5568472b30f8bb304d039a1ef705 c29c59f50e6c9b5066aa3d5af6e29f2a2608c9f4016eb7195d230274334631e5 8925129b36b3be655adbdbbeac5f7319ce1104fe39d1786". Create buffer "output" of decimal value "200" bytes. Note: Public key encryption. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEP_RSAPublicBER" initialized from "304506092a864886f70d0101073038a00b300906052b0e03021a0500a118301 606092a864886f70d010108300906052b0e03021a0500a20f300d06092a86488 6f70d0101090400". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_PKCS_OAEP_RSAPublicBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next Baldwin Informational, Expires 12/25/1999 186 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "encryptedResult" with contents of buffer "output". Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEP_RSAPublic". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptObj" and "AI_PKCS_OAEP_RSAPublic". Display info structure for "AI_PKCS_OAEP_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "output" of decimal value "200" bytes. Note: Private key decryption. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEP_RSAPrivateBER" initialized from "304506092a864886f70d0101073038a00b300906052b0e03021a0500a118301 606092a864886f70d010108300906052b0e03021a0500a20f300d06092a86488 6f70d0101090400". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_PKCS_OAEP_RSAPrivateBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "encryptedResult" and length of initialized bytes in buffer "encryptedResult" and "random" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 187 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "input" with contents of buffer "output". Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEP_RSAPrivate". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptObj" and "AI_PKCS_OAEP_RSAPrivate". Display info structure for "AI_PKCS_OAEP_RSAPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVRSAPK2". This is the start of test case "TVRSAS01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, RSA Sign and Verify Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_DECRYPT", "AM_RSA_CRT_ENCRYPT", "NULL_PTR". Set "_Chooser" to "AM_MD2", "AM_MD5", "AM_SHA", "NULL_PTR". Note: Test 01-1 Note: Create a signature, compare it to the result from 2.1.2. Baldwin Informational, Expires 12/25/1999 188 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Use an arbitrary public/private keypair, this one Note: contains a Note: 768-bit modulus. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "cc76652b4b5d972b25c464d23b965fa a52ca08b1012239f4aa3f8d518bf550c56dc4c684c78fe4ed492728005a7c101 2a072ecd28592a6b0f520445e41eb4884a2b801d8b579e6920fa7d25c0b02359 263af4dd4beececaa9dd59671351bb59f", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "cc76652b4b5d972b25c464d23 b965faa52ca08b1012239f4aa3f8d518bf550c56dc4c684c78fe4ed492728005 a7c1012a072ecd28592a6b0f520445e41eb4884a2b801d8b579e6920fa7d25c0 b02359263af4dd4beececaa9dd59671351bb59f", "010001", "8ce64e23bec51946bfb90ead9e28ab7669a516c63bfcc529a9253092f0bb365 547a6e213609ef5e8db8fa34e530cc9d980ea4253c6624734e57fbc5d5df7775 536ecdd195e9e7e640f4301d3d12f391d012a1e552208c1c396a49d2d561390a 9", "e5db12250f865ace6d9613df55b2bddbbf3887e061f55c9228906873216 ff0c03a146bfd3d279ef57221fed054b502fb", "e3b7eca5658d8530e3f6e5e 0806a533b0d2bd86a348339548140ddab84b27247a6235b3d563d053802d652c 671eb76ad", "b9aa07f109a643e92459aa79a6d677476e2132980b684ebafca b10c39689be14f79511597fb16653ea3a0d82a839824b", "104bcf419edcdbd53ddb2364478c545c7b7ad1c7f7ee14223a05bc5753edb94 3eb5dc85fc1562893739086e7f0ab1b19", "875198f828082848eac2487c92d 6093d576382ab367eadcf059cd6a5a9062c9d6157a45631648cbffab6273361c 6ccb7". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the data to sign Create buffer "input" of decimal value "1" bytes. Set buffer "input" to hex value "00". Baldwin Informational, Expires 12/25/1999 189 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: The signature will be the same size as the modulus. Create buffer "output" of decimal value "96" bytes. Note: Use AI_MD2WithRSAEncryption Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_MD2WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD2WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101020500". Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_MD2WithRSAEncryptionBER". Check equality of info structure for "AI_MD2WithRSAEncryptionBER " with expected info structure for "AI_MD2WithRSAEncryptionBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "454aba121005f84e408d3d5d9c8402028f42e8d44b112fd20ae916036edaf28 Baldwin Informational, Expires 12/25/1999 190 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 cde5f1ca09d9447e874695ef335dcb7eef68a42bf4d936d95884764a8dd2844c a90af3123a92798c11a778f1e1144b12ee2a7b9047ae8dc57e4218545a9e9bb9 6". Note: Might as well verify it. Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101020500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_MD2WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD2WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_MD2WithRSAEncryption". Check equality of info structure for "AI_MD2WithRSAEncryption" with expected info structure for "AI_MD2WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-2 Baldwin Informational, Expires 12/25/1999 191 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Perform the same test as 01-1 except use Note: AI_MD5WithRSAEncryption. Call Call B_DestroyAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_MD5WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD5WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101040500". Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_MD5WithRSAEncryptionBER". Check equality of info structure for "AI_MD5WithRSAEncryptionBER " with expected info structure for "AI_MD5WithRSAEncryptionBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 192 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "372e8ebcf4bd1b57b948ecaedc3decd9daca72a314b915f45db655978fea1ee e90fc822cb145621cc3b5de6a431f83edb169c9a8e4affcb2db45ef097ff89cd 6f1c7595f5e39d3a781019300b11c66271931c8391664ec4e40fcdb28fe26d6f 0". Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101040500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_MD5WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD5WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_MD5WithRSAEncryption". Check equality of info structure for "AI_MD5WithRSAEncryption" with expected info structure for "AI_MD5WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 193 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-3 Note: Perform the same test as 01-1 except use Note: AI_SHA1WithRSAEncryption. Call Call B_DestroyAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_SHA1WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_SHA1WithRSAEncryptionBER". Check equality of info structure for "AI_SHA1WithRSAEncryptionBE R" with expected info structure for "AI_SHA1WithRSAEncryptionBER ". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 194 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "7d58a091070949865161c648af0056914db6814f8795e2bbd9ae1b98040c635 15238d60abf891f60cb7794b0e641a3da81226b57caaa2634a0bafc502f7e1cb 3179884845f3087e054a69f00a4f2e7e0faecfe00592f109f342589fbc67ed14 7". Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_SHA1WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_SHA1WithRSAEncryption". Check equality of info structure for "AI_SHA1WithRSAEncryption" with expected info structure for "AI_SHA1WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized Baldwin Informational, Expires 12/25/1999 195 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVRSAS01". This is the start of test case "TVRSAS02". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, RSA Sign and Verify Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_DECRYPT", "AM_RSA_CRT_ENCRYPT", "NULL_PTR". Set "_Chooser" to "AM_MD2", "AM_MD5", "AM_SHA", "NULL_PTR". Note: Test 02-1 Note: Create a signature, compare it to the result from 2.1.2. Note: Use an arbitrary public/private keypair, this one Note: contains a Note: 1024-bit modulus. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "d1bb134b2583eb6008cfcb10943f4b5 40872876a2e3f31ffd704b99f62d005cb4eac429d625b0bd4de002d63f74e5e8 a09c3be7a269dc941739e6d8532ba5b32695350bf9659f5ea71ee8bf4102ce71 2272e12a849e4e62342c2ce6c5143327eb3007e5bf4d709e89e0181d6d603514 7a93d79ddc4175cccf2ceecf4c298fc17", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 196 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "d1bb134b2583eb6008cfcb109 43f4b540872876a2e3f31ffd704b99f62d005cb4eac429d625b0bd4de002d63f 74e5e8a09c3be7a269dc941739e6d8532ba5b32695350bf9659f5ea71ee8bf41 02ce712272e12a849e4e62342c2ce6c5143327eb3007e5bf4d709e89e0181d6d 6035147a93d79ddc4175cccf2ceecf4c298fc17", "010001", "309d3368acc67a4da55d3d0d97bf601f9761acbfd0fe77017d7eabe4250c60f b723dfda6eb807d2a9756e52e91c989a2678706e4db84a17cd966f4adf6473a1 1f6e9f1d208cb569c8d3bc1a01625364d6db2aab90bfa0b5e3925e5c9c1a8dc8 4fdb6546b8217a657741aa7b21a7fafff9ed0d758deeb4fc3af0d416be8398f7 1", "e8fefba76de45cfaf347ce2ed30e935ff19db5e0c99f685c0ca2e42f567 a5fcbdefbba4242519491bd9f9676addac54d51ad11d78572687b9a626f999a0 579b9", "e6700efd7438554f5a1c5f07dbe07d357858dc85de049f30fbb69b7 e86d4eb793da00e44e5bfbe0dea93806b64d8a486b4c8336ac34d0688f18af79 4ddb1cc4f", "d5ea550e315cbae9443726dbe2b6bd2417671eb75525dfe0b35 152830bb8aaff38a89127884ff241a48142d98f610e48a0b66f6d1a7e21e369a 8faa161c1a931", "85ab7b068ae42298652d0ff2ff18b988cac6c124e624c83 321d04b6299d3e8c3eb7b6ccb8a7a2f44e34dacb09f4f0c2117bd0a166433ca1 6a606769764023f01", "ac6b6150f924e3d0968b3bc9031bf96ffaa3cf146ef 043545187714f3b099b1165bbd88e84f237a171ac0685b7c5b7c840d393c0fa2 d2bf4d0aa77b9791ab9c3". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the data to sign Create buffer "input" of decimal value "1" bytes. Set buffer "input" to hex value "00". Note: The signature will be the same size as the modulus. Create buffer "output" of decimal value "128" bytes. Note: Use AI_MD2WithRSAEncryption Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryption" initialized from "NULL_PTR". Baldwin Informational, Expires 12/25/1999 197 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "signObj" and "AI_MD2WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD2WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101020500". Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_MD2WithRSAEncryptionBER". Check equality of info structure for "AI_MD2WithRSAEncryptionBER " with expected info structure for "AI_MD2WithRSAEncryptionBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "59d9fe3d1e3e73e14263da270690ed4e93ecaa4479b512962cb06f0673e1e6c f4695651274eae7779736a344fc1159392c1b35afeff4ce168a9e85e79ba1d65 180c712aaf11532b65b088113de260414adbd1b878952adc27b01367c8427dad 9749c0f5aa42af0254c6c16388af2e27e3e3c392b22bdf82d77486d6ad60349b 8". Note: Might as well verify it. Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryptionBER" initialized from Baldwin Informational, Expires 12/25/1999 198 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "300d06092a864886f70d0101020500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_MD2WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD2WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_MD2WithRSAEncryption". Check equality of info structure for "AI_MD2WithRSAEncryption" with expected info structure for "AI_MD2WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-2 Note: Perform the same test as 02-1 except use Note: AI_MD5WithRSAEncryption. Call Call B_DestroyAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 199 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_MD5WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD5WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101040500". Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_MD5WithRSAEncryptionBER". Check equality of info structure for "AI_MD5WithRSAEncryptionBER " with expected info structure for "AI_MD5WithRSAEncryptionBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "aaea3e551cf5bd00d861912a93acbce0e36b1ca16871eab85430ced31071f6b 23ad99ac9387afd99203466ba53132e3e3c3f9e46d4f64bc0f5bf3f55d47b967 113ae888b6f7e084d4db8ebf7d896c3734b0d59126010621d3f1cc0ef2217f89 34c980753be98112904d3d7dfaf7ee659d553f48ebd6f115950a179436519c3c 8". Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Baldwin Informational, Expires 12/25/1999 200 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101040500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_MD5WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD5WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_MD5WithRSAEncryption". Check equality of info structure for "AI_MD5WithRSAEncryption" with expected info structure for "AI_MD5WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-3 Note: Perform the same test as 02-1 except use Note: AI_SHA1WithRSAEncryption. Call Call B_DestroyAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 201 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_SHA1WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_SHA1WithRSAEncryptionBER". Check equality of info structure for "AI_SHA1WithRSAEncryptionBE R" with expected info structure for "AI_SHA1WithRSAEncryptionBER ". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "3b796db5eda47a67b86933d2fadddf87b88192e8ea690a010b0006e87e9de95 d4e0a1e8c78253001c5d1fe49078850da12feeba244b156d8085279af8fcb5f6 Baldwin Informational, Expires 12/25/1999 202 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 746ecaf02711e361093af3bb812effab9606b64d22b63acb4fb1e68f43b0ceed 65d05506d045e1371d9c37fca2f0a764077cfd6193df02c4a9891d9f4de322cd f". Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_SHA1WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_SHA1WithRSAEncryption". Check equality of info structure for "AI_SHA1WithRSAEncryption" with expected info structure for "AI_SHA1WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 203 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 This is the end of test case "TVRSAS02". This is the start of test case "TVRSAS03". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, RSA Sign and Verify Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_DECRYPT", "AM_RSA_CRT_ENCRYPT", "NULL_PTR". Set "_Chooser" to "AM_MD2", "AM_MD5", "AM_SHA", "NULL_PTR". Note: Test 03-1 Note: Create a signature, compare it to the result from 2.1.2. Note: Use an arbitrary public/private keypair, this one Note: contains a Note: 2048-bit modulus. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "a40d55504a4a99261ac819e53536b50 a922b6f9e130899606cb3c5bc16ff61376d2538f10e13560b6c49006049b9a1e af070feeac92313074e4a65471d510609ddbe97de1da3817a47f6d3632b9275c ed442a308869a17a29582cc693ac2616bc90bb8c06f9ab88a0c61a08fd2e8eb7 f1b6e04910de8d5d0bd30fdc4b836e70ad992400a96d2845b2bb023a9ce81296 827732e3d68ccae2fd66849179572c7e0e4b5fbb7a92b2f222e020b413ac198b 24f3d297819e0e98f9d8e5291a4918bf4af71476c7b3cd0f7c888151bf5ca9d5 4b98297731ded8ec120920a62b9bc5bbbf9955536abe41ae6731c8ad2f43bfbb b5648961f12d4c26408baec8e609b53bf", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 204 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "a40d55504a4a99261ac819e53 536b50a922b6f9e130899606cb3c5bc16ff61376d2538f10e13560b6c4900604 9b9a1eaf070feeac92313074e4a65471d510609ddbe97de1da3817a47f6d3632 b9275ced442a308869a17a29582cc693ac2616bc90bb8c06f9ab88a0c61a08fd 2e8eb7f1b6e04910de8d5d0bd30fdc4b836e70ad992400a96d2845b2bb023a9c e81296827732e3d68ccae2fd66849179572c7e0e4b5fbb7a92b2f222e020b413 ac198b24f3d297819e0e98f9d8e5291a4918bf4af71476c7b3cd0f7c888151bf 5ca9d54b98297731ded8ec120920a62b9bc5bbbf9955536abe41ae6731c8ad2f 43bfbbb5648961f12d4c26408baec8e609b53bf", "010001", "75bed422e28f9448532497e1794620becb96bd70197d2c8896bc99099d00030 8c31fda34b9c38b187bca11a90a816003be3b7bdb8c2dce7489eebfae410e6c6 51c70b593c876187269c0708c5733b1b697869479841289303a5b3cd7b242dda 57d111ab393e6dad8ca762fc5cabd3e7966789a727a27497f9eaad1192696d15 043feec9ce697b51a5b9e8ef89aecee3a2285088c9213f7f00b26b9130329c0f 29cf26bfa4e8be0c8d7dffaf5b2fdb5dee6ead68af8afeeb0fdbd7f13e464832 612f2171576231d695c0406da99a411bed8f9cad077375a74854ae0dd86cb617 cc639843561e86c5ffaf9fe010736c30c237b9be05d76a9a7bdf9ff332fbc208 1", "d2359d139c5e94e1d7ced3f4dfd3a37a5d68b89196a21dd0619ec71c3dd 221ca9e571382c307aa768029d999ee1f8e24f7cf73c34c1c071495b4f7a28a3 f7aebd09f17cf3f80565f3981bfde9ff55349cbdfd42dfaeaa863a4005ca25fb 7c014a9e16fe38ec741ab07a5cf9df32854344fcf47a00124b81cfcf2ed72c6e 1c221", "c7c9be1f927787728816f008a5e4c1e06b29959c007d365830aa70f 59acdf09d04c326b40aaacc63022a29b860bd8da809a5a6594ca06f506f9f4a8 8adf88d63f704602f477789737cf593959bc3b3e47d74116bf0e3426dfd463ef f0472909d922cb9cd61d9f2edd0878b00e720e659861c4f6bf57d8a15b7d132d bd23e19df", "2cabb6089fd73d9e4cc52827c694ec0da9e2022ef62ad7591c1 5a8cc689aca118bda874be7742e96661ffe9d068c70218d03e9dedbc2ad0283d 9e432075cfc1b36c7484103869b543b1d468fe1c03985da2c63a3adc9c624fe8 a1125745fd112d313143af0718993f5d917a8c22e94ce5513806e1130236c0d9 8f63ac8e6dae1", "374e33a14dcc64e461a3e7e29cf9cc69b1809b77c9f2df7 e5e4a7066ace9e177b5ffc7d1033af0c55fae084a900d290fa14c07d6a48dad0 2d943814080d8535b9edfc9388d521becaa64d8ec0b688b7deef498760703023 aac682bbc30a0fe4380597d3dcb9ea7cf0970dc1beddf7fa4bca94d9b17241f7 b8f9d0bb52a682285", "acc125113028f8150feb24d14672db7f59118d349ff 7a2b0584c841e1e6bfc6033729edd2c7a44cfbe54869f0dbfe21f39f6c7f0419 172c832b83d167e0d2d474c39d1457d47ed986659d216c06edd0b16ece129801 56f5215634ae61995818057fc8bde64994d60743f89d0dbf8f6762efda3fa04c 8acdc983c60a0ad41cc0e". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the data to sign Create buffer "input" of decimal value "1" bytes. Set buffer "input" to hex value "00". Note: The signature will be the same size as the modulus. Create buffer "output" of decimal value "256" bytes. Baldwin Informational, Expires 12/25/1999 205 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Use AI_MD2WithRSAEncryption Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_MD2WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD2WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101020500". Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_MD2WithRSAEncryptionBER". Check equality of info structure for "AI_MD2WithRSAEncryptionBER " with expected info structure for "AI_MD2WithRSAEncryptionBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "1b984d77e81d87fea72af09e0d8faf5e51d068cb7706f371c81a5bfb509f75a 374a7bfa5991447e734fa4d2319dac524e782d865b305db3d8523cd7f00773e4 252d6d805ceda06b6db10be44c8b5c86241efe2b9117ac5730a1ee261ee323da 998a1562ef61efb81e85e503703d1cf0e1778caccd185d49b4d608e59bcf5609 d81b2c5ad345a87004d238c5069e8c653489862311acd8dc7b66d0979c98006f Baldwin Informational, Expires 12/25/1999 206 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 5d7103cd9758df55d2a27ffca34ef051c12c4c68270881586155c4d4165cedb7 0b6a3286e859c59d277f2548e89410179866d932399df1373900641259eb0ebe 938d16a10507fdc2893a3692b9ed9f55e4d723884403123d5765d0c621ed1bbe d". Note: Might as well verify it. Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101020500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_MD2WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD2WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_MD2WithRSAEncryption". Check equality of info structure for "AI_MD2WithRSAEncryption" with expected info structure for "AI_MD2WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 207 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test 03-2 Note: Perform the same test as 03-1 except use Note: AI_MD5WithRSAEncryption. Call Call B_DestroyAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_MD5WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD5WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101040500". Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_MD5WithRSAEncryptionBER". Check equality of info structure for "AI_MD5WithRSAEncryptionBER " with expected info structure for "AI_MD5WithRSAEncryptionBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 208 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "07580efc0144ea7f63dfcbf39324c143ecd679f0ffa66d035ae297d5d57fa2e 6892ccb10946bfdde89ed5eefb787c4f3c72b3a3ff5b5a21ae5b1cfe714fd112 c4ff37af4bcc6ea0de5665769ec36438d9f5882da869c380d5e23ee219aedbca 97ed8915798b38d2642fcaa7c636e4e3eb5906ada68a0094ab7ac4571f423e16 f5b2dabf03b7ef801d70e6a5b972c0d0ec39d096619b4873a0caccf17d8856f2 50318d5c583021ee3ecfc6f50f692570fd7dd01cc418a5a5c0bf96860613d166 ca7de3a62fa4f689771ca1e330b52d576bfc14faa106084f5a376b8bba005b98 661c6ef46612a74fb9de62c542baa582921b9ae4f5eec1baadfec04f4fff98c5 b". Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101040500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_MD5WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_MD5WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_MD5WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_MD5WithRSAEncryption". Check equality of info structure for "AI_MD5WithRSAEncryption" with expected info structure for "AI_MD5WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first Baldwin Informational, Expires 12/25/1999 209 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 03-3 Note: Perform the same test as 03-1 except use Note: AI_SHA1WithRSAEncryption. Call Call B_DestroyAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_SHA1WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_SHA1WithRSAEncryptionBER". Check equality of info structure for "AI_SHA1WithRSAEncryptionBE R" with expected info structure for "AI_SHA1WithRSAEncryptionBER ". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 210 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "622bbc3656cce331718ac86441bd27d90db8f78399ee10789b2212e8bba8a1f 5eb35cb1c5905ab505aa50b26850234aa8badec44c4b79eeabc57a4209d5e3b1 52d05f259fcb4f9cfbcc82db130f27ba4d6079f159d25d7086d4f432ac60de8e 6cc7a9dc1d1e3f4700f153343edc68712a61f587f96bc6b67662705f531896d7 8a892f8e9e00e29e37c581edf68bc3e1f54922c604806204ffa169b2d56d6401 b7323e7de5b0ea2df961c61c8896149cb8935a564f2c0fdfe88da64bd8d020c6 a6289ecd97408b233d5110de00314ace4cefe2667cc8b6431e5dd06c89969a63 61395f1deeecaea7ec09a7aebe7e1031bc8cdb0e28c24b21de47453aa67dfe37 2". Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_SHA1WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_SHA1WithRSAEncryption". Check equality of info structure for "AI_SHA1WithRSAEncryption" with expected info structure for "AI_SHA1WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 211 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVRSAS03". This is the start of test case "TVSHADES". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: vectors test for AI_SHA1WithDES_CBCPad, Note: AI_SHA1WithDES_CBCPadBER Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_SHA", "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Note: Create global data objects Create buffer "inputData" of decimal value "32" bytes. Create buffer "cypherText" of decimal value "32" bytes. Create buffer "plainText" of decimal value "32" bytes. Create buffer "expectedCypherText" of decimal value "32" bytes. Create buffer "expectedPlainText" of decimal value "32" bytes. Create buffer "salt" of decimal value "8" bytes. Create buffer "password" of decimal value "8" bytes. Note: Initialize global data object Set buffer "salt" to hex value "0011223344556677". Set buffer "password" to hex value "70617373776F7264". Baldwin Informational, Expires 12/25/1999 212 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "inputData" to hex value "000102030405060708090A0B0C0 D0E0F101112131415161718191A". Note: Case 1: Note: Set up pbe encryption/decryption algorithm with Note: pbe salt = 0011223344556677 and iteration = 1 Note: Encrypt/Decrypt the inputData with the password Create algorithm object "encryptionAlg". Call B_CreateAlgorithmObject passing "encryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionAlg". Call B_CreateAlgorithmObject passing "decryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithDES_CBCPad" initialized from contents of buffer "salt", "1". Call B_SetAlgorithmInfo passing "encryptionAlg" and "AI_SHA1WithDES_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check its BER encoding Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithDES_CBCPadBER" initialized from "301a06092a864886f70d01050a300d04080011223344556677020101". Set "_InfoPointer" to address of info structure for "AI_SHA1WithDES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionAlg" and "AI_SHA1WithDES_CBCPadBER". Check equality of info structure for "AI_SHA1WithDES_CBCPadBER" with expected info structure for "AI_SHA1WithDES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the decryption algorithm with the AI_SHA1WithDES_CBCPa Note: dBER Note: 30 1a Note: 06 09 2a 86 48 86 f7 0d 01 05 0a Note: 30 0d Note: 04 08 00 11 22 33 44 55 66 77 Note: 02 01 01 Set "_InfoPointer" to address of info structure for "AI_SHA1WithDES_CBCPadBER" initialized from "301a06092a864886f70 d01050a300d04080011223344556677020101". Call B_SetAlgorithmInfo passing "decryptionAlg" and Baldwin Informational, Expires 12/25/1999 213 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_SHA1WithDES_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set up keyobject with 'password' key Create key object "pbekey". Call B_CreateKeyObject passing "pbekey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "password". Call B_SetKeyInfo passing "pbekey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionAlg" and "pbekey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "1854453d8ce8083ea6be20495854aeefeca33fec2be6e92a29ba6c8983b4403 3". Note: Password base unprotect the protected data Call Call B_DecryptInit passing "decryptionAlg" and "pbekey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 214 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Verify the pbe encryption by digest password || salt -> Note: Use the output of the digest as the input to des Note: algorithm and key Create buffer "digest" of decimal value "20" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "password" and length of initialized bytes in buffer "password" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 215 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "salt" and length of initialized bytes in buffer "salt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "52ede8a078f04af8f1d92c170d4492c1fada7ea8". Note: Set up symetric key encryption Create key object "symetricKey". Call B_CreateKeyObject passing "symetricKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "52ede8a078f04af8". Call B_SetKeyInfo passing "symetricKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "symetricEncryptionAlg". Call B_CreateAlgorithmObject passing "symetricEncryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from "f1d92c170d4492c1". Call B_SetAlgorithmInfo passing "symetricEncryptionAlg" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "symetricDecryptionAlg". Call B_CreateAlgorithmObject passing "symetricDecryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from "f1d92c170d4492c1". Call B_SetAlgorithmInfo passing "symetricDecryptionAlg" and "AI_DES_CBCPadIV8" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 216 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "symetricEncryptionAlg" and "symetricKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "symetricEncryptionAlg" and address of next free byte in buffer "expectedCypherText" and address of "_OutputLen" and length of free bytes in buffer "expectedCypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectedCypherText" by "_OutputLen". Call B_EncryptFinal passing "symetricEncryptionAlg" and address of next free byte in buffer "expectedCypherText" and address of "_OutputLen" and length of free bytes in buffer "expectedCypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectedCypherText" by "_OutputLen". Finalize buffer "expectedCypherText". Check equality of buffer "expectedCypherText" with contents of buffer "cypherText". Call Call B_DecryptInit passing "symetricDecryptionAlg" and "symetricKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "symetricDecryptionAlg" and address of next free byte in buffer "expectedPlainText" and address of "_OutputLen" and length of free bytes in buffer "expectedPlainText" and address of first initialized byte in buffer "expectedCypherText" and length of initialized bytes in buffer "expectedCypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectedPlainText" by "_OutputLen". Call B_DecryptFinal passing "symetricDecryptionAlg" and address of next free byte in buffer "expectedPlainText" and address of "_OutputLen" and length of free bytes in buffer "expectedPlainText" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 217 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectedPlainText" by "_OutputLen". Finalize buffer "expectedPlainText". Check equality of buffer "expectedPlainText" with contents of buffer "inputData". Note: Destroy algorithm objects, and symetric algorithm & key Note: objects Call Call B_DestroyAlgorithmObject passing "encryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "symetricEncryptionAl g". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "symetricDecryptionAl g". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "symetricKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2: Note: Set up pbe encryption/decryption algorithm with Note: pbe salt = 0011223344556677 and iteration = 4 Note: Encrypt/Decrypt the inputData with the password Create algorithm object "encryptionAlg". Call B_CreateAlgorithmObject passing "encryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionAlg". Call B_CreateAlgorithmObject passing "decryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithDES_CBCPad" initialized from contents of buffer "salt", "4". Call B_SetAlgorithmInfo passing "encryptionAlg" and Baldwin Informational, Expires 12/25/1999 218 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_SHA1WithDES_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check its BER encoding Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithDES_CBCPadBER" initialized from "301a06092a864886f70d01050a300d04080011223344556677020104". Set "_InfoPointer" to address of info structure for "AI_SHA1WithDES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionAlg" and "AI_SHA1WithDES_CBCPadBER". Check equality of info structure for "AI_SHA1WithDES_CBCPadBER" with expected info structure for "AI_SHA1WithDES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the decryption algorithm with the AI_SHA1WithDES_CBCPa Note: dBER Note: 30 1a Note: 06 09 2a 86 48 86 f7 0d 01 05 0a Note: 30 0d Note: 04 08 00 11 22 33 44 55 66 77 Note: 02 01 04 Set "_InfoPointer" to address of info structure for "AI_SHA1WithDES_CBCPadBER" initialized from "301a06092a864886f70 d01050a300d04080011223344556677020104". Call B_SetAlgorithmInfo passing "decryptionAlg" and "AI_SHA1WithDES_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionAlg" and "pbekey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 219 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "be020792451b2907d01ea8c1c5826be2b1b10c31470c779726ffeef0bad8b7f 9". Note: Password base unprotect the protected data Call Call B_DecryptInit passing "decryptionAlg" and "pbekey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Verify the pbe encryption by digest password || salt -> Note: des key Note: Take the digest output and digest 3 more time. Note: Use the output of the last digest as the input to des Note: algorithm and key Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "password" and length of initialized bytes in buffer "password" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 220 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "salt" and length of initialized bytes in buffer "salt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Note: now digest the digest output 3 more time Begin a loop of decimal value "3" iterations. Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". End the loop and display execution times. Check equality of buffer "digest" with hex value "147f42ef55c239e38a18f6121a4627693b328299". Note: Set up symetric key encryption Create key object "symetricKey". Call B_CreateKeyObject passing "symetricKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "147f42ef55c239e3". Call B_SetKeyInfo passing "symetricKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "symetricEncryptionAlg". Call B_CreateAlgorithmObject passing "symetricEncryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 221 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from "8a18f6121a462769". Call B_SetAlgorithmInfo passing "symetricEncryptionAlg" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "symetricDecryptionAlg". Call B_CreateAlgorithmObject passing "symetricDecryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from "8a18f6121a462769". Call B_SetAlgorithmInfo passing "symetricDecryptionAlg" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "symetricEncryptionAlg" and "symetricKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "symetricEncryptionAlg" and address of next free byte in buffer "expectedCypherText" and address of "_OutputLen" and length of free bytes in buffer "expectedCypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectedCypherText" by "_OutputLen". Call B_EncryptFinal passing "symetricEncryptionAlg" and address of next free byte in buffer "expectedCypherText" and address of "_OutputLen" and length of free bytes in buffer "expectedCypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectedCypherText" by "_OutputLen". Finalize buffer "expectedCypherText". Check equality of buffer "expectedCypherText" with contents of buffer "cypherText". Call Call B_DecryptInit passing "symetricDecryptionAlg" and "symetricKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 222 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "symetricDecryptionAlg" and address of next free byte in buffer "expectedPlainText" and address of "_OutputLen" and length of free bytes in buffer "expectedPlainText" and address of first initialized byte in buffer "expectedCypherText" and length of initialized bytes in buffer "expectedCypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectedPlainText" by "_OutputLen". Call B_DecryptFinal passing "symetricDecryptionAlg" and address of next free byte in buffer "expectedPlainText" and address of "_OutputLen" and length of free bytes in buffer "expectedPlainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectedPlainText" by "_OutputLen". Finalize buffer "expectedPlainText". Check equality of buffer "expectedPlainText" with contents of buffer "inputData". This is the end of test case "TVSHADES". This is the start of test case "TVSHARSA". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, RSA Sign and Verify for AI_SHA1WithRSAEncryp Note: tion Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_DECRYPT", "AM_RSA_CRT_ENCRYPT", "NULL_PTR". Set "_Chooser" to "AM_SHA", "NULL_PTR". Note: Case 1: Note: Use an arbitrary public/private keypair, this one Note: contains a Note: 768-bit modulus. Create key object "publicKey". Baldwin Informational, Expires 12/25/1999 223 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "cc76652b4b5d972b25c464d23b965fa a52ca08b1012239f4aa3f8d518bf550c56dc4c684c78fe4ed492728005a7c101 2a072ecd28592a6b0f520445e41eb4884a2b801d8b579e6920fa7d25c0b02359 263af4dd4beececaa9dd59671351bb59f", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "cc76652b4b5d972b25c464d23 b965faa52ca08b1012239f4aa3f8d518bf550c56dc4c684c78fe4ed492728005 a7c1012a072ecd28592a6b0f520445e41eb4884a2b801d8b579e6920fa7d25c0 b02359263af4dd4beececaa9dd59671351bb59f", "010001", "8ce64e23bec51946bfb90ead9e28ab7669a516c63bfcc529a9253092f0bb365 547a6e213609ef5e8db8fa34e530cc9d980ea4253c6624734e57fbc5d5df7775 536ecdd195e9e7e640f4301d3d12f391d012a1e552208c1c396a49d2d561390a 9", "e5db12250f865ace6d9613df55b2bddbbf3887e061f55c9228906873216 ff0c03a146bfd3d279ef57221fed054b502fb", "e3b7eca5658d8530e3f6e5e 0806a533b0d2bd86a348339548140ddab84b27247a6235b3d563d053802d652c 671eb76ad", "b9aa07f109a643e92459aa79a6d677476e2132980b684ebafca b10c39689be14f79511597fb16653ea3a0d82a839824b", "104bcf419edcdbd53ddb2364478c545c7b7ad1c7f7ee14223a05bc5753edb94 3eb5dc85fc1562893739086e7f0ab1b19", "875198f828082848eac2487c92d 6093d576382ab367eadcf059cd6a5a9062c9d6157a45631648cbffab6273361c 6ccb7". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the data to sign Create buffer "input" of decimal value "1024" bytes. Set buffer "input" to hex value "616263". Note: The signature will be the same size as the modulus. Create buffer "output" of decimal value "96" bytes. Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 224 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test 1-1: input is "abc" Note: SHA1 ("abc") = a9993e364706816aba3e25717850c26c9cd0d89d Note: Perform the test use AI_SHA1WithRSAEncryption. Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_SHA1WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_SHA1WithRSAEncryptionBER". Check equality of info structure for "AI_SHA1WithRSAEncryptionBE R" with expected info structure for "AI_SHA1WithRSAEncryptionBER ". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "583b2209827d3fd9a111ac19cfdccfb0974ec22633dbdf6a5d8fcaa0e98c89e 3e3f0ab5130674bc7677325b4f4b9f08926fa4a3f14cbeaba03fb74aa31a3ff1 Baldwin Informational, Expires 12/25/1999 225 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 016c42991b5a79c2b24cb041493f50bbbc468888c9bfb6bedcc5f844f3dc18d2 0". Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_SHA1WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_SHA1WithRSAEncryption". Check equality of info structure for "AI_SHA1WithRSAEncryption" with expected info structure for "AI_SHA1WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 1-2: Note: Check the signature result of 1-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Baldwin Informational, Expires 12/25/1999 226 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "expectOutput" of decimal value "96" bytes. Create buffer "digestInfo" of decimal value "36" bytes. Create algorithm object "encrytpionObj". Call B_CreateAlgorithmObject passing "encrytpionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 0414a9993e364706816aba3e25717850c26c9cd0d89d". Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encrytpionObj" and "AI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrytpionObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Note: ---------- Note: Test 2-1:input = "abcdbcdecdefdefgefghfghighijhijkijkljklm Note: klmnlmnomnopnopq" Note: SHA1 ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomno Note: pnopq") = Baldwin Informational, Expires 12/25/1999 227 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: 84983e441c3bd26ebaae4aa1f95129e5e54670f1 Note: Perform the test use AI_SHA1WithRSAEncryption. Set length of buffer "output" to decimal value "0". Set length of buffer "expectOutput" to decimal value "0". Set buffer "input" to hex value "6162636462636465636465666465666 765666768666768696768696a68696a6b696a6b6c6a6b6c6d6b6c6d6e6c6d6e6 f6d6e6f706e6f7071". Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "a751f1593b23dc86d70cec4ed60f77be415c49a2da5e6f84f868c93652930c8 60171e4e084cc8eb6f1f61ee176efdf146cf71aa82f9ed16944139283b3c7642 bf99be4235ffff7d48d03409060328b9f1ff956c6c62750bb552fd718d6084d5 1". Note: Verify the signature Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 2-2: Note: Check the signature result of 2-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Baldwin Informational, Expires 12/25/1999 228 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 041484983e441c3bd26ebaae4aa1f95129e5e54670f1". Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Note: ---------- Note: Test 3-1:input = "abcdbcdecdefdefgefghfghighijhijkijkljklm Note: klmnlmnomnopnopq" Note: SHA1 ("1,000,00 repetition of a" = 34aa973cd4c4daa4f61eeb2 Note: bdbad27316534016f Note: Perform the test use AI_SHA1WithRSAEncryption. Set length of buffer "output" to decimal value "0". Set length of buffer "expectOutput" to decimal value "0". Set buffer "input" to hex value "6161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 Baldwin Informational, Expires 12/25/1999 229 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161". Begin a loop of decimal value "1000" iterations. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "845f7adbacb97303c16449107f27b98ce3df09b9e840be7fcca33c6d1f51018 d59a429f18bccc37e9a4384374b440f23f26159c0297d671290586da92a3befe a60f783bbef5e10b0a1c0f2029bcd2d74807500c5847db820f90d6cbdae36e1e 2". Note: Verify the signature Begin a loop of decimal value "1000" iterations. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 230 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 3-2: Note: Check the signature result of 3-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 041434aa973cd4c4daa4f61eeb2bdbad27316534016f". Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Note: ---------- Note: Case 2: Note: Use an arbitrary public/private keypair, this one Note: contains a Note: 512-bit modulus. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 231 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "ab383940542cac9ac03740d04904ed5 10e95720251c2ad9da7ebba29aed4497953fadf016cbc69464c831bd93b59420 4990f632475a0be6f924d9da240daf849", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "ab383940542cac9ac03740d04 904ed510e95720251c2ad9da7ebba29aed4497953fadf016cbc69464c831bd93 b594204990f632475a0be6f924d9da240daf849", "010001", "4ad2e7321596f0573068f50a10def656d5e8b94a0a30e96e5c53c7a72f9fd5f b589b1e5be86eae02aa152367aa209e82764cade195dee325662fb0ab1ce5a00 1", "d1eb51bd09267ee7128ceb5c3218d1600b49678f783c58c5b00170ee1ac f6ee1", "d0ce21834173f6843206a8a6ad132b65278628ef0e8cca4f20c0199 5fe6c3e69", "1a499cb7ce808a9dc73dec6f643aa565a0a4359acad4cbcd1dc 8606b00e27f21", "a793d77794ef31785501dd16afaec3d4120d6d0ab6ddad7 c25e7a66127e8cd89", "0bdb907f33c51f5b4da486da77d4b31dbcc3ae0bac9 1f3384acf10b15e5ad186". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the data to sign Create buffer "input" of decimal value "1024" bytes. Set buffer "input" to hex value "616263". Note: The signature will be the same size as the modulus. Create buffer "output" of decimal value "64" bytes. Note: ---------------------------------------------------------- Note: ---------- Note: Test 1-1: input is "abc" Note: SHA1 ("abc") = a9993e364706816aba3e25717850c26c9cd0d89d Note: Perform the test use AI_SHA1WithRSAEncryption. Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 232 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_SHA1WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_SHA1WithRSAEncryptionBER". Check equality of info structure for "AI_SHA1WithRSAEncryptionBE R" with expected info structure for "AI_SHA1WithRSAEncryptionBER ". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "4423a0a405c767fb48f0a376acdb10a4388d9702d88ce13ed878e25099c13c4 a72439972cbeb5993a1231a7717c924759969f9f9792abd32a6ca66a1e3f696a 3". Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 233 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_SHA1WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_SHA1WithRSAEncryption". Check equality of info structure for "AI_SHA1WithRSAEncryption" with expected info structure for "AI_SHA1WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 1-2: Note: Check the signature result of 1-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Create buffer "expectOutput" of decimal value "64" bytes. Create buffer "digestInfo" of decimal value "36" bytes. Create algorithm object "encrytpionObj". Call B_CreateAlgorithmObject passing "encrytpionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 234 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 0414a9993e364706816aba3e25717850c26c9cd0d89d". Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encrytpionObj" and "AI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrytpionObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Note: ---------- Note: Test 2-1:input = "abcdbcdecdefdefgefghfghighijhijkijkljklm Note: klmnlmnomnopnopq" Note: SHA1 ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomno Note: pnopq") = Note: 84983e441c3bd26ebaae4aa1f95129e5e54670f1 Note: Perform the test use AI_SHA1WithRSAEncryption. Set length of buffer "output" to decimal value "0". Set length of buffer "expectOutput" to decimal value "0". Set buffer "input" to hex value "6162636462636465636465666465666 765666768666768696768696a68696a6b696a6b6c6a6b6c6d6b6c6d6e6c6d6e6 Baldwin Informational, Expires 12/25/1999 235 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 f6d6e6f706e6f7071". Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "7bcc91d130057590f399ee1a1dfb7c0ecd52768f2e68795f51e474698b22739 4b9c18034e74987a7da4bbff93677b7f198df9572390e660887a9c09848fdd3c 7". Note: Verify the signature Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 2-2: Note: Check the signature result of 2-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 041484983e441c3bd26ebaae4aa1f95129e5e54670f1". Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 236 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Note: ---------- Note: Test 3-1:input = "abcdbcdecdefdefgefghfghighijhijkijkljklm Note: klmnlmnomnopnopq" Note: SHA1 ("1,000,00 repetition of a" = 34aa973cd4c4daa4f61eeb2 Note: bdbad27316534016f Note: Perform the test use AI_SHA1WithRSAEncryption. Set length of buffer "output" to decimal value "0". Set length of buffer "expectOutput" to decimal value "0". Set buffer "input" to hex value "6161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 Baldwin Informational, Expires 12/25/1999 237 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161". Begin a loop of decimal value "1000" iterations. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "01a744bcce93364041faebfb8c1603c612b90922e319e1c38d840d94de8f4c9 2883f3c55c3fdcc7cd7553b596be6218eb687a9d868031bf221b062b735a6b1a d". Note: Verify the signature Begin a loop of decimal value "1000" iterations. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 3-2: Note: Check the signature result of 3-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Baldwin Informational, Expires 12/25/1999 238 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 041434aa973cd4c4daa4f61eeb2bdbad27316534016f". Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Note: ---------- Note: Case 3: Note: Use an arbitrary public/private keypair, this one Note: contains a Note: 1024-bit modulus. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "d1bb134b2583eb6008cfcb10943f4b5 40872876a2e3f31ffd704b99f62d005cb4eac429d625b0bd4de002d63f74e5e8 a09c3be7a269dc941739e6d8532ba5b32695350bf9659f5ea71ee8bf4102ce71 2272e12a849e4e62342c2ce6c5143327eb3007e5bf4d709e89e0181d6d603514 7a93d79ddc4175cccf2ceecf4c298fc17", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 239 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "d1bb134b2583eb6008cfcb109 43f4b540872876a2e3f31ffd704b99f62d005cb4eac429d625b0bd4de002d63f 74e5e8a09c3be7a269dc941739e6d8532ba5b32695350bf9659f5ea71ee8bf41 02ce712272e12a849e4e62342c2ce6c5143327eb3007e5bf4d709e89e0181d6d 6035147a93d79ddc4175cccf2ceecf4c298fc17", "010001", "309d3368acc67a4da55d3d0d97bf601f9761acbfd0fe77017d7eabe4250c60f b723dfda6eb807d2a9756e52e91c989a2678706e4db84a17cd966f4adf6473a1 1f6e9f1d208cb569c8d3bc1a01625364d6db2aab90bfa0b5e3925e5c9c1a8dc8 4fdb6546b8217a657741aa7b21a7fafff9ed0d758deeb4fc3af0d416be8398f7 1", "e8fefba76de45cfaf347ce2ed30e935ff19db5e0c99f685c0ca2e42f567 a5fcbdefbba4242519491bd9f9676addac54d51ad11d78572687b9a626f999a0 579b9", "e6700efd7438554f5a1c5f07dbe07d357858dc85de049f30fbb69b7 e86d4eb793da00e44e5bfbe0dea93806b64d8a486b4c8336ac34d0688f18af79 4ddb1cc4f", "d5ea550e315cbae9443726dbe2b6bd2417671eb75525dfe0b35 152830bb8aaff38a89127884ff241a48142d98f610e48a0b66f6d1a7e21e369a 8faa161c1a931", "85ab7b068ae42298652d0ff2ff18b988cac6c124e624c83 321d04b6299d3e8c3eb7b6ccb8a7a2f44e34dacb09f4f0c2117bd0a166433ca1 6a606769764023f01", "ac6b6150f924e3d0968b3bc9031bf96ffaa3cf146ef 043545187714f3b099b1165bbd88e84f237a171ac0685b7c5b7c840d393c0fa2 d2bf4d0aa77b9791ab9c3". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the data to sign Create buffer "input" of decimal value "1024" bytes. Set buffer "input" to hex value "616263". Note: The signature will be the same size as the modulus. Create buffer "output" of decimal value "128" bytes. Note: ---------------------------------------------------------- Note: ---------- Note: Test 1-1: input is "abc" Note: SHA1 ("abc") = a9993e364706816aba3e25717850c26c9cd0d89d Note: Perform the test use AI_SHA1WithRSAEncryption. Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 240 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_SHA1WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_SHA1WithRSAEncryptionBER". Check equality of info structure for "AI_SHA1WithRSAEncryptionBE R" with expected info structure for "AI_SHA1WithRSAEncryptionBER ". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "5c85c14a3dbe011bfb969a637a76d7a2d0ddc7ddbcbb450a121f6568020c596 e9929473332f288f4407bf71489b7c29dc9810b103a51291f8128c8ea935ba72 253b2a05de9489d64d2bcec8ba3f3ca19d318380edb8c459920ef2599f655781 e94bffb1cfc7d4ba9e567117c08378e489f939007acdc6a92918c2a2fc31bf9c 8". Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 241 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_SHA1WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_SHA1WithRSAEncryption". Check equality of info structure for "AI_SHA1WithRSAEncryption" with expected info structure for "AI_SHA1WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 1-2: Note: Check the signature result of 1-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Create buffer "expectOutput" of decimal value "128" bytes. Create buffer "digestInfo" of decimal value "36" bytes. Create algorithm object "encrytpionObj". Call B_CreateAlgorithmObject passing "encrytpionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 242 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 0414a9993e364706816aba3e25717850c26c9cd0d89d". Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encrytpionObj" and "AI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrytpionObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Note: ---------- Note: Test 2-1:input = "abcdbcdecdefdefgefghfghighijhijkijkljklm Note: klmnlmnomnopnopq" Note: SHA1 ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomno Note: pnopq") = Note: 84983e441c3bd26ebaae4aa1f95129e5e54670f1 Note: Perform the test use AI_SHA1WithRSAEncryption. Set length of buffer "output" to decimal value "0". Set length of buffer "expectOutput" to decimal value "0". Set buffer "input" to hex value "6162636462636465636465666465666 765666768666768696768696a68696a6b696a6b6c6a6b6c6d6b6c6d6e6c6d6e6 Baldwin Informational, Expires 12/25/1999 243 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 f6d6e6f706e6f7071". Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "9b13f4e9cfc36cc2b1153360c09d3b6eb47c473ba9a127cf775fe6116a365fd 9a69532aaea721693185e1e42ce6d49608cd2de4f995d1bff5e6cc7a0bf71002 c7aca0b3edb63f67f91b4a31d69ae647dbe22fab63bf20d2b0a6ce76ab5f414f c55ae9b86ddf8c3a97b8a6c292c7ac91495b02e6847e2c6713df12d2f2ff196f 3". Note: Verify the signature Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 2-2: Note: Check the signature result of 2-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 041484983e441c3bd26ebaae4aa1f95129e5e54670f1". Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" Baldwin Informational, Expires 12/25/1999 244 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Note: ---------- Note: Test 3-1:input = "abcdbcdecdefdefgefghfghighijhijkijkljklm Note: klmnlmnomnopnopq" Note: SHA1 ("1,000,00 repetition of a" = 34aa973cd4c4daa4f61eeb2 Note: bdbad27316534016f Note: Perform the test use AI_SHA1WithRSAEncryption. Set length of buffer "output" to decimal value "0". Set length of buffer "expectOutput" to decimal value "0". Set buffer "input" to hex value "6161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 Baldwin Informational, Expires 12/25/1999 245 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161". Begin a loop of decimal value "1000" iterations. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "5acc27d981591f576d9e9684fe57c42cdd4a3ae2fa81a2b05e28ee1aee3aab9 669b6467c8be3a34dfa71f98d88300e1f6c9ea60f700576e8bc3f6104e87b1b9 a93d6882d121f8c06e456fa9ad4b5bb06f6f6265a52714d51536dc5477b9e333 36ee56fac0a486b6e2b7eb3b5fed5c7f12f8e595c201ccb6f2b1cf41bbe152c5 1". Note: Verify the signature Begin a loop of decimal value "1000" iterations. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 3-2: Baldwin Informational, Expires 12/25/1999 246 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Check the signature result of 3-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 041434aa973cd4c4daa4f61eeb2bdbad27316534016f". Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Note: ---------- Note: Case 4: Note: Use an arbitrary public/private keypair, this one Note: contains a Note: 2048-bit modulus. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "a40d55504a4a99261ac819e53536b50 a922b6f9e130899606cb3c5bc16ff61376d2538f10e13560b6c49006049b9a1e af070feeac92313074e4a65471d510609ddbe97de1da3817a47f6d3632b9275c ed442a308869a17a29582cc693ac2616bc90bb8c06f9ab88a0c61a08fd2e8eb7 f1b6e04910de8d5d0bd30fdc4b836e70ad992400a96d2845b2bb023a9ce81296 827732e3d68ccae2fd66849179572c7e0e4b5fbb7a92b2f222e020b413ac198b 24f3d297819e0e98f9d8e5291a4918bf4af71476c7b3cd0f7c888151bf5ca9d5 Baldwin Informational, Expires 12/25/1999 247 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 4b98297731ded8ec120920a62b9bc5bbbf9955536abe41ae6731c8ad2f43bfbb b5648961f12d4c26408baec8e609b53bf", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "a40d55504a4a99261ac819e53 536b50a922b6f9e130899606cb3c5bc16ff61376d2538f10e13560b6c4900604 9b9a1eaf070feeac92313074e4a65471d510609ddbe97de1da3817a47f6d3632 b9275ced442a308869a17a29582cc693ac2616bc90bb8c06f9ab88a0c61a08fd 2e8eb7f1b6e04910de8d5d0bd30fdc4b836e70ad992400a96d2845b2bb023a9c e81296827732e3d68ccae2fd66849179572c7e0e4b5fbb7a92b2f222e020b413 ac198b24f3d297819e0e98f9d8e5291a4918bf4af71476c7b3cd0f7c888151bf 5ca9d54b98297731ded8ec120920a62b9bc5bbbf9955536abe41ae6731c8ad2f 43bfbbb5648961f12d4c26408baec8e609b53bf", "010001", "75bed422e28f9448532497e1794620becb96bd70197d2c8896bc99099d00030 8c31fda34b9c38b187bca11a90a816003be3b7bdb8c2dce7489eebfae410e6c6 51c70b593c876187269c0708c5733b1b697869479841289303a5b3cd7b242dda 57d111ab393e6dad8ca762fc5cabd3e7966789a727a27497f9eaad1192696d15 043feec9ce697b51a5b9e8ef89aecee3a2285088c9213f7f00b26b9130329c0f 29cf26bfa4e8be0c8d7dffaf5b2fdb5dee6ead68af8afeeb0fdbd7f13e464832 612f2171576231d695c0406da99a411bed8f9cad077375a74854ae0dd86cb617 cc639843561e86c5ffaf9fe010736c30c237b9be05d76a9a7bdf9ff332fbc208 1", "d2359d139c5e94e1d7ced3f4dfd3a37a5d68b89196a21dd0619ec71c3dd 221ca9e571382c307aa768029d999ee1f8e24f7cf73c34c1c071495b4f7a28a3 f7aebd09f17cf3f80565f3981bfde9ff55349cbdfd42dfaeaa863a4005ca25fb 7c014a9e16fe38ec741ab07a5cf9df32854344fcf47a00124b81cfcf2ed72c6e 1c221", "c7c9be1f927787728816f008a5e4c1e06b29959c007d365830aa70f 59acdf09d04c326b40aaacc63022a29b860bd8da809a5a6594ca06f506f9f4a8 8adf88d63f704602f477789737cf593959bc3b3e47d74116bf0e3426dfd463ef f0472909d922cb9cd61d9f2edd0878b00e720e659861c4f6bf57d8a15b7d132d bd23e19df", "2cabb6089fd73d9e4cc52827c694ec0da9e2022ef62ad7591c1 5a8cc689aca118bda874be7742e96661ffe9d068c70218d03e9dedbc2ad0283d 9e432075cfc1b36c7484103869b543b1d468fe1c03985da2c63a3adc9c624fe8 a1125745fd112d313143af0718993f5d917a8c22e94ce5513806e1130236c0d9 8f63ac8e6dae1", "374e33a14dcc64e461a3e7e29cf9cc69b1809b77c9f2df7 e5e4a7066ace9e177b5ffc7d1033af0c55fae084a900d290fa14c07d6a48dad0 2d943814080d8535b9edfc9388d521becaa64d8ec0b688b7deef498760703023 aac682bbc30a0fe4380597d3dcb9ea7cf0970dc1beddf7fa4bca94d9b17241f7 b8f9d0bb52a682285", "acc125113028f8150feb24d14672db7f59118d349ff 7a2b0584c841e1e6bfc6033729edd2c7a44cfbe54869f0dbfe21f39f6c7f0419 172c832b83d167e0d2d474c39d1457d47ed986659d216c06edd0b16ece129801 56f5215634ae61995818057fc8bde64994d60743f89d0dbf8f6762efda3fa04c 8acdc983c60a0ad41cc0e". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" Baldwin Informational, Expires 12/25/1999 248 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the data to sign Create buffer "input" of decimal value "1024" bytes. Set buffer "input" to hex value "616263". Note: The signature will be the same size as the modulus. Create buffer "output" of decimal value "256" bytes. Note: ---------------------------------------------------------- Note: ---------- Note: Test 1-1: input is "abc" Note: SHA1 ("abc") = a9993e364706816aba3e25717850c26c9cd0d89d Note: Perform the test use AI_SHA1WithRSAEncryption. Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_SHA1WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "signObj" and "AI_SHA1WithRSAEncryptionBER". Check equality of info structure for "AI_SHA1WithRSAEncryptionBE R" with expected info structure for "AI_SHA1WithRSAEncryptionBER ". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 249 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "1ffc4b60ef0f4e7bea3ce4bda4528d96b4fb47862c5699f2686651a436b112b 297856bf8c65901dda9d0a12c61f672c60c1ea81390e15842fead1c8fc6810a5 60a629d72814eacb4c71834e26a07dc1d85864de831b1fd1ac6e08be33cc1359 7a1e3fd8abea154d0007077552941aa9c5381e2a681eb1d7f0c2be0ed50b25ed 3564f123c53136374ccf373e5f78c7114d1979fd1f8d71889e8f908e7fc6713f 10fba4ea5f0a3622ae994352114909d6ad82e97cad6548565e8d0f880d023b6c dd09817fb907e1811dfe93974f403bbf71521c93c4142a0e1a673118f8e684ca e6c76f9cfce6c9c142c838f94d4e5cf48ca2abd60113a54eda149044fa9bb4d1 c". Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryptionBER" initialized from "300d06092a864886f70d0101050500". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_SHA1WithRSAEncryptionBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_SHA1WithRSAEncryption" initialized from "NULL_PTR". Set "_InfoPointer" to address of info structure for "AI_SHA1WithRSAEncryption". Call B_GetAlgorithmInfo passing "_InfoPointer" and "verifyObj" and "AI_SHA1WithRSAEncryption". Check equality of info structure for "AI_SHA1WithRSAEncryption" with expected info structure for "AI_SHA1WithRSAEncryption". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 250 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 1-2: Note: Check the signature result of 1-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Create buffer "expectOutput" of decimal value "256" bytes. Create buffer "digestInfo" of decimal value "36" bytes. Create algorithm object "encrytpionObj". Call B_CreateAlgorithmObject passing "encrytpionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 0414a9993e364706816aba3e25717850c26c9cd0d89d". Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encrytpionObj" and "AI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrytpionObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 251 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Note: ---------- Note: Test 2-1:input = "abcdbcdecdefdefgefghfghighijhijkijkljklm Note: klmnlmnomnopnopq" Note: SHA1 ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomno Note: pnopq") = Note: 84983e441c3bd26ebaae4aa1f95129e5e54670f1 Note: Perform the test use AI_SHA1WithRSAEncryption. Set length of buffer "output" to decimal value "0". Set length of buffer "expectOutput" to decimal value "0". Set buffer "input" to hex value "6162636462636465636465666465666 765666768666768696768696a68696a6b696a6b6c6a6b6c6d6b6c6d6e6c6d6e6 f6d6e6f706e6f7071". Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "850ecd588dc614bcb56d25913beaec9ed232bb8ab180f050edf7faf4b684593 241f2fc8ab20cf9981dd83089538d7f3c34f88e4e85cbaa0a96071a90db6e694 d23b7b3e6987a44b43dd9a46ac9c3f67537c57c61ea589b3a8b42ee4be7b5f0f e71cb220804b6554456578de950e435d07e3b84276b08ec9a6159d35c96744c3 bb16a15c194f77da04406b38ab9acf3a43efd7ce05967e31202ed7dccc9e57f9 Baldwin Informational, Expires 12/25/1999 252 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 f9354cc797ebe55bdf46f307741e6aa1fdf90da921e90aff76474fe7fe5ca881 f1e0ae5ee30ed40fab2455922e5beeea573e32e3f7a8f4fdaa8fa9d7a8fb2a6d 14ed263a8e0ad8bb8a5dce5c07cc1c2a6d4a1e6e7b78ffba6010511d31f77a82 1". Note: Verify the signature Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 2-2: Note: Check the signature result of 2-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 041484983e441c3bd26ebaae4aa1f95129e5e54670f1". Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 253 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------- Note: Test 3-1:input = "abcdbcdecdefdefgefghfghighijhijkijkljklm Note: klmnlmnomnopnopq" Note: SHA1 ("1,000,00 repetition of a" = 34aa973cd4c4daa4f61eeb2 Note: bdbad27316534016f Note: Perform the test use AI_SHA1WithRSAEncryption. Set length of buffer "output" to decimal value "0". Set length of buffer "expectOutput" to decimal value "0". Set buffer "input" to hex value "6161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161". Begin a loop of decimal value "1000" iterations. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Call B_SignFinal passing "signObj" and address of next free Baldwin Informational, Expires 12/25/1999 254 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "104b1d13ba23b080be0e48891feec225482a4ad8dcdf0b3893bd1d2144fa71d 15cf7c873b35cf443f30710c2db1dfa2f5f662ea3c3281d84976021120beb919 61bab6eb887bf9c5e40bf7d7b8c3f46523eb2fef9e85d6abf9d07735aefd764e bbfd0f8f09fddb3f400f61750b8541fe2571864b5077b1014840cafd098db94b af52373729ff6f31cd52bc73766fa7e223ada147e7cca92faf06bd41b5f99d1f 3f691f0897618cede5ab510710199f205809deb8b28e29d777e3617cef65db29 b7297213fcf0ca00225c7da8422c287aa5736b2726b63048953d5404ee94d0a3 7450b28ede032f279e0863589a3c3acc47a7f38a463258b5b8610204ee53a61e 3". Note: Verify the signature Begin a loop of decimal value "1000" iterations. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 3-2: Note: Check the signature result of 3-1 by signing the Note: digestinfo with Note: AI_PKCS_RSAPrivate Set buffer "digestInfo" to hex value "3021300906052b0e03021a0500 041434aa973cd4c4daa4f61eeb2bdbad27316534016f". Call B_EncryptUpdate passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and address of first initialized byte in buffer "digestInfo" and length of initialized bytes in buffer "digestInfo" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 255 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Call B_EncryptFinal passing "encrytpionObj" and address of next free byte in buffer "expectOutput" and address of "_OutputLen" and length of free bytes in buffer "expectOutput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expectOutput" by "_OutputLen". Finalize buffer "expectOutput". Check equality of buffer "expectOutput" with contents of buffer "output". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVSHARSA". This is the start of test case "TFSHARND". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for AI_SHARandom Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_SHA_RANDOM", "NULL_PTR". Create buffer "input" of decimal value "256" bytes. Set buffer "input" to hex value "99aabbcc". Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1Random" initialized from "", "000102030405060708090a0b0c 0d0e0f000102030405". Call B_SetAlgorithmInfo passing "random" and "AI_SHA1Random" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 256 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "input" and length of initialized bytes in "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "initVector" of decimal value "8" bytes. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Display buffer "initVector". Set "_OutputLen" to decimal value "253". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Display buffer "input". Call Call B_DestroyAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFSHARND". This is the start of test case "TF111300". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for 1113 recoding Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Baldwin Informational, Expires 12/25/1999 257 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "NULL_PTR". Create algorithm object "encodeAlg". Call B_CreateAlgorithmObject passing "encodeAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decodeAlg". Call B_CreateAlgorithmObject passing "decodeAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "inputData" of decimal value "5000" bytes. Create buffer "encodedData" of decimal value "7000" bytes. Create buffer "decodedData" of decimal value "5000" bytes. Create buffer "expectedResult" of decimal value "7000" bytes. Note: Initialize, set up expected and input data Set "_InfoPointer" to address of info structure for "AI_RFC1113Recode" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encodeAlg" and "AI_RFC1113Recode" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RFC1113Recode" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decodeAlg" and "AI_RFC1113Recode" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncodeInit passing "encodeAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecodeInit passing "decodeAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1 Set buffer "inputData" to hex value "307c300d06092a864886f70d010 1010500036b003068026100b0b40e9a3a464e8703ffb8dbcad8af41f3c3f4131 cf6571e39a53549b42094dc92f8ee1ea1035f94212b751a3b07445dbdd6ef4d7 e2300f42cf5734790bce8ba517fa819eef75f1746dce5ffd123fe642e6894b38 1de5a40288dd6d714af84ef0203010001". Baldwin Informational, Expires 12/25/1999 258 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Call B_EncodeFinal passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Set buffer "expectedResult" to hex value "4d4877774451594a4b6f5a 496876634e41514542425141446177417761414a68414c433044706f36526b36 48412f2b34323872597230487a772f515448505a58486a6d6c4e556d30494a54 636b766a7548714544583551684b3355614f776445586233573730312b497744 304c50567a52354338364c70526636675a377664664630626335662f52492f35 6b4c6d695573344865576b416f6a646258464b2b453777494441514142". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Call B_DecodeFinal passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". Note: Case 2 Set length of buffer "encodedData" to decimal value "0". Set length of buffer "decodedData" to decimal value "0". Set buffer "inputData" to hex value "305f310b3009060355040613025 Baldwin Informational, Expires 12/25/1999 259 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 5533120301e060355040a131752534120446174612053656375726974792c204 96e632e312e302c060355040b13254c6f77204173737572616e6365204365727 4696669636174696f6e20417574686f72697479". Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Call B_EncodeFinal passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Set buffer "expectedResult" to hex value "4d463878437a414a42674e 5642415954416c56544d534177486759445651514b4578645355304567524746 30595342545a574e31636d6c30655377675357356a4c6a45754d437747413155 4543784d6c544739334945467a633356795957356a5a5342445a584a3061575a 7059324630615739754945463164476876636d6c3065513d3d". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Call B_DecodeFinal passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". Note: Case 3 Set length of buffer "encodedData" to decimal value "0". Baldwin Informational, Expires 12/25/1999 260 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "decodedData" to decimal value "0". Set buffer "inputData" to hex value "3082010330818e300d06092a864 886f70d0101020500305f310b30090603550406130255533120301e060355040 a131752534120446174612053656375726974792c20496e632e312e302c06035 5040b13254c6f77204173737572616e63652043657274696669636174696f6e2 0417574686f72697479170d3932303930393132303031385a170d39323130303 13030303030305a300d06092a864886f70d0101020500036100678de267135fb b9d7b38725267ece9ef8bc5baa7b93fdd5128133db75a0c252b6de3401879659 ff7160d98efff55049b6b368b41a79c9d8e4332ea3039bf3169d4a3b9d9b6f7c b7aa840d549cac49c0d4dccabdd45d06a5f171fafcc9e1e8255". Display buffer "inputData". Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Call B_EncodeFinal passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Set buffer "expectedResult" to hex value "4d494942417a43426a6a41 4e42676b71686b69473977304241514946414442664d51737743515944565151 4745774a56557a45674d4234474131554543684d58556c4e4249455268644745 675532566a64584a7064486b7349456c75597934784c6a417342674e56424173 544a5578766479424263334e31636d4675593255675132567964476c6d61574e 6864476c76626942426458526f62334a7064486b5844546b794d446b774f5445 794d4441784f466f5844546b794d5441774d5441774d4441774d466f77445159 4a4b6f5a496876634e41514543425141445951426e6a654a6e45312b376e5873 34636c4a6e374f6e766938573670376b2f3356456f457a32335767776c4b3233 6a514268355a5a2f3346673259372f3956424a74724e6f7442703579646a6b4d 79366a4135767a4670314b4f35326262337933716f514e564a79735363445533 4d713931463047706646782b767a4a3465676c553d". Display buffer "expectedResult". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 261 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecodeFinal passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". Note: Case 4 Set length of buffer "encodedData" to decimal value "0". Set length of buffer "decodedData" to decimal value "0". Set buffer "inputData" to hex value "308201983082012202044600000 1300d06092a864886f70d0101020500305f310b3009060355040613025553312 0301e060355040a131752534120446174612053656375726974792c20496e632 e312e302c060355040b13254c6f77204173737572616e6365204365727469666 9636174696f6e20417574686f72697479301e170d39323039303931383530303 55a170d3934303930393138353030345a302c310b30090603550406130255533 11d301b060355040a13144578616d706c65204f7267616e697a6174696f6e305 c300d06092a864886f70d0101010500034b003048024100c5596591f670ac387 fbabff6c0d083e593220e0bc3a00f975b9eb7ad514c777bae14252df83058747 f177eac9c1da5394d33ebd8de9216a41c69d2d4838fa4510203010001300d060 92a864886f70d0101020500036100738e6d829230f4376aa94c20500bf153428 98014facad1d87148e72812d6f195700f1f1c42378208038cfa96d4d77baafab 2dcdc7c5a8031fc678e789a35c5cee985ece445fe8bb258bccbd92802ddecc82 6bc6ad67664c48e3cc5a26d8f7495". Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Call B_EncodeFinal passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Set buffer "expectedResult" to hex value "4d4949426d444343415349 4342455941414145774451594a4b6f5a496876634e4151454342514177587a45 4c4d416b474131554542684d4356564d784944416542674e5642416f5446314a 54515342455958526849464e6c59335679615852354c43424a626d4d754d5334 774c4159445651514c4579564d6233636751584e7a64584a68626d4e6c49454e Baldwin Informational, Expires 12/25/1999 262 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 6c636e52705a6d6c6a59585270623234675158563061473979615852354d4234 5844546b794d446b774f5445344e5441774e566f5844546b304d446b774f5445 344e5441774e466f774c44454c4d416b474131554542684d4356564d78485441 6242674e5642416f5446455634595731776247556754334a6e59573570656d46 30615739754d4677774451594a4b6f5a496876634e4151454242514144537741 7753414a42414d565a5a5a4832634b77346637712f39734451672b5754496734 4c773641506c31756574363152544864377268516c4c6667775748522f463336 736e42326c4f55307a36396a656b68616b48476e5331494f5070464543417745 414154414e42676b71686b6947397730424151494641414e6841484f4f62594b 534d50513361716c4d4946414c38564e43695941552b73725232484649357967 53317647566341386648454933676767446a507157314e643771767179334e78 38576f41782f47654f654a6f317863377068657a6b5266364c736c693879396b 6f417433737943613861745a325a4d534f504d5769625939306c513d3d". Display buffer "expectedResult". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Call B_DecodeFinal passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". This is the end of test case "TF111300". This is the start of test case "TF111301". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Length-based test for 1113 recoding Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "NULL_PTR". Create algorithm object "encodeAlg". Baldwin Informational, Expires 12/25/1999 263 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "encodeAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decodeAlg". Call B_CreateAlgorithmObject passing "decodeAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "inputData" of decimal value "100" bytes. Create buffer "encodedData" of decimal value "100" bytes. Create buffer "decodedData" of decimal value "100" bytes. Create buffer "expectedResult" of decimal value "100" bytes. Create buffer "empty" of decimal value "2" bytes. Note: Initialize, set up expected and input data Set "_InfoPointer" to address of info structure for "AI_RFC1113Recode" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encodeAlg" and "AI_RFC1113Recode" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RFC1113Recode" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decodeAlg" and "AI_RFC1113Recode" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Buffer 1 byte in update, output 4 bytes in final Set buffer "inputData" to hex value "00". Call Call B_EncodeInit passing "encodeAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "empty" with string value "". Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Check equality of buffer "empty" with contents of buffer "encodedData". Baldwin Informational, Expires 12/25/1999 264 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "expectedResult" with string value "AA==". Call B_EncodeFinal passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call Call B_DecodeInit passing "decodeAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Check equality of buffer "empty" with contents of buffer "decodedData". Call B_DecodeFinal passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "decodedData" with contents of buffer "inputData". Note: Buffer 2 bytes in update, output 4 bytes in final Set buffer "inputData" to hex value "0010". Set length of buffer "encodedData" to decimal value "0". Set length of buffer "decodedData" to decimal value "0". Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 265 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Check equality of buffer "empty" with contents of buffer "encodedData". Set buffer "expectedResult" with string value "ABA=". Call B_EncodeFinal passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Check equality of buffer "empty" with contents of buffer "decodedData". Call B_DecodeFinal passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "decodedData" with contents of buffer "inputData". Note: 3 bytes input in update, output 4 bytes, no thing in Note: final Set buffer "inputData" to hex value "001083". Set buffer "expectedResult" with string value "ABCD". Set length of buffer "encodedData" to decimal value "0". Set length of buffer "decodedData" to decimal value "0". Call Call B_EncodeInit passing "encodeAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncodeUpdate passing "encodeAlg" and address of next Baldwin Informational, Expires 12/25/1999 266 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call B_EncodeFinal passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call Call B_DecodeInit passing "decodeAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Check equality of buffer "empty" with contents of buffer "decodedData". Call B_DecodeFinal passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "decodedData" with contents of buffer "inputData". Note: input 4 bytes in update, output 4 bytes, and buffer 1 Note: byte Baldwin Informational, Expires 12/25/1999 267 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "inputData" to hex value "00108310". Set buffer "expectedResult" with string value "ABCD". Set length of buffer "encodedData" to decimal value "0". Set length of buffer "decodedData" to decimal value "0". Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Check equality of buffer "empty" with contents of buffer "decodedData". Set length of buffer "encodedData" to decimal value "0". Set buffer "expectedResult" with string value "EA==". Call B_EncodeFinal passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Set buffer "expectedResult" to hex value "001083". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 268 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "expectedResult" with contents of buffer "decodedData". Call B_DecodeFinal passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". Note: input 5 bytes in update, output 4 bytes, and buffer 2 Note: byte Set buffer "inputData" to hex value "0010831051". Set buffer "expectedResult" with string value "ABCD". Set length of buffer "encodedData" to decimal value "0". Set length of buffer "decodedData" to decimal value "0". Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Check equality of buffer "empty" with contents of buffer "decodedData". Set length of buffer "encodedData" to decimal value "0". Set buffer "expectedResult" with string value "EFE=". Call B_EncodeFinal passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Baldwin Informational, Expires 12/25/1999 269 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Set buffer "expectedResult" to hex value "001083". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Check equality of buffer "expectedResult" with contents of buffer "decodedData". Call B_DecodeFinal passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". Note: input 6 bytes in 2 update, output 4 bytes for 1 and Note: second update, 0 output Note: on final. Set buffer "inputData" to hex value "001083". Set buffer "expectedResult" with string value "ABCD". Set length of buffer "encodedData" to decimal value "0". Set length of buffer "decodedData" to decimal value "0". Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Baldwin Informational, Expires 12/25/1999 270 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Check equality of buffer "empty" with contents of buffer "decodedData". Set length of buffer "encodedData" to decimal value "0". Set buffer "inputData" to hex value "105187". Set buffer "expectedResult" with string value "EFGH". Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Call B_EncodeFinal passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Set buffer "expectedResult" to hex value "001083". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Check equality of buffer "expectedResult" with contents of buffer "decodedData". Set buffer "inputData" to hex value "001083105187". Call B_DecodeFinal passing "decodeAlg" and address of next free Baldwin Informational, Expires 12/25/1999 271 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "inputData" with contents of buffer "decodedData". Note: input 7 bytes in 6:1 update, output 8 bytes for 1, 0 for Note: second update, Note: 4 on final. Set buffer "inputData" to hex value "001083105187". Set buffer "expectedResult" with string value "ABCDEFGH". Set length of buffer "encodedData" to decimal value "0". Set length of buffer "decodedData" to decimal value "0". Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Set buffer "expectedResult" to hex value "001083". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Check equality of buffer "expectedResult" with contents of buffer "decodedData". Set length of buffer "encodedData" to decimal value "0". Set buffer "inputData" to hex value "20". Call B_EncodeUpdate passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 272 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Check equality of buffer "empty" with contents of buffer "encodedData". Set buffer "expectedResult" with string value "IA==". Call B_EncodeFinal passing "encodeAlg" and address of next free byte in buffer "encodedData" and address of "_OutputLen" and length of free bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encodedData" by "_OutputLen". Finalize buffer "encodedData". Check equality of buffer "expectedResult" with contents of buffer "encodedData". Set length of buffer "decodedData" to decimal value "0". Set buffer "expectedResult" to hex value "105187". Call B_DecodeUpdate passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" and address of first initialized byte in buffer "encodedData" and length of initialized bytes in buffer "encodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Check equality of buffer "expectedResult" with contents of buffer "decodedData". Set length of buffer "decodedData" to decimal value "0". Set buffer "expectedResult" to hex value "20". Call B_DecodeFinal passing "decodeAlg" and address of next free byte in buffer "decodedData" and address of "_OutputLen" and length of free bytes in buffer "decodedData" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decodedData" by "_OutputLen". Finalize buffer "decodedData". Check equality of buffer "expectedResult" with contents of buffer "decodedData". This is the end of test case "TF111301". This is the start of test case "TF931EVN". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Baldwin Informational, Expires 12/25/1999 273 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: 1024 bit key vector test based on X9.31 example 4.5 for Note: AI_RSAStrongKeyGen, Note: KI_RSAPublic, KI_RSAPrivate Note: AI_FormatX931, AI_SignVerify Note: Depending on AI_DummyRandom algorithm Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DUMMY_RANDOM_MULT", "AM_FORMAT_X931", "AM_EXTRACT_X931", "AM_RSA_CRT_X931_ENCRYPT", "AM_RSA_X931_DECRYPT", "AM_RSA_STRONG_KEY_GEN", "NULL_PTR". Note: Set up random object for param and key generation Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DummyRandomMult" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_DummyRandomMult" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "512" bytes. Set buffer "seed" to hex value "1857FA8D9D0B0E4E033B68CE401A416A 5C0DAB5E4CEB97EB9EECDBB3CB4C375C0ECD2FD300DB4F08547293CA004CEDD2 019CE79CA08A15EEFB25DD3BAF981823961F4148FF03C6E96930B78C7A758D69 BC5070137900403807A4198C4AD4DBA81A560183DD19BA1A5A797EB98BEFF431 2D0C9EF7EEAA4A5347999FE76FB7876064BBEC66CB409A7739EF5A5906613DC3 7225D41D2BEB1F9F5EBF4CC95B6BF916A47C5EF2146BE00ECD4A1C5D88B3E85A 9569BE97". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate RSA Keypair Create algorithm object "rsaKeyGen". Call B_CreateAlgorithmObject passing "rsaKeyGen". Baldwin Informational, Expires 12/25/1999 274 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAStrongKeyGen" initialized from "1024", "2". Call B_SetAlgorithmInfo passing "rsaKeyGen" and "AI_RSAStrongKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "rsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "rsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the RSA public Set "_ExpectedInfoPointer" to address of expected info structure for "KI_RSAPublic" initialized from "ccd34c2f4d95ffad1420e666c07e39d1450a13304c3f5891ede57595c772a36 91ab51d2bece1476b8f22ae223365f183bc3ee2d4cacdba3ad0c4d4781c523a1 0efe6203d6f3bc226bf9a459727b8f122c482d8c86019f9a869329187096430a 6c67cb103742bcbc66906ad23836ebabb511d5d80ab8cb59974e9aac62d785c4 5", "02". Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Check equality of info structure for "KI_RSAPublic" with expected info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the RSA private Baldwin Informational, Expires 12/25/1999 275 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "KI_RSAPrivate" initialized from "ccd34c2f4d95ffad1420e666c07e39d1450a13304c3f5891ede57595c772a36 91ab51d2bece1476b8f22ae223365f183bc3ee2d4cacdba3ad0c4d4781c523a1 0efe6203d6f3bc226bf9a459727b8f122c482d8c86019f9a869329187096430a 6c67cb103742bcbc66906ad23836ebabb511d5d80ab8cb59974e9aac62d785c4 5", "199a6985e9b2bff5a2841cccd80fc73a28a142660987eb123dbcaeb2b8e e546d2356a3a57d9c28ed71e455c4466cbe307787dc5a9959b7475a189a8f038 a4741e4b10153be08c26e4401f7ab6e7e96092caf07c0870b13b64f669667302 9ec2c77aabc397fa528a245d7073ce69cc9bdcd7bef91599dca484000c0bd8ab 0814e". Set "_InfoPointer" to address of info structure for "KI_RSAPrivate". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_RSAPrivate". Check equality of info structure for "KI_RSAPrivate" with expected info structure for "KI_RSAPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now use the generated key in signing and verifying Create buffer "signature" of decimal value "1024" bytes. Create algorithm object "x931RSASigner". Call B_CreateAlgorithmObject passing "x931RSASigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SignVerify" initialized from "rsaSignX931", "0", "sha1", "0", "formatX931", "128", "3". Call B_SetAlgorithmInfo passing "x931RSASigner" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "x931RSAVerifier". Call B_CreateAlgorithmObject passing "x931RSAVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SignVerify" initialized from "rsaVerifyX931", "0", "sha1", "0", "formatX931", "128", "3". Call B_SetAlgorithmInfo passing "x931RSAVerifier" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 276 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: Sign 3 bytes Create algorithm object "dataSpring". Call B_CreateAlgorithmObject passing "dataSpring". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dataSpring" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "dataSpring" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "dataSpring" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Begin a loop of decimal value "1000" iterations. Set "_OutputLen" to decimal value "10". Call B_GenerateRandomBytes passing "dataSpring" and address of next free byte in "seed" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "seed" by "_OutputLen". Finalize "seed". Display buffer "seed". Call Call B_SignInit passing "x931RSASigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "x931RSASigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "x931RSASigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and Baldwin Informational, Expires 12/25/1999 277 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the signature of the seed Call Call B_VerifyInit passing "x931RSAVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "x931RSAVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "x931RSAVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. This is the end of test case "TF931EVN". This is the start of test case "TF931RND". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for AI_SHARandom Note: ------------------------------------------------------- Create buffer "input" of decimal value "256" bytes. Set buffer "input" to hex value "99aabbcc". Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_X931Random" initialized from "6", "0a08080808080808080808080 8080808080808080808080809090909090909090909090909090909090909090 Baldwin Informational, Expires 12/25/1999 278 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 90909090b08080808080808080808080808080808080808080808080a0909090 9090909090909090909090909090909090909090c08080808080808080808080 808080808080808080808080b090909090909090909090909090909090909090 9090909". Call B_SetAlgorithmInfo passing "random" and "AI_X931Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "randBuffer" of decimal value "22" bytes. Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 279 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Call Call B_DestroyAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Test Null argument and update capability Create buffer "seed" of decimal value "300" bytes. Set buffer "seed" to hex value "08080808080808080808080808080808 0808080808080808090909090909090909090909090909090909090909090909 0808080808080808080808080808080808080808080808080909090909090909 0909090909090909090909090909090908080808080808080808080808080808 0808080808080808090909090909090909090909090909090909090909090909 ". Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_X931Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_X931Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and Baldwin Informational, Expires 12/25/1999 280 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "randBuffer" of decimal value "22" bytes. Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Baldwin Informational, Expires 12/25/1999 281 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Call Call B_DestroyAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TF931RND". This is the start of test case "TFMD5RND". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for AI_RC5_CBCPadBER Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "NULL_PTR". Create buffer "input" of decimal value "256" bytes. Set buffer "input" to hex value "99aabbcc". Create buffer "ber" of decimal value "40" bytes. Create buffer "keyData" of decimal value "256" bytes. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 282 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "input" and length of initialized bytes in "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "keyLen" of decimal value "4" bytes. Create buffer "initVector" of decimal value "8" bytes. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Display buffer "initVector". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Display buffer "keyData". Set "_OutputLen" to decimal value "253". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Display buffer "input". Baldwin Informational, Expires 12/25/1999 283 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 This is the end of test case "TFMD5RND". This is the start of test case "TFPNTRND". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for AI_HW_Random Note: ------------------------------------------------------- Note: Define the session password Create buffer "password" of decimal value "50" bytes. Set buffer "password" with string value "Intel RNG at work!". Note: Set the chooser Set "_Chooser" to "AM_HW_RANDOM", "NULL_PTR". Create buffer "newChooser" of decimal value "20" bytes. Create buffer "tagList" of decimal value "50" bytes. Create buffer "input" of decimal value "256" bytes. Set buffer "input" to hex value "99aabbcc". Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_HW_Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_HW_Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "randBuffer" of decimal value "22" bytes. Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 284 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Set "_OutputLen" to decimal value "22". Call B_GenerateRandomBytes passing "random" and address of next free byte in "randBuffer" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "randBuffer" by "_OutputLen". Finalize "randBuffer". Display buffer "randBuffer". Baldwin Informational, Expires 12/25/1999 285 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFPNTRND". This is the start of test case "TLRSSTR1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: This script is based on zzlrsa01 but replaces standard Note: key generation Note: with strong key generation. Note: It generates 1 RSA key pair of each modulus size of Note: 512-1024 bits using f0 (3) as the public exponent. To Note: attempt to Note: confirm the accuracy of the key pair the following steps Note: are performed: Note: - a public encryption/private decryption (with Note: comparison) Note: - a private encryption/public decryption (with Note: comparison) Note: Note: Due to the size of this script, DestroyAllObjects() Note: is used. Set "_Chooser" to "AM_MD2_RANDOM", "AM_RSA_KEY_GEN", "NULL_PTR". Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_DECRYPT", "NULL_PTR". Set "_Chooser" to "AM_RSA_CRT_ENCRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Create buffer "modSize" of decimal value "10" bytes. Set buffer "modSize" to hex value "1F0". Begin a loop of decimal value "40" iterations. Increment buffer "modSize" by decimal value "16". Note: Create necessary objects Create algorithm object "rsaKeyGen". Call B_CreateAlgorithmObject passing "rsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rsaPrivateAlgorithm". Call B_CreateAlgorithmObject passing "rsaPrivateAlgorithm". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 286 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rsaPublicAlgorithm". Call B_CreateAlgorithmObject passing "rsaPublicAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "randomObject". Call B_CreateAlgorithmObject passing "randomObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "rsaPrivate". Call B_CreateKeyObject passing "rsaPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "rsaPublic". Call B_CreateKeyObject passing "rsaPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "input" of decimal value "16" bytes. Create buffer "intermediate" of decimal value "200" bytes. Create buffer "output" of decimal value "16" bytes. Note: Setup the objects Set "_InfoPointer" to address of info structure for "AI_RSAStrongKeyGen" initialized from contents of buffer "modSize", "3". Call B_SetAlgorithmInfo passing "rsaKeyGen" and "AI_RSAStrongKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomObject" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "rsaPrivateAlgorithm" and "AI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "rsaPublicAlgorithm" and Baldwin Informational, Expires 12/25/1999 287 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_PKCS_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "00112233445566778899aabbccddeef f". Note: Initialize whatever needs initialization Call Call B_RandomInit passing "randomObject" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "rsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate the key pair. Call Call B_GenerateKeypair passing "rsaKeyGen" and "rsaPublic" and "rsaPrivate" and "randomObject" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Test the key pair by performing an encryption & Note: decryption Note: using each key. Start with public encryption/private Note: decryption. Call Call B_EncryptInit passing "rsaPublicAlgorithm" and "rsaPublic" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "rsaPublicAlgorithm" and address of next free byte in buffer "intermediate" and address of "_OutputLen" and length of free bytes in buffer "intermediate" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "randomObject" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "intermediate" by "_OutputLen". Call B_EncryptFinal passing "rsaPublicAlgorithm" and address of next free byte in buffer "intermediate" and address of "_OutputLen" and length of free bytes in buffer "intermediate" and "randomObject" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 288 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "intermediate" by "_OutputLen". Finalize buffer "intermediate". Call Call B_DecryptInit passing "rsaPrivateAlgorithm" and "rsaPrivate" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "rsaPrivateAlgorithm" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "intermediate" and length of initialized bytes in buffer "intermediate" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "rsaPrivateAlgorithm" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Compare the original input against the Note: encrypted/decrypted output. Check equality of buffer "input" with contents of buffer "output". Note: Now do a private encryption/public decryption. Call Call B_EncryptInit passing "rsaPrivateAlgorithm" and "rsaPrivate" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "rsaPrivateAlgorithm" and address of next free byte in buffer "intermediate" and address of "_OutputLen" and length of free bytes in buffer "intermediate" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "randomObject" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "intermediate" by "_OutputLen". Call B_EncryptFinal passing "rsaPrivateAlgorithm" and address Baldwin Informational, Expires 12/25/1999 289 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of next free byte in buffer "intermediate" and address of "_OutputLen" and length of free bytes in buffer "intermediate" and "randomObject" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "intermediate" by "_OutputLen". Finalize buffer "intermediate". Call Call B_DecryptInit passing "rsaPublicAlgorithm" and "rsaPublic" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "rsaPublicAlgorithm" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "intermediate" and length of initialized bytes in buffer "intermediate" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "rsaPublicAlgorithm" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Compare the original input against the Note: encrypted/decrypted output. Check equality of buffer "input" with contents of buffer "output". Note: Now destroy all this hard work. Call Call B_DestroyAlgorithmObject passing "rsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rsaPrivateAlgorithm" . Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rsaPublicAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 290 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "randomObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "rsaPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "rsaPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. This is the end of test case "TLRSSTR1". This is the start of test case "TLDHKA01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Testing Diffie-Hellman Key Agreement for all prime Note: modulus sizes Note: Functional test starting from minimal key size to 1025 Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD2_RANDOM", "AM_DH_PARAM_GEN", "AM_DH_KEY_AGREE", "NULL_PTR". Note: Allocate space for storage arrays Create buffer "primeBits" of decimal value "4" bytes. Create buffer "exponentBits" of decimal value "4" bytes. Set buffer "primeBits" to hex value "0100". Set buffer "exponentBits" to hex value "f8". Create buffer "outputA" of decimal value "768" bytes. Create buffer "outputB" of decimal value "768" bytes. Create buffer "params" of decimal value "768" bytes. Create buffer "input" of decimal value "768" bytes. Baldwin Informational, Expires 12/25/1999 291 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Build a randomAlgorithm object Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "0102030405060708fffefdfcfbfaf9f 8". Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "input" and length of initialized bytes in "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: For complete test use Loop (1793, 0, 0), Note: IncrementData (primeBits, 1) and IncrementData Note: (exponentBits, 1) and Begin a loop of decimal value "37" iterations. Note: Setup Algorithm Objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "generateAlg". Call B_CreateAlgorithmObject passing "generateAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "generateAlgOutA". Call B_CreateAlgorithmObject passing "generateAlgOutA". Baldwin Informational, Expires 12/25/1999 292 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "generateAlgOutB". Call B_CreateAlgorithmObject passing "generateAlgOutB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DH parameters and transfer to public key Note: generator objects. Set "_InfoPointer" to address of info structure for "AI_DHParamGen" initialized from contents of buffer "primeBits", contents of buffer "exponentBits". Call B_SetAlgorithmInfo passing "generateAlg" and "AI_DHParamGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "generateAlg" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateParameters passing "generateAlg" and "DHAlgorithmA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Copy the parameter object Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgreeBER". Load buffer "params" from info structure for "AI_DHKeyAgreeBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "params". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate public key for first party. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" Baldwin Informational, Expires 12/25/1999 293 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: Generate public key for second party. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: Save the public key of first party for phase2 processing Note: of second party. Set buffer "input" to contents of buffer "outputA". Note: Each party now generates the shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 294 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Compare shared secret keys to test functional Note: correctness. Check equality of buffer "outputA" with contents of buffer "outputB". Note: Destroy algorithm objects. Call Call B_DestroyAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "generateAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "generateAlgOutA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "generateAlgOutB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment buffer "primeBits" by decimal value "7". Increment buffer "exponentBits" by decimal value "7". End the loop and display execution times. Begin a loop of decimal value "30" iterations. Note: Setup Algorithm Objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "generateAlg". Call B_CreateAlgorithmObject passing "generateAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 295 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "generateAlgOutA". Call B_CreateAlgorithmObject passing "generateAlgOutA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "generateAlgOutB". Call B_CreateAlgorithmObject passing "generateAlgOutB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DH parameters and transfer to public key Note: generator objects. Set "_InfoPointer" to address of info structure for "AI_DHParamGen" initialized from contents of buffer "primeBits", contents of buffer "exponentBits". Call B_SetAlgorithmInfo passing "generateAlg" and "AI_DHParamGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "generateAlg" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateParameters passing "generateAlg" and "DHAlgorithmA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Copy the parameter object Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgreeBER". Load buffer "params" from info structure for "AI_DHKeyAgreeBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "params". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate public key for first party. Baldwin Informational, Expires 12/25/1999 296 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: Generate public key for second party. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: Save the public key of first party for phase2 processing Note: of second party. Set buffer "input" to contents of buffer "outputA". Note: Each party now generates the shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 297 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: Compare shared secret keys to test functional Note: correctness. Check equality of buffer "outputA" with contents of buffer "outputB". Note: Destroy algorithm objects. Call Call B_DestroyAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "generateAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "generateAlgOutA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "generateAlgOutB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment buffer "primeBits" by decimal value "17". Increment buffer "exponentBits" by decimal value "17". End the loop and display execution times. Begin a loop of decimal value "16" iterations. Note: Setup Algorithm Objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "generateAlg". Call B_CreateAlgorithmObject passing "generateAlg". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 298 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "generateAlgOutA". Call B_CreateAlgorithmObject passing "generateAlgOutA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "generateAlgOutB". Call B_CreateAlgorithmObject passing "generateAlgOutB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DH parameters and transfer to public key Note: generator objects. Set "_InfoPointer" to address of info structure for "AI_DHParamGen" initialized from contents of buffer "primeBits", contents of buffer "exponentBits". Call B_SetAlgorithmInfo passing "generateAlg" and "AI_DHParamGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "generateAlg" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateParameters passing "generateAlg" and "DHAlgorithmA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Copy the parameter object Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgreeBER". Load buffer "params" from info structure for "AI_DHKeyAgreeBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "params". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 299 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Generate public key for first party. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: Generate public key for second party. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: Save the public key of first party for phase2 processing Note: of second party. Set buffer "input" to contents of buffer "outputA". Note: Each party now generates the shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 300 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: Compare shared secret keys to test functional Note: correctness. Check equality of buffer "outputA" with contents of buffer "outputB". Note: Destroy algorithm objects. Call Call B_DestroyAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "generateAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "generateAlgOutA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "generateAlgOutB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment buffer "primeBits" by decimal value "61". Increment buffer "exponentBits" by decimal value "61". End the loop and display execution times. Note: One last run at length 2048 Note: Setup Algorithm Objects Create algorithm object "DHAlgorithmA". Call B_CreateAlgorithmObject passing "DHAlgorithmA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "DHAlgorithmB". Call B_CreateAlgorithmObject passing "DHAlgorithmB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "generateAlg". Baldwin Informational, Expires 12/25/1999 301 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "generateAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "generateAlgOutA". Call B_CreateAlgorithmObject passing "generateAlgOutA". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "generateAlgOutB". Call B_CreateAlgorithmObject passing "generateAlgOutB". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DH parameters and transfer to public key Note: generator objects. Set "_InfoPointer" to address of info structure for "AI_DHParamGen" initialized from "2048", "2040". Call B_SetAlgorithmInfo passing "generateAlg" and "AI_DHParamGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "generateAlg" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateParameters passing "generateAlg" and "DHAlgorithmA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Copy the parameter object Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "DHAlgorithmA" and "AI_DHKeyAgreeBER". Load buffer "params" from info structure for "AI_DHKeyAgreeBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DHKeyAgreeBER" initialized from contents of buffer "params". Call B_SetAlgorithmInfo passing "DHAlgorithmB" and "AI_DHKeyAgreeBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 302 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: Generate public key for first party. Call Call B_KeyAgreeInit passing "DHAlgorithmA" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Note: Generate public key for second party. Call Call B_KeyAgreeInit passing "DHAlgorithmB" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_KeyAgreePhase1 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and "randomAlgorithm" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: Save the public key of first party for phase2 processing Note: of second party. Set buffer "input" to contents of buffer "outputA". Note: Each party now generates the shared secret key. Call B_KeyAgreePhase2 passing "DHAlgorithmA" and address of next free byte in buffer "outputA" and address of "_OutputLen" and length of free bytes in buffer "outputA" and address of first initialized byte in buffer "outputB" and length of initialized bytes in buffer "outputB" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputA" by "_OutputLen". Call B_KeyAgreePhase2 passing "DHAlgorithmB" and address of next free byte in buffer "outputB" and address of "_OutputLen" and length of free bytes in buffer "outputB" and address of first initialized byte in buffer "input" and length of Baldwin Informational, Expires 12/25/1999 303 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputB" by "_OutputLen". Note: Compare shared secret keys to test functional Note: correctness. Check equality of buffer "outputA" with contents of buffer "outputB". This is the end of test case "TLDHKA01". This is the start of test case "TLOAEP01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests, RSA key generation, raw RSA operations, Note: PKCS Note: RSA signatures and PKCS encryption and decryption. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RSA_KEY_GEN", "AM_RSA_ENCRYPT", "AM_RSA_DECRYPT", "AM_RSA_CRT_ENCRYPT", "AM_RSA_CRT_DECRYPT", "AM_MD2", "NULL_PTR". Note: Use the following random algorithm throughout. Create buffer "seed" of decimal value "1" bytes. Set buffer "seed" to hex value "00". Create algorithm object "randomObj". Call B_CreateAlgorithmObject passing "randomObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomObj" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomObj" and "_Chooser" and Baldwin Informational, Expires 12/25/1999 304 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomObj" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the following data object big enough to hold the Note: largest Note: possible input, which would be input for a 2048-bit key. Create buffer "inputZero" of decimal value "256" bytes. Set buffer "inputZero" to hex value "000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate an RSA key, then do some encryption and Note: decryption. Create buffer "modSize" of decimal value "2" bytes. Create buffer "inputSize" of decimal value "2" bytes. Create buffer "input" of decimal value "256" bytes. Create buffer "output" of decimal value "256" bytes. Create buffer "unput" of decimal value "256" bytes. Note: Initialize modulus size to 464 bits. Data is 16 bytes = Note: 128 bits Note: OAEP needs at least 336 bits of modulus in excess of the Note: data size. Note: 128 + 336 = 464 or 0x1d0. Note: Each outer loop will increment the data size by 1 byte (8 Note: bits). Set buffer "inputSize" to hex value "0f". Note: Each inner loop will increment the modulus size by 1. Baldwin Informational, Expires 12/25/1999 305 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "modSize" to hex value "01ef". Note: The outer loop's limit is 2048-464 / 8. Begin a loop of decimal value "194" iterations. Increment buffer "inputSize" by decimal value "1". Note: The inner loop count must be 8. Begin a loop of decimal value "8" iterations. Increment buffer "modSize" by decimal value "1". Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "keyGen". Call B_CreateAlgorithmObject passing "keyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAKeyGen" initialized from contents of buffer "modSize", "010001". Call B_SetAlgorithmInfo passing "keyGen" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "keyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate the keypair. Baldwin Informational, Expires 12/25/1999 306 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_GenerateKeypair passing "keyGen" and "publicKey" and "privateKey" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the modulus, then subtract by 1. Encrypt and decrypt Note: this value Note: using raw RSA, the result should be modulus - 1. Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Load buffer "input" from info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Decrement buffer "input" by decimal value "1". Note: Generate some random bytes Set "_OutputLen" to decimal value "10". Call B_GenerateRandomBytes passing "randomObj" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Note: PKCS OAEP RSA Note: Encrypt that data with the public key. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEP_RSAPublic" initialized from "sha1", "mgf1", "sha1", "specifiedParameters", "012345". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_PKCS_OAEP_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 307 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: PKCS OAEP RSA Note: Decrypt the output with the private key. Set "_InfoPointer" to address of info structure for "AI_PKCS_OAEP_RSAPrivate" initialized from "sha1", "mgf1", "sha1", "specifiedParameters", "012345". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_PKCS_OAEP_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "unput" with contents of buffer "input". Note: Destroy the objects for next loop. Baldwin Informational, Expires 12/25/1999 308 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "keyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TLOAEP01". This is the start of test case "TLRSEVN1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Long functional test for even exponents Note: AI_RSAStrongKeyGen, Note: KI_RSAPublic, KI_RSAPrivate Note: AI_FormatX931, AI_SignVerify Note: Depending on AI_DummyRandom algorithm Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DUMMY_RANDOM", "AM_FORMAT_X931", "AM_EXTRACT_X931", "AM_RSA_CRT_X931_ENCRYPT", "AM_RSA_X931_DECRYPT", "AM_RSA_STRONG_KEY_GEN", "NULL_PTR". Note: Create various objects Baldwin Informational, Expires 12/25/1999 309 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "signature" of decimal value "1024" bytes. Create buffer "modSize" of decimal value "10" bytes. Set buffer "modSize" to hex value "200". Create buffer "modByteSize" of decimal value "10" bytes. Set buffer "modByteSize" to hex value "40". Note: Set up random object for key generation Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "512" bytes. Set buffer "seed" to hex value "1857FA8D9D0B0E4E033B68CE401A416A 5C0DAB5E4CEB97EB9EEC". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set up random object for data signing Create algorithm object "dataSpring". Call B_CreateAlgorithmObject passing "dataSpring". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dataSpring" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "dataSpring" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 310 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_RandomUpdate passing "dataSpring" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Execute a loop that generates RSA key pairs and signs and Note: verifies data Begin a loop of decimal value "40" iterations. Create algorithm object "rsaKeyGen". Call B_CreateAlgorithmObject passing "rsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAStrongKeyGen" initialized from contents of buffer "modSize", "2". Call B_SetAlgorithmInfo passing "rsaKeyGen" and "AI_RSAStrongKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "rsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "rsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now use the generated key in signing and verifying Create algorithm object "x931RSASigner". Call B_CreateAlgorithmObject passing "x931RSASigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 311 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_SignVerify" initialized from "rsaSignX931", "0", "sha1", "0", "formatX931", contents of buffer "modByteSize", "3". Call B_SetAlgorithmInfo passing "x931RSASigner" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "x931RSAVerifier". Call B_CreateAlgorithmObject passing "x931RSAVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SignVerify" initialized from "rsaVerifyX931", "0", "sha1", "0", "formatX931", contents of buffer "modByteSize", "3". Call B_SetAlgorithmInfo passing "x931RSAVerifier" and "AI_SignVerify" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "10". Call B_GenerateRandomBytes passing "dataSpring" and address of next free byte in "seed" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "seed" by "_OutputLen". Finalize "seed". Display buffer "seed". Call Call B_SignInit passing "x931RSASigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "x931RSASigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "x931RSASigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 312 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the signature of the seed Call Call B_VerifyInit passing "x931RSAVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "x931RSAVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "x931RSAVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment buffer "modSize" by decimal value "16". Increment buffer "modByteSize" by decimal value "2". Call Call B_DestroyAlgorithmObject passing "x931RSAVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "x931RSASigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. This is the end of test case "TLRSEVN1". This is the start of test case "TLBSSH01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Baldwin Informational, Expires 12/25/1999 313 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: AI_BSSecretSharing Note: Test Bloom/Shamir secret sharing. Note: Functionally test Bloom/Shamir secret-sharing by Note: consecutively testing Note: the thresholding for 2, 3, ... 255. For each threshold k Note: we divide the Note: secret into k shares while simultaneously collecting each Note: of the shares Note: for secret recovery. After the k-th shares has been Note: produced and added Note: to the previous k-1 shares, the secret is then recovered Note: and then compared Note: to the original key for correctness. Note: This test is executed on two passwords by an outer loop. Note: --------------------------------- Note: Note: This is hardly a satisfactory test, but it's the Note: best one can do Note: with the current constructs in the btest interpreter. Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD2_RANDOM", "NULL_PTR". Create buffer "password" of decimal value "100" bytes. Create buffer "dummy" of decimal value "10" bytes. Create buffer "result" of decimal value "100" bytes. Create buffer "threshHold" of decimal value "10" bytes. Set buffer "password" with string value "password". Note: Make random algorithm Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD2Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 314 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Loop over two distint passwords Begin a loop of decimal value "2" iterations. Set buffer "threshHold" to hex value "01". Note: Looping over threshold values Begin a loop of decimal value "254" iterations. Increment buffer "threshHold" by decimal value "1". Note: Create "threshold" number of random bytes to be used in Note: creation Note: of random polynomial of degree "threshold - 1" Call B_RandomUpdate passing "random" and address of first initialized byte in "threshHold" and length of initialized bytes in "threshHold" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create share splitting object and initialize Create algorithm object "bssEncryptAlg". Call B_CreateAlgorithmObject passing "bssEncryptAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_BSSecretSharing" initialized from contents of buffer "threshHold". Call B_SetAlgorithmInfo passing "bssEncryptAlg" and "AI_BSSecretSharing" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "bssEncryptAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create share recovery object and initialize Create algorithm object "bssDecryptAlg". Call B_CreateAlgorithmObject passing "bssDecryptAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_BSSecretSharing" initialized from contents of buffer "threshHold". Call B_SetAlgorithmInfo passing "bssDecryptAlg" and "AI_BSSecretSharing" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "bssDecryptAlg" and "NULL_PTR" Baldwin Informational, Expires 12/25/1999 315 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create "threshold" secret shares, simultaneous collecting Note: info for secret Note: recovery. Begin a loop of contents of buffer "threshHold" iterations. Create buffer "part" of decimal value "500" bytes. Call B_EncryptUpdate passing "bssEncryptAlg" and address of next free byte in buffer "part" and address of "_OutputLen" and length of free bytes in buffer "part" and address of first initialized byte in buffer "password" and length of initialized bytes in buffer "password" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "part" by "_OutputLen". Call B_DecryptUpdate passing "bssDecryptAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "part" and length of initialized bytes in buffer "part" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". End the loop and display execution times. Call B_EncryptFinal passing "bssEncryptAlg" and address of next free byte in buffer "dummy" and address of "_OutputLen" and length of free bytes in buffer "dummy" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "dummy" by "_OutputLen". Finalize buffer "dummy". Call B_DecryptFinal passing "bssDecryptAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Finalize buffer "result". Note: Test to make sure that secret was properly recovered Check equality of buffer "password" with contents of buffer Baldwin Informational, Expires 12/25/1999 316 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "result". Call Call B_DestroyAlgorithmObject passing "bssEncryptAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "bssDecryptAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: End loop over threshold values End the loop and display execution times. Set buffer "password" to hex value "aabbccddeeff0011223344556677 8899abbacddceffe01102332455467768998ffffffffffffffff000000000000 01". End the loop and display execution times. This is the end of test case "TLBSSH01". This is the start of test case "TVR5WECB". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for Cipher Block Feedback using RC5/64 Note: and ECB feedback methods. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RC5_64ENCRYPT", "AM_RC5_64DECRYPT", "AM_ECB_ENCRYPT", "AM_ECB_DECRYPT", "NULL_PTR". Note: RC5 / 64 (128 bit block) Vector Tests Note: This script contains 4 vector tests. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Baldwin Informational, Expires 12/25/1999 317 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "32" bytes. Create buffer "unput" of decimal value "16" bytes. Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "00000000000000000000000000000 000". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "16" bytes. Set buffer "ciphertext1" to hex value "039c8d97d421151de99813bc9 08b09df". Create buffer "plaintext1" of decimal value "16" bytes. Set buffer "plaintext1" to hex value "00000000000000000000000000 000000". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 318 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 319 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext1" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-2 Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "000102030405060708090a0b0c0d0 e0f". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 320 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Create buffer "plaintext2" of decimal value "16" bytes. Set buffer "plaintext2" to hex value "00000000000000000000000000 000000". Create buffer "ciphertext2" of decimal value "16" bytes. Set buffer "ciphertext2" to hex value "ed3bce26f32adf4141f88b190 5d31b50". Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext2". Baldwin Informational, Expires 12/25/1999 321 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext2" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 322 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-3 Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "00000000000000000000000000000 000". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "plaintext3" of decimal value "16" bytes. Set buffer "plaintext3" to hex value "000102030405060708090a0b0c 0d0e0f". Create buffer "ciphertext3" of decimal value "16" bytes. Set buffer "ciphertext3" to hex value "dbccd45c6de1caf3183c2dfd0 4a82fa9". Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 323 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext3" and length of initialized bytes in buffer "plaintext3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext3". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 324 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext3" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 325 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test 01-4 Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "000102030405060708090a0b0c0d0 e0f". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "plaintext4" of decimal value "16" bytes. Set buffer "plaintext4" to hex value "000102030405060708090a0b0c 0d0e0f". Create buffer "ciphertext4" of decimal value "16" bytes. Set buffer "ciphertext4" to hex value "75da0d750094184e218622c0b fc16df0". Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext4" and length of Baldwin Informational, Expires 12/25/1999 326 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "plaintext4" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext4". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 327 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext4" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-5 Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "00000000000000000000000000000 000". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 328 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "plaintext4" of decimal value "16" bytes. Set buffer "plaintext4" to hex value "92f836ddb75bd33a247f93805a b485cd". Create buffer "ciphertext4" of decimal value "16" bytes. Set buffer "ciphertext4" to hex value "c24adf7f7a46747020c35c65e a29e7e0". Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext4" and length of initialized bytes in buffer "plaintext4" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext4". Baldwin Informational, Expires 12/25/1999 329 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext4" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 330 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-6 Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "ce9e07193fd8d69c9bab24b1686d7 565". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "plaintext4" of decimal value "16" bytes. Set buffer "plaintext4" to hex value "37983eee84dec31157aec92eae 3b3388". Create buffer "ciphertext4" of decimal value "16" bytes. Set buffer "ciphertext4" to hex value "0130ce147e8e611698e0610d1 b6a5bc3". Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 331 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext4" and length of initialized bytes in buffer "plaintext4" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext4". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 332 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext4" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 333 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-7 Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "37983eee84dec31157aec92eae3b3 388". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "plaintext4" of decimal value "16" bytes. Set buffer "plaintext4" to hex value "ed3bce26f32adf4141f88b1905 d31b50". Create buffer "ciphertext4" of decimal value "16" bytes. Set buffer "ciphertext4" to hex value "ce9e07193fd8d69c9bab24b16 86d7565". Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and Baldwin Informational, Expires 12/25/1999 334 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext4" and length of initialized bytes in buffer "plaintext4" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext4". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 335 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext4" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-8 Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "ed3bce26f32adf4141f88b1905d31 b50". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" Baldwin Informational, Expires 12/25/1999 336 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "plaintext4" of decimal value "16" bytes. Set buffer "plaintext4" to hex value "000102030405060708090a0b0c 0d0e0f". Create buffer "ciphertext4" of decimal value "16" bytes. Set buffer "ciphertext4" to hex value "37983eee84dec31157aec92ea e3b3388". Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext4" and length of initialized bytes in buffer "plaintext4" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 337 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext4". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ecb", "16", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext4" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 338 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVR5WECB". This is the start of test case "TFR5OFN1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for Cipher Block Feedback using RC5 and Note: OFB feedback methods Note: without padding. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC5_ENCRYPT", "AM_RC5_DECRYPT", "AM_OFB_ENCRYPT", "AM_OFB_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use the given input data, encrypt it, decrypt that output Note: and Note: compare the decryption result with the original input. Baldwin Informational, Expires 12/25/1999 339 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "input" of decimal value "8" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "8" bytes. Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "00000000000000000000000000000 000". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "plaintext" of decimal value "20" bytes. Set buffer "plaintext" to hex value "0000000000000000". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5", "1", "12", "32", "ofb", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 340 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5", "1", "12", "32", "ofb", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Baldwin Informational, Expires 12/25/1999 341 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TFR5OFN1". This is the start of test case "TFR5WOFN". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for Cipher Block Feedback using RC5/64 Note: and OFB feedback methods Note: without padding. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC5_64ENCRYPT", "AM_RC5_64DECRYPT", "AM_OFB_ENCRYPT", "AM_OFB_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use the given input data, encrypt it, decrypt that output Note: and Baldwin Informational, Expires 12/25/1999 342 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: compare the decryption result with the original input. Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "32" bytes. Create buffer "unput" of decimal value "16" bytes. Create buffer "keyData" of decimal value "16" bytes. Set buffer "keyData" to hex value "00000000000000000000000000000 000". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "plaintext" of decimal value "16" bytes. Set buffer "plaintext" to hex value "000000000000000000000000000 00000". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ofb", "00000000000000000000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 343 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", "12", "64", "ofb", "00000000000000000000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Baldwin Informational, Expires 12/25/1999 344 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Check the result. Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TFR5WOFN". This is the start of test case "TL3CFPPW". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on triple DES Note: and 64 bit Note: pipelined cfb with padding using reused encryption and Note: decryption objects. Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Baldwin Informational, Expires 12/25/1999 345 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "46" bytes. Create buffer "output" of decimal value "46" bytes. Create buffer "unput" of decimal value "46" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "dataLength" of decimal value "4" bytes. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "24". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 346 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "1", "cfb_pipelined", contents of buffer "initVector", "64", "pad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "1", "cfb_pipelined", contents of buffer "initVector", "64", "pad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "dataLength" to hex value "7". Begin a loop of decimal value "25" iterations. Note: Encrypt. Baldwin Informational, Expires 12/25/1999 347 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to contents of buffer "dataLength". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next Baldwin Informational, Expires 12/25/1999 348 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "input" with contents of buffer "unput". Increment buffer "dataLength" by decimal value "1". End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TL3CFPPW". This is the start of test case "TL3CFPS1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on triple DES Note: and 1 bit Note: pipelined cfb with reused encryption and decryption Note: objects. Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 349 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "16" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "24". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 350 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "1", "cfb_pipelined", contents of buffer "initVector", "1", "stream", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "1", "cfb_pipelined", contents of buffer "initVector", "1", "stream", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 351 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Begin a loop of decimal value "25" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "15". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first Baldwin Informational, Expires 12/25/1999 352 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "input" with contents of buffer "unput". End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TL3CFPS1". This is the start of test case "TL3DCFPW". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on triple DES Note: and 64 bit cfb Note: with padding using reused encryption and decryption Note: objects. Baldwin Informational, Expires 12/25/1999 353 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "46" bytes. Create buffer "output" of decimal value "46" bytes. Create buffer "unput" of decimal value "46" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "dataLength" of decimal value "4" bytes. Note: Generate random input bytes, a random init vector, and a Baldwin Informational, Expires 12/25/1999 354 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: random key. Set "_OutputLen" to decimal value "24". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "1", "cfb", contents of buffer "initVector", "64", "pad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 355 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "1", "cfb", contents of buffer "initVector", "64", "pad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "dataLength" to hex value "7". Begin a loop of decimal value "25" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to contents of buffer "dataLength". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 356 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "input" with contents of buffer "unput". Increment buffer "dataLength" by decimal value "1". End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TL3DCFPW". This is the start of test case "TL3DCFS1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Baldwin Informational, Expires 12/25/1999 357 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on triple DES Note: and 1 bit cfb with Note: reused encryption and decryption objects. Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "16" bytes. Baldwin Informational, Expires 12/25/1999 358 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "unput" of decimal value "16" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "24". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "1", "cfb", contents of buffer "initVector", "1", "stream", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 359 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "1", "cfb", contents of buffer "initVector", "1", "stream", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Begin a loop of decimal value "25" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "15". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Baldwin Informational, Expires 12/25/1999 360 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "input" with contents of buffer "unput". End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TL3DCFS1". Baldwin Informational, Expires 12/25/1999 361 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 This is the start of test case "TL3DCIP1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on triple DES Note: and interleaved Note: cbc with padding using reused encryption and decryption Note: objects. Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Baldwin Informational, Expires 12/25/1999 362 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "input" of decimal value "46" bytes. Create buffer "output" of decimal value "46" bytes. Create buffer "unput" of decimal value "46" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "dataLength" of decimal value "4" bytes. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "24". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "1", "cbc_interleaved", contents of buffer "initVector", "pad", "NULL". Baldwin Informational, Expires 12/25/1999 363 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "1", "cbc_interleaved", contents of buffer "initVector", "pad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "dataLength" to hex value "7". Begin a loop of decimal value "25" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to contents of buffer "dataLength". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 364 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "input" with contents of buffer "unput". Increment buffer "dataLength" by decimal value "1". End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Baldwin Informational, Expires 12/25/1999 365 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TL3DCIP1". This is the start of test case "TL5WCFPS". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on rc5/64 and Note: pipelined cfb with Note: reused encryption and decryption objects. Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 366 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "16" bytes. Create buffer "initVector" of decimal value "16" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "2" bytes. Create buffer "rounds" of decimal value "2" bytes. Create buffer "wordSize" of decimal value "2" bytes. Set buffer "wordSize" to hex value "40". Set buffer "rounds" to hex value "16". Set buffer "keyLen" to hex value "24". Note: Generate random input bytes, a random init vector, and a Note: random key. Display buffer "keyLen". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 367 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "cfb_pipelined", contents of buffer "initVector", "8", "stream", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "cfb_pipelined", contents of buffer "initVector", "8", "stream", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Begin a loop of decimal value "25" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "15". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 368 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "input" with contents of buffer "unput". End the loop and display execution times. Baldwin Informational, Expires 12/25/1999 369 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TL5WCFPS". This is the start of test case "TLR2CBN1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on rc2 with Note: all allowed key sizes Note: and using CBC without padding. Note: Original Script: tqrc2c05 Note: Depends on: Note: - KI_Item Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and Baldwin Informational, Expires 12/25/1999 370 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Setup data objects Create buffer "dataLen" of decimal value "2" bytes. Note: Hex 20 = 32 decimal. Set buffer "dataLen" to hex value "20". Create buffer "input" of contents of buffer "dataLen" bytes. Create buffer "output" of contents of buffer "dataLen" bytes. Create buffer "unput" of contents of buffer "dataLen" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "500" bytes. Create buffer "keyByteLen" of decimal value "2" bytes. Create buffer "effectiveKeyBits" of decimal value "2" bytes. Note: ---------------------------------------------------------- Note: ---------- Note: - For an 8 byte key, try effective key sizes from 1 to Note: 1024 bits Note: check that encryption equals decryption for 32 byte Note: input. Note: Generate new input data, key bytes and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Set buffer "effectiveKeyBits" to hex value "1". Set buffer "keyByteLen" to hex value "8". Begin a loop of decimal value "31" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 371 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Display buffer "effectiveKeyBits". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the effective number of key bits in the algorithm Note: objects. Display buffer "effectiveKeyBits". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "cbc", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and Baldwin Informational, Expires 12/25/1999 372 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "cbc", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next Baldwin Informational, Expires 12/25/1999 373 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next effective keysize. Increment buffer "effectiveKeyBits" by decimal value "32". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: - For an 80 bit effective keysize, try key byte length Note: from 1 to 128 Note: check that encryption equals decryption for 32 byte Note: input. Note: Generate new input data, key bytes and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Note: 50 hex == 80 decimal Baldwin Informational, Expires 12/25/1999 374 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "effectiveKeyBits" to hex value "50". Set buffer "keyByteLen" to hex value "1". Begin a loop of decimal value "15" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the effective number of key bits in the algorithm Note: objects. Display buffer "effectiveKeyBits". Baldwin Informational, Expires 12/25/1999 375 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "cbc", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "cbc", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 376 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next key byte length. Increment buffer "keyByteLen" by decimal value "8". End the loop and display execution times. Baldwin Informational, Expires 12/25/1999 377 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: - For key byte length from 1 to 128 by 1, and Note: for effective key size from 1 to 1024 by 1 Note: check that encryption equals decryption for 32 byte Note: input. Note: Use same input block and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Note: Use same input block and IV for each case. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Loop over number of key bytes. Set buffer "keyByteLen" to hex value "1". Begin a loop of decimal value "7" iterations. Note: Generate random key bytes. Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" Baldwin Informational, Expires 12/25/1999 378 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Loop over effective key bits. Set buffer "effectiveKeyBits" to hex value "1". Begin a loop of decimal value "15" iterations. Note: Set the effective number of key bits in the algorithm Note: objects. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "cbc", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "cbc", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first Baldwin Informational, Expires 12/25/1999 379 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the encryption and decryption objects. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 380 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next effective keysize. Increment buffer "effectiveKeyBits" by decimal value "64". End the loop and display execution times. Note: Advance to next key byte length. Increment buffer "keyByteLen" by decimal value "16". Note: Destroy the key object. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: Cleanup This is the end of test case "TLR2CBN1". This is the start of test case "TLR2OFN1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on rc2 with Note: all allowed key sizes Note: and using OFB without padding. Note: Original Script: tqrc2c05 Note: Depends on: Note: - KI_Item Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 381 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Setup data objects Create buffer "dataLen" of decimal value "2" bytes. Note: Hex 20 = 32 decimal. Set buffer "dataLen" to hex value "20". Create buffer "input" of contents of buffer "dataLen" bytes. Create buffer "output" of contents of buffer "dataLen" bytes. Create buffer "unput" of contents of buffer "dataLen" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "500" bytes. Create buffer "keyByteLen" of decimal value "2" bytes. Create buffer "effectiveKeyBits" of decimal value "2" bytes. Note: ---------------------------------------------------------- Note: ---------- Note: - For an 8 byte key, try effective key sizes from 1 to Note: 1024 bits Note: check that encryption equals decryption for 32 byte Note: input. Note: Generate new input data, key bytes and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Set buffer "effectiveKeyBits" to hex value "1". Set buffer "keyByteLen" to hex value "8". Begin a loop of decimal value "31" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Baldwin Informational, Expires 12/25/1999 382 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Display buffer "effectiveKeyBits". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the effective number of key bits in the algorithm Note: objects. Display buffer "effectiveKeyBits". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 383 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 384 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next effective keysize. Increment buffer "effectiveKeyBits" by decimal value "32". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: - For an 80 bit effective keysize, try key byte length Note: from 1 to 128 Note: check that encryption equals decryption for 32 byte Note: input. Baldwin Informational, Expires 12/25/1999 385 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Generate new input data, key bytes and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Note: 50 hex == 80 decimal Set buffer "effectiveKeyBits" to hex value "50". Set buffer "keyByteLen" to hex value "1". Begin a loop of decimal value "15" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 386 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Set the effective number of key bits in the algorithm Note: objects. Display buffer "effectiveKeyBits". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 387 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next key byte length. Baldwin Informational, Expires 12/25/1999 388 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment buffer "keyByteLen" by decimal value "8". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: - For key byte length from 1 to 128 by 1, and Note: for effective key size from 1 to 1024 by 1 Note: check that encryption equals decryption for 32 byte Note: input. Note: Use same input block and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Note: Use same input block and IV for each case. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Loop over number of key bytes. Set buffer "keyByteLen" to hex value "1". Begin a loop of decimal value "7" iterations. Note: Generate random key bytes. Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Create key object "key". Call B_CreateKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 389 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Loop over effective key bits. Set buffer "effectiveKeyBits" to hex value "1". Begin a loop of decimal value "15" iterations. Note: Set the effective number of key bits in the algorithm Note: objects. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 390 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the encryption and decryption objects. Baldwin Informational, Expires 12/25/1999 391 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next effective keysize. Increment buffer "effectiveKeyBits" by decimal value "64". End the loop and display execution times. Note: Advance to next key byte length. Increment buffer "keyByteLen" by decimal value "16". Note: Destroy the key object. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: Cleanup This is the end of test case "TLR2OFN1". This is the start of test case "TLR2OPN1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on rc2 with Note: all allowed key sizes Note: and using pipelined OFB without padding. Note: Original Script: tqrc2c05 Note: Depends on: Note: - KI_Item Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Baldwin Informational, Expires 12/25/1999 392 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Setup data objects Create buffer "dataLen" of decimal value "2" bytes. Note: Hex 20 = 32 decimal. Set buffer "dataLen" to hex value "20". Create buffer "input" of contents of buffer "dataLen" bytes. Create buffer "output" of contents of buffer "dataLen" bytes. Create buffer "unput" of contents of buffer "dataLen" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "500" bytes. Create buffer "keyByteLen" of decimal value "2" bytes. Create buffer "effectiveKeyBits" of decimal value "2" bytes. Note: ---------------------------------------------------------- Note: ---------- Note: - For an 8 byte key, try effective key sizes from 1 to Note: 1024 bits Note: check that encryption equals decryption for 32 byte Note: input. Note: Generate new input data, key bytes and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Set buffer "effectiveKeyBits" to hex value "1". Set buffer "keyByteLen" to hex value "8". Baldwin Informational, Expires 12/25/1999 393 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Begin a loop of decimal value "31" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Display buffer "effectiveKeyBits". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the effective number of key bits in the algorithm Note: objects. Display buffer "effectiveKeyBits". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Baldwin Informational, Expires 12/25/1999 394 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb_pipelined", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb_pipelined", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Baldwin Informational, Expires 12/25/1999 395 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next effective keysize. Increment buffer "effectiveKeyBits" by decimal value "32". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 396 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - For an 80 bit effective keysize, try key byte length Note: from 1 to 128 Note: check that encryption equals decryption for 32 byte Note: input. Note: Generate new input data, key bytes and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Note: 50 hex == 80 decimal Set buffer "effectiveKeyBits" to hex value "50". Set buffer "keyByteLen" to hex value "1". Begin a loop of decimal value "15" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 397 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the effective number of key bits in the algorithm Note: objects. Display buffer "effectiveKeyBits". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb_pipelined", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb_pipelined", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 398 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 399 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next key byte length. Increment buffer "keyByteLen" by decimal value "8". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: - For key byte length from 1 to 128 by 1, and Note: for effective key size from 1 to 1024 by 1 Note: check that encryption equals decryption for 32 byte Note: input. Note: Use same input block and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Note: Use same input block and IV for each case. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Loop over number of key bytes. Set buffer "keyByteLen" to hex value "1". Begin a loop of decimal value "7" iterations. Note: Generate random key bytes. Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Baldwin Informational, Expires 12/25/1999 400 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Set the key object. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Loop over effective key bits. Set buffer "effectiveKeyBits" to hex value "1". Begin a loop of decimal value "15" iterations. Note: Set the effective number of key bits in the algorithm Note: objects. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb_pipelined", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", contents of buffer "effectiveKeyBits", "ofb_pipelined", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Baldwin Informational, Expires 12/25/1999 401 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer Baldwin Informational, Expires 12/25/1999 402 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "unput". Note: Destroy the encryption and decryption objects. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next effective keysize. Increment buffer "effectiveKeyBits" by decimal value "64". End the loop and display execution times. Note: Advance to next key byte length. Increment buffer "keyByteLen" by decimal value "16". Note: Destroy the key object. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: Cleanup This is the end of test case "TLR2OPN1". This is the start of test case "TLR5CBN1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on rc5 with a Note: sequence of key Note: sizes and using CBC without padding. Note: Original Script: tqrc501 Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 403 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "8" bytes. Create buffer "output" of decimal value "8" bytes. Create buffer "unput" of decimal value "8" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "2" bytes. Create buffer "rounds" of decimal value "2" bytes. Create buffer "wordSize" of decimal value "2" bytes. Create buffer "wordIncrement" of decimal value "2" bytes. Set buffer "wordSize" to hex value "10". Set buffer "wordIncrement" to hex value "10". Note: The maximum outer loop count is 3. It changes the word Note: size. Baldwin Informational, Expires 12/25/1999 404 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: As of Oct. 25, 1995, BSAFE 3.0 only accepts a word size Note: of 32. Increment buffer "wordSize" by contents of buffer "wordIncrement". Begin a loop of decimal value "1" iterations. Set buffer "rounds" to hex value "00". Note: The maximum inner loop count is 256. It is for round Note: count. Begin a loop of decimal value "15" iterations. Set buffer "keyLen" to hex value "00". Note: The maximum inner-inner loop count is 256. It is for key Note: length. Begin a loop of decimal value "15" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Display buffer "keyLen". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 405 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5", "1", contents of buffer "rounds", contents of buffer "wordSize", "cbc", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Create algorithm object "decryptObj". Baldwin Informational, Expires 12/25/1999 406 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5", "1", contents of buffer "rounds", contents of buffer "wordSize", "cbc", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Baldwin Informational, Expires 12/25/1999 407 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Increment buffer "keyLen" by decimal value "16". End the loop and display execution times. Increment buffer "rounds" by decimal value "16". End the loop and display execution times. Increment buffer "wordSize" by contents of buffer "wordIncrement". Increment buffer "wordIncrement" by decimal value "16". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TLR5CBN1". This is the start of test case "TLR5SCB1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on rc5 64 bit Note: with a sequence Note: of key sizes and using CBC without padding. Note: Original Script: tqrc501 Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 408 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "16" bytes. Create buffer "initVector" of decimal value "16" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "2" bytes. Create buffer "rounds" of decimal value "2" bytes. Create buffer "wordSize" of decimal value "2" bytes. Create buffer "wordIncrement" of decimal value "2" bytes. Set buffer "wordSize" to hex value "40". Set buffer "wordIncrement" to hex value "10". Note: The maximum outer loop count is 3. It changes the word Note: size. Begin a loop of decimal value "1" iterations. Set buffer "rounds" to hex value "0c". Note: The maximum inner loop count is 256. It is for round Note: count. Begin a loop of decimal value "15" iterations. Set buffer "keyLen" to hex value "0b". Note: The maximum inner-inner loop count is 256. It is for key Note: length. Begin a loop of decimal value "15" iterations. Baldwin Informational, Expires 12/25/1999 409 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Display buffer "keyLen". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "cbc", contents Baldwin Informational, Expires 12/25/1999 410 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "cbc", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and Baldwin Informational, Expires 12/25/1999 411 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Increment buffer "keyLen" by decimal value "16". End the loop and display execution times. Increment buffer "rounds" by decimal value "16". End the loop and display execution times. Increment buffer "wordSize" by contents of buffer "wordIncrement". Increment buffer "wordIncrement" by decimal value "16". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 412 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 This is the end of test case "TLR5SCB1". This is the start of test case "TLR5WCBN". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on rc5/64 Note: with a sequence of key Note: sizes and using CBC without padding. Note: Original Script: tqrc501 Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Baldwin Informational, Expires 12/25/1999 413 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "16" bytes. Create buffer "initVector" of decimal value "16" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "2" bytes. Create buffer "rounds" of decimal value "2" bytes. Create buffer "wordSize" of decimal value "2" bytes. Create buffer "wordIncrement" of decimal value "2" bytes. Set buffer "wordSize" to hex value "40". Set buffer "wordIncrement" to hex value "40". Note: The maximum outer loop count is 3. It changes the word Note: size. Note: IncrementData (wordSize, @wordIncrement) Begin a loop of decimal value "1" iterations. Set buffer "rounds" to hex value "00". Note: The maximum inner loop count is 256. It is for round Note: count. Begin a loop of decimal value "15" iterations. Set buffer "keyLen" to hex value "00". Note: The maximum inner-inner loop count is 256. It is for key Note: length. Begin a loop of decimal value "15" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 414 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of "initVector" by "_OutputLen". Finalize "initVector". Display buffer "keyLen". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "cbc", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 415 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "cbc", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Baldwin Informational, Expires 12/25/1999 416 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Increment buffer "keyLen" by decimal value "10". End the loop and display execution times. Increment buffer "rounds" by decimal value "10". End the loop and display execution times. Increment buffer "wordSize" by contents of buffer "wordIncrement". Increment buffer "wordIncrement" by decimal value "16". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TLR5WCBN". This is the start of test case "TLR5WCFS". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on rc5/64 and Note: cfb with reused Note: encryption and decryption objects. Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Baldwin Informational, Expires 12/25/1999 417 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "16" bytes. Create buffer "initVector" of decimal value "16" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "2" bytes. Create buffer "rounds" of decimal value "2" bytes. Create buffer "wordSize" of decimal value "2" bytes. Set buffer "wordSize" to hex value "40". Set buffer "rounds" to hex value "16". Set buffer "keyLen" to hex value "24". Note: Generate random input bytes, a random init vector, and a Note: random key. Baldwin Informational, Expires 12/25/1999 418 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "keyLen". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "cfb", contents of buffer "initVector", "8", "stream", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 419 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "cfb", contents of buffer "initVector", "8", "stream", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Begin a loop of decimal value "25" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "15". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next Baldwin Informational, Expires 12/25/1999 420 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "input" with contents of buffer "unput". End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TLR5WCFS". This is the start of test case "TLR5WOFN". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on rc5/64 and Note: ofb with reused Baldwin Informational, Expires 12/25/1999 421 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: encryption and decryption objects. Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "16" bytes. Create buffer "initVector" of decimal value "16" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "2" bytes. Create buffer "rounds" of decimal value "2" bytes. Baldwin Informational, Expires 12/25/1999 422 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "wordSize" of decimal value "2" bytes. Set buffer "wordSize" to hex value "40". Set buffer "rounds" to hex value "16". Set buffer "keyLen" to hex value "24". Note: Generate random input bytes, a random init vector, and a Note: random key. Display buffer "keyLen". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "ofb", contents of buffer "initVector", "nopad", "NULL". Baldwin Informational, Expires 12/25/1999 423 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "ofb", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Begin a loop of decimal value "25" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 424 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 425 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TLR5WOFN". This is the start of test case "TMDSCFP6". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on DES and 64 Note: bit cfb Note: with padding using reused encryption and decryption Note: objects. Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Baldwin Informational, Expires 12/25/1999 426 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "46" bytes. Create buffer "output" of decimal value "46" bytes. Create buffer "unput" of decimal value "46" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "dataLength" of decimal value "4" bytes. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 427 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "64", "cfb", contents of buffer "initVector", "64", "pad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "64", "cfb", contents of buffer "initVector", "64", "pad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "dataLength" to hex value "25". Display buffer "dataLength". Create buffer "loopIndex" of decimal value "4" bytes. Set buffer "loopIndex" to hex value "0". Begin a loop of decimal value "400" iterations. Increment buffer "loopIndex" by decimal value "1". Display buffer "loopIndex". Begin a loop of decimal value "2500" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to contents of buffer "dataLength". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 428 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "input" with contents of buffer "unput". End the loop and display execution times. End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 429 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TMDSCFP6". This is the start of test case "TMDSCFP8". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on DES and 8 Note: bit cfb Note: with padding using reused encryption and decryption Note: objects. Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in Baldwin Informational, Expires 12/25/1999 430 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "46" bytes. Create buffer "output" of decimal value "46" bytes. Create buffer "unput" of decimal value "46" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "dataLength" of decimal value "4" bytes. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 431 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "8", "cfb", contents of buffer "initVector", "64", "pad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "8", "cfb", contents of buffer "initVector", "64", "pad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "dataLength" to hex value "25". Display buffer "dataLength". Begin a loop of decimal value "400" iterations. Begin a loop of decimal value "2500" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to contents of buffer "dataLength". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next Baldwin Informational, Expires 12/25/1999 432 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "input" with contents of buffer "unput". End the loop and display execution times. End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 433 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TMDSCFP8". This is the start of test case "TMDSCFS1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on DES and 1 Note: bit cfb with Note: reused encryption and decryption objects. Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 434 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "16" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 435 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "1", "cfb", contents of buffer "initVector", "1", "stream", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "1", "cfb", contents of buffer "initVector", "1", "stream", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Begin a loop of decimal value "400" iterations. Begin a loop of decimal value "2500" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "15". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Baldwin Informational, Expires 12/25/1999 436 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "input" with contents of buffer "unput". End the loop and display execution times. End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 437 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TMDSCFS1". This is the start of test case "TMDSCIP2". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on DES and Note: interleaved Note: cbc with padding using reused encryption and decryption Note: objects. Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 438 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "46" bytes. Create buffer "output" of decimal value "46" bytes. Create buffer "unput" of decimal value "46" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "dataLength" of decimal value "4" bytes. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "8". Baldwin Informational, Expires 12/25/1999 439 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "1", "cbc_interleaved", contents of buffer "initVector", "pad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "1", "cbc_interleaved", contents of buffer "initVector", "pad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "dataLength" to hex value "25". Begin a loop of decimal value "400" iterations. Begin a loop of decimal value "2500" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to contents of buffer "dataLength". Call B_GenerateRandomBytes passing "random" and address of next Baldwin Informational, Expires 12/25/1999 440 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "input" with contents of buffer "unput". End the loop and display execution times. Baldwin Informational, Expires 12/25/1999 441 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TMDSCIP2". This is the start of test case "TMR5WOFN". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_FeedbackCipher based on rc5/64 and Note: ofb with reused Note: encryption and decryption objects. Note: ---------------------------------------------------------- Note: ---------- Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 442 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "16" bytes. Create buffer "initVector" of decimal value "16" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "2" bytes. Create buffer "rounds" of decimal value "2" bytes. Create buffer "wordSize" of decimal value "2" bytes. Set buffer "wordSize" to hex value "40". Set buffer "rounds" to hex value "16". Set buffer "keyLen" to hex value "24". Note: Generate random input bytes, a random init vector, and a Note: random key. Display buffer "keyLen". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Baldwin Informational, Expires 12/25/1999 443 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Create encryption/decryption objects and set algorithm Note: info Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "ofb", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5_64", "1", contents of buffer "rounds", contents of buffer "wordSize", "ofb", contents of buffer "initVector", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 444 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Begin a loop of decimal value "400" iterations. Begin a loop of decimal value "2500" iterations. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 445 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". End the loop and display execution times. End the loop and display execution times. Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TMR5WOFN". This is the start of test case "TV3CBIN0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using Triple DES Note: together with Note: interleaved CBC and no padding. Vectors were extracted Note: from X9.52 standard. Note: ---------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 446 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_CFB_ENCRYPT", "AM_CFB_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Set buffer "ciphertext1" to hex value "0EF198BE0DA40F4D03649EFA6 872A717E6B15686748A11401933FB0C744581C10364E942DF9A4B74901E57CCB 671CEBC". Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the time for all good men to come to the ". Create algorithm object "encryptObj". Baldwin Informational, Expires 12/25/1999 447 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc_interleaved", "0000000000055555", "nopad", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc_interleaved", "0000000000055555", "nopad", "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 448 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Display buffer "unput". Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 449 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------- This is the end of test case "TV3CBIN0". This is the start of test case "TV3CBRI0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for Cipher Block Feedback using Triple Note: DES together with CBC Note: and no padding. Also tested the reinitialization Note: function. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_CFB_ENCRYPT", "AM_CFB_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Baldwin Informational, Expires 12/25/1999 450 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "ciphertext1" to hex value "F3C0FF026C023089656FBB169 DEF7EDB30BA36075D6F0176". Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the ti". Create buffer "plaintext1" of decimal value "80" bytes. Set buffer "plaintext1" with string value "me for all ". Create buffer "fullPlaintext" of decimal value "80" bytes. Set buffer "fullPlaintext" with string value "Now is the time for all ". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc", "1234567890ABCDEF", "nopad", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Set "_InfoPointer" to address of info structure for "AI_RESET_IV" initialized from "00000000EFAB23EF". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RESET_IV" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 451 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc", "1234567890ABCDEF", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 452 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Display buffer "unput". Check equality of buffer "fullPlaintext" with contents of buffer "unput". Note: Test to see if reinitizalition worked correctly. Data Note: derived from Note: symcbc\tvds3p00 script. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keyData" to hex value "0123456789ABCDEF0123456789ABC DEF0123456789ABCDEF". Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "plaintext" to hex value "6789ABCDEF012345". Set buffer "ciphertext1" to hex value "fc624960b90f7a7d". Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and Baldwin Informational, Expires 12/25/1999 453 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Set "_InfoPointer" to address of info structure for "AI_RESET_IV" initialized from "00000000EFAB23EF". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RESET_IV" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 454 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TV3CBRI0". This is the start of test case "TV3CFPN2". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using Triple DES Note: together with Note: CFB_pipelined Note: with a transfer size of 64 bits in no padding mode. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_CFB_PIPELINED_ENCRYPT", "AM_CFB_PIPELINED_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Baldwin Informational, Expires 12/25/1999 455 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Set buffer "ciphertext1" to hex value "6E664F920A9DF1E4E570C5631 10DA5248AB3D43134FC9101FF8E23D1B73E30543DEAABACDD241043449EED61D 7589148". Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the time for all good men to come to the ". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cfb_pipelined", "0000000000055555", "64", "nopad", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 456 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cfb_pipelined", "0000000000055555", "64", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Baldwin Informational, Expires 12/25/1999 457 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Check the result. Display buffer "unput". Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TV3CFPN2". This is the start of test case "TV3CFPS0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using Triple DES Note: together with Note: CFB_pipelined Note: with a transfer size of 8 bits in streaming mode. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_CFB_PIPELINED_ENCRYPT", "AM_CFB_PIPELINED_DECRYPT", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 458 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Set buffer "ciphertext1" to hex value "6EE29BF123180889FC4C". Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cfb_pipelined", "0000000000055555", "8", "stream", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and Baldwin Informational, Expires 12/25/1999 459 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cfb_pipelined", "0000000000055555", "8", "stream", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 460 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Display buffer "unput". Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TV3CFPS0". This is the start of test case "TV3CFPS1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using Triple DES Note: together with Note: CFB_pipelined Note: with a transfer size of 1 bit in streaming mode. Vectors Note: were extracted Baldwin Informational, Expires 12/25/1999 461 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: from the X9.52 standard. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_CFB_PIPELINED_ENCRYPT", "AM_CFB_PIPELINED_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Set buffer "ciphertext1" to hex value "372CD5". Create buffer "plaintext" of decimal value "80" bytes. Baldwin Informational, Expires 12/25/1999 462 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "plaintext" with string value "Now". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cfb_pipelined", "0000000000055555", "1", "stream", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "1", "cfb_pipelined", "0000000000055555", "1", "stream", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and Baldwin Informational, Expires 12/25/1999 463 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Display buffer "unput". Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 464 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TV3CFPS1". This is the start of test case "TV3DCBN0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using Triple DES Note: together with CBC Note: and no padding. Vectors were extracted from X9.52 Note: standard. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_CFB_ENCRYPT", "AM_CFB_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 465 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Set buffer "ciphertext1" to hex value "F3C0FF026C023089656FBB169 DEF7EDB30BA36075D6F0176". Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the time for all ". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc", "1234567890ABCDEF", "nopad", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Baldwin Informational, Expires 12/25/1999 466 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc", "1234567890ABCDEF", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Display buffer "unput". Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 467 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TV3DCBN0". This is the start of test case "TV3DCFN2". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using Triple DES Note: together with CFB Note: with a transfer size of 64 bits in no padding mode. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_CFB_ENCRYPT", "AM_CFB_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE Baldwin Informational, Expires 12/25/1999 468 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Set buffer "ciphertext1" to hex value "EE7EC75C1A101301C4AB2F104 62E5DD417400B445B5F2A72". Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the time for all ". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cfb", "1234567890ABCDEF", "64", "nopad", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and Baldwin Informational, Expires 12/25/1999 469 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cfb", "1234567890ABCDEF", "64", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Display buffer "unput". Baldwin Informational, Expires 12/25/1999 470 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TV3DCFN2". This is the start of test case "TV3DCFS0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using Triple DES Note: together with CFB Note: with a transfer size of 8 bits in streaming mode. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_CFB_ENCRYPT", "AM_CFB_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 471 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test 01-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Set buffer "ciphertext1" to hex value "EE9B04FFCACEC8067060". Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cfb", "1234567890ABCDEF", "8", "stream", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of Baldwin Informational, Expires 12/25/1999 472 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cfb", "1234567890ABCDEF", "8", "stream", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 473 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Display buffer "unput". Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TV3DCFS0". This is the start of test case "TV3DCFS1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using Triple DES Note: together with CFB Note: with a transfer size of 1 bit in streaming mode. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Baldwin Informational, Expires 12/25/1999 474 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_CFB_ENCRYPT", "AM_CFB_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Set buffer "ciphertext1" to hex value "D9E64B". Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cfb", "1234567890ABCDEF", "1", "stream", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 475 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cfb", "1234567890ABCDEF", "1", "stream", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 476 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Display buffer "unput". Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TV3DCFS1". This is the start of test case "TV3DECN0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using Triple DES Note: together with ECB Note: and no padding. Vectors were extracted from X9.52 Note: standard. Baldwin Informational, Expires 12/25/1999 477 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_CFB_ENCRYPT", "AM_CFB_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Set buffer "ciphertext1" to hex value "314F8327FA7A09A84362760CC 13BA7DAFF55C5F80FAAAC45". Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the time for all ". Create algorithm object "encryptObj". Baldwin Informational, Expires 12/25/1999 478 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "ecb", "8", "nopad", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "ecb", "8", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 479 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Display buffer "unput". Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 480 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------- This is the end of test case "TV3DECN0". This is the start of test case "TV3DOFP0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for Cipher Block Feedback using Triple Note: DES and OFB feedback Note: methods without padding. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_OFB_PIPELINED_ENCRYPT", "AM_OFB_PIPELINED_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Using supplied input data, encrypt it and compare to the Note: test vector, Note: decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 481 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Set buffer "ciphertext1" to hex value "6E664F920A9DF1E4E570C5631 10DA5248AB3D43134FC9101B73C082134D1CE8139F838BBCD2D99AA9EB49AFAA 8699D8C". Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the time for all good men to come to the ". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "0", "ofb_pipelined", "0000000000055555", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer Baldwin Informational, Expires 12/25/1999 482 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "0", "ofb_pipelined", "0000000000055555", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Baldwin Informational, Expires 12/25/1999 483 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TV3DOFP0". This is the start of test case "TV3OFBN0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for Cipher Block Feedback using Triple Note: DES and OFB feedback Note: methods without padding. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_OFB_ENCRYPT", "AM_OFB_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Using supplied input data, encrypt it and compare to the Note: test vector, Note: decrypt that output and Note: compare the decryption result with the original input. Create buffer "output" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Baldwin Informational, Expires 12/25/1999 484 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "80" bytes. Set buffer "ciphertext1" to hex value "EE7EC75C1A1013019A8A61000 2668E0787E28AF9EC26B889". Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the time for all ". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "0", "ofb", "1234567890ABCDEF", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 485 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "0", "ofb", "1234567890ABCDEF", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Baldwin Informational, Expires 12/25/1999 486 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Check the result. Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TV3OFBN0". This is the start of test case "TVDSCBP0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_FeedbackCipher using DES with CBC and Note: padding. Note: Depends on: Note: AI_FeedbackCipher Note: Test cases: Note: - For 8 byte input, first block matches DES_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Note: - For inputs ranging from 0 to 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DES_ENCRYPT", "AM_DES_DECRYPT", "AM_CBC_ENCRYPT", "AM_CBC_DECRYPT", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 487 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "6789ABCDEF012345". Set buffer "ciphertext1" to hex value "fc624960b90f7a7d". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Note: ------------------------------------------------------- Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptNoPad". Call B_CreateAlgorithmObject passing "decryptNoPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 488 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "0", "cbc", "00000000EFAB23EF", "pad", "NULL". Call B_SetAlgorithmInfo passing "encrypter" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "0", "cbc", "00000000EFAB23EF", "pad", "NULL". Call B_SetAlgorithmInfo passing "decrypter" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "0", "cbc", "00000000EFAB23EF", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptNoPad" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptNoPad" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - For 8 byte input, first block matches DES_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 489 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "fc624960b90f7a7d2551005f74269110". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 490 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "6789abcdef0123450808080808080808". Set length of buffer "encryptedtext" to decimal value "8". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Set length of buffer "decryptedtext" to decimal value "8". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: Setup plaintext array Set buffer "plaintext" to hex value "010203040506070809101112131 41516". Note: ------------------------------------------------------- Note: - For input of length 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "16". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdfe7886e07ebd3b3df47d8b20e93909b58". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length Baldwin Informational, Expires 12/25/1999 491 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "010203040506070809101112131415160808080808080808". Note: ------------------------------------------------------- Note: - For input of length 15 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "15". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of Baldwin Informational, Expires 12/25/1999 492 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdff52a136d17a87e8f". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 493 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141501". Note: ------------------------------------------------------- Note: - For input of length 14 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "14". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf9ff22b5301f5ba69". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 494 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213140202". Note: ------------------------------------------------------- Note: - For input of length 13 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "13". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and Baldwin Informational, Expires 12/25/1999 495 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf7ac916277cc636ef". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value Baldwin Informational, Expires 12/25/1999 496 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "01020304050607080910111213030303". Note: ------------------------------------------------------- Note: - For input of length 12 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "12". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdfe204db2a32a7b8c8". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 497 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111204040404". Note: ------------------------------------------------------- Note: - For input of length 11 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "11". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf287f784d76357583". Baldwin Informational, Expires 12/25/1999 498 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910110505050505". Note: ------------------------------------------------------- Note: - For input of length 10 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "10". Baldwin Informational, Expires 12/25/1999 499 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf4c58ea5623cd0b5b". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 500 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910060606060606". Note: ------------------------------------------------------- Note: - For input of length 09 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "09". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdfd784a16124df7747". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 501 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080907070707070707". Note: ------------------------------------------------------- Note: - For input of length 08 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "08". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 502 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf9a19483adb5c2975". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 503 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080808080808080808". Note: ------------------------------------------------------- Note: - For input of length 07 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "07". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "977c3a184fa1e78d". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 504 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060701". Note: ------------------------------------------------------- Note: - For input of length 6 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "6". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 505 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "d1aee6c6fae1828b". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060202". Note: ------------------------------------------------------- Note: - For input of length 5 bytes, check that Note: - Encrypt and Decrypt are inverses. Baldwin Informational, Expires 12/25/1999 506 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "5". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "a5ef9a711de975ca". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length Baldwin Informational, Expires 12/25/1999 507 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405030303". Note: ------------------------------------------------------- Note: - For input of length 4 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "4". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "a429c178f9a65553". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length Baldwin Informational, Expires 12/25/1999 508 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030404040404". Note: ------------------------------------------------------- Note: - For input of length 3 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "3". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 509 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "b53a1c038d1b89cd". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 510 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030505050505". Note: ------------------------------------------------------- Note: - For input of length 2 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "2". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "0d00d9d7ca3c98a4". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 511 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102060606060606". Note: ------------------------------------------------------- Note: - For input of length 1 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "1". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 512 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "c3f1ba84fb6e4664". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0107070707070707". Baldwin Informational, Expires 12/25/1999 513 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: - For input of length 0 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "0". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "d470869b58d76fad". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 514 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0808080808080808". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDSCBP0". This is the start of test case "TVDSECN0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Tests AI_FeedbackCipher using DES in ECB mode and no Note: padding. Note: Test cases: Note: - The NIST test vectors for DES ECB. Note: Depends on: Note: - AI_FeedbackCipher Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DES_ENCRYPT", "AM_DES_DECRYPT", "AM_ECB_ENCRYPT", "AM_ECB_DECRYPT", "NULL_PTR". Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 515 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "0", "ecb", "8", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encrypter" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "0", "ecb", "8", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decrypter" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 0 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "8CA64DE9C1B123A7". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Baldwin Informational, Expires 12/25/1999 516 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 517 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 1 Set buffer "keytext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "7359B2163E4EDC58". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 518 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 2 Set buffer "keytext" to hex value "3000000000000000". Set buffer "plaintext" to hex value "1000000000000001". Set buffer "ciphertext" to hex value "958E6E627A05557B". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" Baldwin Informational, Expires 12/25/1999 519 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 520 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 3 Set buffer "keytext" to hex value "1111111111111111". Set buffer "plaintext" to hex value "1111111111111111". Set buffer "ciphertext" to hex value "F40379AB9E0EC533". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 521 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 4 Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "1111111111111111". Set buffer "ciphertext" to hex value "17668DFC7292532D". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" Baldwin Informational, Expires 12/25/1999 522 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 523 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 5 Set buffer "keytext" to hex value "1111111111111111". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "8A5AE1F81AB8F2DD". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 524 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 6 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "8CA64DE9C1B123A7". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Baldwin Informational, Expires 12/25/1999 525 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 526 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 7 Set buffer "keytext" to hex value "FEDCBA9876543210". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "ED39D950FA74BCC4". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 527 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 8 Set buffer "keytext" to hex value "7CA110454A1A6E57". Set buffer "plaintext" to hex value "01A1D6D039776742". Set buffer "ciphertext" to hex value "690F5B0D9A26939B". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and Baldwin Informational, Expires 12/25/1999 528 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 529 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 9 Set buffer "keytext" to hex value "0131D9619DC1376E". Set buffer "plaintext" to hex value "5CD54CA83DEF57DA". Set buffer "ciphertext" to hex value "7A389D10354BD271". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 530 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 10 Set buffer "keytext" to hex value "07A1133E4A0B2686". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "ciphertext" to hex value "868EBB51CAB4599A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 531 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 532 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 11 Set buffer "keytext" to hex value "3849674C2602319E". Set buffer "plaintext" to hex value "51454B582DDF440A". Set buffer "ciphertext" to hex value "7178876E01F19B2A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Baldwin Informational, Expires 12/25/1999 533 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 12 Set buffer "keytext" to hex value "04B915BA43FEB5B6". Set buffer "plaintext" to hex value "42FD443059577FA2". Set buffer "ciphertext" to hex value "AF37FB421F8C4095". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 534 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 535 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 13 Set buffer "keytext" to hex value "0113B970FD34F2CE". Set buffer "plaintext" to hex value "059B5E0851CF143A". Set buffer "ciphertext" to hex value "86A560F10EC6D85B". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 536 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 14 Set buffer "keytext" to hex value "0170F175468FB5E6". Set buffer "plaintext" to hex value "0756D8E0774761D2". Set buffer "ciphertext" to hex value "0CD3DA020021DC09". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 537 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 538 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 15 Set buffer "keytext" to hex value "43297FAD38E373FE". Set buffer "plaintext" to hex value "762514B829BF486A". Set buffer "ciphertext" to hex value "EA676B2CB7DB2B7A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 539 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 16 Set buffer "keytext" to hex value "07A7137045DA2A16". Set buffer "plaintext" to hex value "3BDD119049372802". Set buffer "ciphertext" to hex value "DFD64A815CAF1A0F". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 540 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 541 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 17 Set buffer "keytext" to hex value "04689104C2FD3B2F". Set buffer "plaintext" to hex value "26955F6835AF609A". Set buffer "ciphertext" to hex value "5C513C9C4886C088". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 542 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 18 Set buffer "keytext" to hex value "37D06BB516CB7546". Set buffer "plaintext" to hex value "164D5E404F275232". Set buffer "ciphertext" to hex value "0A2AEEAE3FF4AB77". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and Baldwin Informational, Expires 12/25/1999 543 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 544 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 19 Set buffer "keytext" to hex value "1F08260D1AC2465E". Set buffer "plaintext" to hex value "6B056E18759F5CCA". Set buffer "ciphertext" to hex value "EF1BF03E5DFA575A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and Baldwin Informational, Expires 12/25/1999 545 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 20 Set buffer "keytext" to hex value "584023641ABA6176". Set buffer "plaintext" to hex value "004BD6EF09176062". Set buffer "ciphertext" to hex value "88BF0DB6D70DEE56". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 546 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 547 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 21 Set buffer "keytext" to hex value "025816164629B007". Set buffer "plaintext" to hex value "480D39006EE762F2". Set buffer "ciphertext" to hex value "A1F9915541020B56". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 548 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 22 Set buffer "keytext" to hex value "49793EBC79B3258F". Set buffer "plaintext" to hex value "437540C8698F3CFA". Set buffer "ciphertext" to hex value "6FBF1CAFCFFD0556". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 549 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 550 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 23 Set buffer "keytext" to hex value "4FB05E1515AB73A7". Set buffer "plaintext" to hex value "072D43A077075292". Set buffer "ciphertext" to hex value "2F22E49BAB7CA1AC". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 551 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 24 Set buffer "keytext" to hex value "49E95D6D4CA229BF". Set buffer "plaintext" to hex value "02FE55778117F12A". Set buffer "ciphertext" to hex value "5A6B612CC26CCE4A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 552 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 553 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Test case 25 Set buffer "keytext" to hex value "018310DC409B26D6". Set buffer "plaintext" to hex value "1D9D5C5018F728C2". Set buffer "ciphertext" to hex value "5F4C038ED12B2E41". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 554 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 26 Set buffer "keytext" to hex value "1C587F1C13924FEF". Set buffer "plaintext" to hex value "305532286D6F295A". Set buffer "ciphertext" to hex value "63FAC0D034D9F793". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 555 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 556 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Test case 27 Set buffer "keytext" to hex value "0101010101010101". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "617B3A0CE8F07100". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 557 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 28 Set buffer "keytext" to hex value "1F1F1F1F0E0E0E0E". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "DB958605F8C8C606". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 558 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 559 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test case 29 Set buffer "keytext" to hex value "E0FEE0FEF1FEF1FE". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "EDBFD1C66C29CCC7". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 560 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 30 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "355550B2150E2451". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 561 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 31 Baldwin Informational, Expires 12/25/1999 562 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keytext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "CAAAAF4DEAF1DBAE". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 563 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 32 Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "D5D44FF720683D0D". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address Baldwin Informational, Expires 12/25/1999 564 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 33 Baldwin Informational, Expires 12/25/1999 565 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keytext" to hex value "FEDCBA9876543210". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "2A2BB008DF97C2F2". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 566 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVDSECN0". This is the start of test case "TVDXCBN0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_FeedbackCipher using DESX with CBC Note: without padding. Note: Assuming that DESX CBC is tested elsewhere, just test the Note: input and output whitening mechanism. Note: Depends on: Note: - AI_FeedbackCipher Note: Test cases: Baldwin Informational, Expires 12/25/1999 567 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Check single block matching DES and DESX keys for zero Note: IV. Note: - Check single block DESX result against DES for non-zero Note: input whitening. Note: - Check single block DESX result against DES for non-zero Note: output whitening. Note: - Check single block DESX result against DES for non-zero Note: input and output whitening (not equal to each other). Note: - Test vector for input of length 16 and non-zero I&O Note: whitening. Note: - Test vector for input of length 24 and non-zero I&O Note: whitening. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DES_ENCRYPT", "AM_DESX_ENCRYPT", "AM_DESX_DECRYPT", "AM_CBC_ENCRYPT", "AM_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "keytextDES" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "plaintextDES" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "ciphertextDES" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "encryptedtextDES" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterDES". Call B_CreateAlgorithmObject passing "encrypterDES". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 568 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "desx", "0", "cbc", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encrypter" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des", "0", "cbc", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encrypterDES" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "desx", "0", "cbc", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decrypter" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check single block matching DES and DESX keys for zero Note: IV. Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "keytext" to hex value "07A1133E4A0B26860000000000000 0000000000000000000". Set buffer "ciphertext" to hex value "868EBB51CAB4599A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and Baldwin Informational, Expires 12/25/1999 569 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 570 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check single block DESX result against DES for non-zero Note: input whitening. Set buffer "keytextDES" to hex value "07A1133E4A0B2686". Set buffer "keytext" to hex value "07A1133E4A0B26860100000010F08 E400000000000000000". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "plaintextDES" to hex value "0348D4381606FF32". Note: Compute result using plain DES Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytextDES". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypterDES" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and address of first initialized byte in buffer "plaintextDES" and length of initialized bytes in buffer "plaintextDES" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextDES" by "_OutputLen". Call B_EncryptFinal passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 571 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtextDES" by "_OutputLen". Finalize buffer "encryptedtextDES". Display buffer "encryptedtextDES". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "encryptedtextDES". Baldwin Informational, Expires 12/25/1999 572 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check single block DESX result against DES for non-zero Note: output whitening. Set buffer "keytextDES" to hex value "07A1133E4A0B2686". Set buffer "keytext" to hex value "07A1133E4A0B26860000000000000 0000100000010F08E40". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "plaintextDES" to hex value "0248D43806F67172". Set buffer "ciphertextDES" to hex value "868ebb51cab4599a". Set buffer "ciphertextDES" to hex value "878ebb51da44d7da". Note: Compute result using plain DES Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytextDES". Baldwin Informational, Expires 12/25/1999 573 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypterDES" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and address of first initialized byte in buffer "plaintextDES" and length of initialized bytes in buffer "plaintextDES" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextDES" by "_OutputLen". Call B_EncryptFinal passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextDES" by "_OutputLen". Finalize buffer "encryptedtextDES". Display buffer "encryptedtextDES". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 574 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertextDES". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 575 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check single block DESX result against DES for non-zero Note: input and output whitening (not equal to each other). Set buffer "keytextDES" to hex value "07A1133E4A0B2686". Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "plaintextDES" to hex value "1249D53907F77062". Set buffer "ciphertextDES" to hex value "0d461502f0e8bd06". Set buffer "ciphertextDES" to hex value "0d471706f8f89d46". Note: Compute result using plain DES Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytextDES". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypterDES" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and address of first initialized byte in buffer "plaintextDES" and length of initialized bytes in buffer "plaintextDES" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextDES" by "_OutputLen". Call B_EncryptFinal passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 576 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextDES" by "_OutputLen". Finalize buffer "encryptedtextDES". Display buffer "encryptedtextDES". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertextDES". Baldwin Informational, Expires 12/25/1999 577 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test vector for input of length 16 and non-zero I&O Note: whitening. Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F6717207A1133E4A0 B2686". Set buffer "ciphertext" to hex value "0d471706f8f89d46ea5f3c3bb9 a8d600". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Baldwin Informational, Expires 12/25/1999 578 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 579 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test vector for input of length 24 and non-zero I&O Note: whitening. Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F6717207A1133E4A0 B26861001010101010110". Set buffer "ciphertext" to hex value "0d471706f8f89d46ea5f3c3bb9 a8d600b445c8d722d91e3e". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 580 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 581 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Cleanup This is the end of test case "TVDXCBN0". This is the start of test case "TVDXCBN1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using DESX and CBC Note: feedback methods Note: without padding, based on tvdsx100 vectors. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DESX_ENCRYPT", "AM_DESX_DECRYPT", "AM_CBC_ENCRYPT", "AM_CBC_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Create buffer "input" of decimal value "24" bytes. Create buffer "output" of decimal value "24" bytes. Create buffer "unput" of decimal value "24" bytes. Create buffer "ciphertext" of decimal value "24" bytes. Create buffer "keyData" of decimal value "24" bytes. Create buffer "plaintext" of decimal value "24" bytes. Note: Fill out data objects Set buffer "keyData" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "ciphertext" to hex value "0d471706f8f89d46". Set buffer "plaintext" to hex value "0248D43806F67172". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and Baldwin Informational, Expires 12/25/1999 582 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "desx", "0", "cbc", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext". Note: Decrypt. Baldwin Informational, Expires 12/25/1999 583 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "desx", "0", "cbc", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key object. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Fill out data objects using vectors for 16 byte input Baldwin Informational, Expires 12/25/1999 584 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: data. Set buffer "keyData" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F6717207A1133E4A0 B2686". Set buffer "ciphertext" to hex value "0d471706f8f89d46ea5f3c3bb9 a8d600". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 585 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key object. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Fill out data objects using vectors for 24 byte input Note: data. Set buffer "keyData" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F6717207A1133E4A0 B26861001010101010110". Set buffer "ciphertext" to hex value "0d471706f8f89d46ea5f3c3bb9 a8d600b445c8d722d91e3e". Create key object "key". Baldwin Informational, Expires 12/25/1999 586 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next Baldwin Informational, Expires 12/25/1999 587 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key object. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVDXCBN1". This is the start of test case "TVDXCBP0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Baldwin Informational, Expires 12/25/1999 588 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test vectors for AI_FeedbackCipher using DESX with CBC Note: and padding Note: Assuming that DESX CBC is tested elsewhere, just test the Note: padding mechanism. Note: Depends on: Note: AI_FeedbackCipher Note: Test cases: Note: - For 8 byte input, first block matches DESX_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Note: - For inputs ranging from 0 to 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DESX_ENCRYPT", "AM_DESX_DECRYPT", "AM_CBC_ENCRYPT", "AM_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "ciphertext1" to hex value "0d471706f8f89d46". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Note: ------------------------------------------------------- Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 589 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptNoPad". Call B_CreateAlgorithmObject passing "decryptNoPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "desx", "0", "cbc", "0000000000000000", "pad", "NULL". Call B_SetAlgorithmInfo passing "encrypter" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "desx", "0", "cbc", "0000000000000000", "pad", "NULL". Call B_SetAlgorithmInfo passing "decrypter" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "desx", "0", "cbc", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptNoPad" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and Baldwin Informational, Expires 12/25/1999 590 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptNoPad" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - For 8 byte input, first block matches DESX_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "0d471706f8f89d464d1a007258539f4e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 591 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0248D43806F671720808080808080808". Set length of buffer "encryptedtext" to decimal value "8". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Set length of buffer "decryptedtext" to decimal value "8". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: Setup plaintext array Set buffer "plaintext" to hex value "010203040506070809101112131 41516". Note: ------------------------------------------------------- Note: - For input of length 16 bytes, check that Baldwin Informational, Expires 12/25/1999 592 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "16". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42f58d04a7c82d2c0ebfe0986d529aa3fc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 593 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "010203040506070809101112131415160808080808080808". Note: ------------------------------------------------------- Note: - For input of length 15 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "15". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb4278fbaa5fdcea59ef". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 594 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141501". Note: ------------------------------------------------------- Note: - For input of length 14 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "14". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address Baldwin Informational, Expires 12/25/1999 595 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42eb9a0665761fe635". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next Baldwin Informational, Expires 12/25/1999 596 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213140202". Note: ------------------------------------------------------- Note: - For input of length 13 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "13". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb429819a65ef7d68172". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 597 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213030303". Note: ------------------------------------------------------- Note: - For input of length 12 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "12". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 598 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42b173d53943062561". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 599 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with hex value "01020304050607080910111204040404". Note: ------------------------------------------------------- Note: - For input of length 11 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "11". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42a6bacd5952a8545e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 600 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910110505050505". Note: ------------------------------------------------------- Note: - For input of length 10 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "10". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value Baldwin Informational, Expires 12/25/1999 601 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "f960bce55663bb421ae704b9a596a02a". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910060606060606". Note: ------------------------------------------------------- Note: - For input of length 09 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Baldwin Informational, Expires 12/25/1999 602 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "plaintext" to decimal value "09". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42678873de204738e7". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 603 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080907070707070707". Note: ------------------------------------------------------- Note: - For input of length 08 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "08". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb420440c32cc313e99e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 604 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080808080808080808". Note: ------------------------------------------------------- Note: - For input of length 07 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "07". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 605 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "8d190aa85805810a". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 606 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060701". Note: ------------------------------------------------------- Note: - For input of length 6 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "6". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "7e0b278857bae309". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 607 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060202". Note: ------------------------------------------------------- Note: - For input of length 5 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "5". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 608 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "efb2c11df5851d38". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405030303". Note: ------------------------------------------------------- Note: - For input of length 4 bytes, check that Baldwin Informational, Expires 12/25/1999 609 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "4". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "cac9a1f1e979e1ff". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 610 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030404040404". Note: ------------------------------------------------------- Note: - For input of length 3 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "3". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "3baa090e6eeea244". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 611 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030505050505". Note: ------------------------------------------------------- Note: - For input of length 2 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "2". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of Baldwin Informational, Expires 12/25/1999 612 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "20a0cad833dcd868". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 613 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102060606060606". Note: ------------------------------------------------------- Note: - For input of length 1 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "1". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "bce4fde9fdc2990c". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 614 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0107070707070707". Note: ------------------------------------------------------- Note: - For input of length 0 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "0". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and Baldwin Informational, Expires 12/25/1999 615 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "70943a5611926ece". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value Baldwin Informational, Expires 12/25/1999 616 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "0808080808080808". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDXCBP0". This is the start of test case "TVR2CBN0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using RC2 with CBC Note: and no padding. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC2_ENCRYPT", "AM_RC2_DECRYPT", "AM_CBC_ENCRYPT", "AM_CBC_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Using the given input data, encrypt it and compare cipher Note: text with test Note: vector, decrypt that output and Note: compare the decryption result with the original input. Create buffer "input" of decimal value "8" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "8" bytes. Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "0000000000000000". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 617 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "20" bytes. Set buffer "ciphertext1" to hex value "ebb773f993278eff". Create buffer "plaintext" of decimal value "20" bytes. Set buffer "plaintext" to hex value "0000000000000000". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", "64", "cbc", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Baldwin Informational, Expires 12/25/1999 618 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc2", "64", "cbc", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Baldwin Informational, Expires 12/25/1999 619 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVR2CBN0". This is the start of test case "TVR5CBN0". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Cipher Block Feedback using RC5 and CBC Note: feedback methods. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC5_ENCRYPT", "AM_RC5_DECRYPT", "AM_CBC_ENCRYPT", "AM_CBC_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Encrypt given text and compare cipher text against test Note: vector, Note: decrypt cipher text compare the decryption result with Note: the original input. Create buffer "input" of decimal value "8" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "8" bytes. Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "00000000000000000000000000000 000". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 620 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "20" bytes. Set buffer "ciphertext1" to hex value "21a5dbee154b8f6d". Create buffer "plaintext" of decimal value "20" bytes. Set buffer "plaintext" to hex value "0000000000000000". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5", "1", "12", "32", "cbc", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Baldwin Informational, Expires 12/25/1999 621 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5", "1", "12", "32", "cbc", "0000000000000000", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 622 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVR5CBN0". This is the start of test case "TVR5ECB1". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for Cipher Block Feedback using RC5 and Note: ECB feedback methods. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RC5_ENCRYPT", "AM_RC5_DECRYPT", "AM_ECB_ENCRYPT", "AM_ECB_DECRYPT", "NULL_PTR". Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 623 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "8" bytes. Create buffer "output" of decimal value "16" bytes. Create buffer "unput" of decimal value "8" bytes. Create buffer "keyData" of decimal value "20" bytes. Set buffer "keyData" to hex value "00000000000000000000000000000 000". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "ciphertext1" of decimal value "20" bytes. Set buffer "ciphertext1" to hex value "21a5dbee154b8f6d". Create buffer "plaintext" of decimal value "20" bytes. Set buffer "plaintext" to hex value "0000000000000000". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Baldwin Informational, Expires 12/25/1999 624 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5", "1", "12", "32", "ecb", "8", "nopad", "NULL". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "ciphertext1". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "rc5", "1", "12", "32", "ecb", "8", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 625 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "plaintext" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVR5ECB1". This is the start of test case "TF3CBRI0". Baldwin Informational, Expires 12/25/1999 626 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for Cipher Block Feedback using Triple Note: DES together with CBC Note: and no padding. Additional test for reinitialization Note: function. Note: Run same test but with padding and slightly altered Note: inputs. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_EDE_ENCRYPT", "AM_EDE_DECRYPT", "AM_CFB_ENCRYPT", "AM_CFB_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Note: But encrypt data in two parts testing the Note: reinitialization function. Create buffer "output" of decimal value "80" bytes. Create buffer "output1" of decimal value "80" bytes. Create buffer "output2" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "unput1" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 627 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Encrypt. Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the time ". Create buffer "plaintext1" of decimal value "80" bytes. Set buffer "plaintext1" with string value "for all ". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc", "1234567890ABCDEF", "nopad", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Set "_InfoPointer" to address of info structure for "AI_RESET_IV" initialized from "00000000EFAB23EF". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RESET_IV" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 628 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "output". Note: Reset iv and encrypt tail Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Finalize buffer "output1". Display buffer "output1". Note: Use encryptObj2 to simulate the resetting and compare Note: results Create algorithm object "encryptObj2". Call B_CreateAlgorithmObject passing "encryptObj2". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc", "00000000EFAB23EF", "nopad", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj2" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj2" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 629 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj2" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Call B_EncryptFinal passing "encryptObj2" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Finalize buffer "output2". Check equality of buffer "output1" with contents of buffer "output2". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc", "1234567890ABCDEF", "nopad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 630 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Set "_InfoPointer" to address of info structure for "AI_RESET_IV" initialized from "00000000EFAB23EF". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RESET_IV" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "unput" with contents of buffer "plaintext". Note: Reset iv and decrypt tail Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput1" and address of "_OutputLen" and length of free bytes in buffer "unput1" and address of first initialized byte in buffer "output1" and length of initialized bytes in buffer "output1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput1" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput1" and address of "_OutputLen" and length of free bytes in buffer "unput1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput1" by "_OutputLen". Finalize buffer "unput1". Display buffer "unput1". Check equality of buffer "unput1" with contents of buffer Baldwin Informational, Expires 12/25/1999 631 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "plaintext1". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj2". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-1 Note: Use input data, encrypt it, decrypt that output and Note: compare the decryption result with the original input. Note: But encrypt data in two parts testing the Note: reinitialization function. Create buffer "output" of decimal value "80" bytes. Create buffer "output1" of decimal value "80" bytes. Create buffer "output2" of decimal value "80" bytes. Create buffer "unput" of decimal value "80" bytes. Create buffer "unput1" of decimal value "80" bytes. Create buffer "keyData" of decimal value "24" bytes. Set buffer "keyData" to hex value "0123456789ABCDEF23456789ABCDE F01456789ABCDEF0123". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" Baldwin Informational, Expires 12/25/1999 632 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create buffer "plaintext" of decimal value "80" bytes. Set buffer "plaintext" with string value "Now is the ti". Create buffer "plaintext1" of decimal value "80" bytes. Set buffer "plaintext1" with string value "me for all ". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc", "1234567890ABCDEF", "pad", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Set "_InfoPointer" to address of info structure for "AI_RESET_IV" initialized from "00000000EFAB23EF". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RESET_IV" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 633 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Reset iv and encrypt tail Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Finalize buffer "output1". Display buffer "output1". Note: Use encryptObj2 to simulate the resetting and compare Note: results Create algorithm object "encryptObj2". Call B_CreateAlgorithmObject passing "encryptObj2". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc", "00000000EFAB23EF", "pad", "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj2" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 634 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encryptObj2" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj2" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Call B_EncryptFinal passing "encryptObj2" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Finalize buffer "output2". Check equality of buffer "output1" with contents of buffer "output2". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_FeedbackCipher" initialized from "des_ede", "8", "cbc", "1234567890ABCDEF", "pad", "NULL". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_FeedbackCipher" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized Baldwin Informational, Expires 12/25/1999 635 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Set "_InfoPointer" to address of info structure for "AI_RESET_IV" initialized from "00000000EFAB23EF". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RESET_IV" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "unput" with contents of buffer "plaintext". Note: Reset iv and decrypt tail Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput1" and address of "_OutputLen" and length of free bytes in buffer "unput1" and address of first initialized byte in buffer "output1" and length of initialized bytes in buffer "output1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput1" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput1" and address of "_OutputLen" and length of free bytes in buffer "unput1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput1" by "_OutputLen". Finalize buffer "unput1". Display buffer "unput1". Baldwin Informational, Expires 12/25/1999 636 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "unput1" with contents of buffer "plaintext1". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj2". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TF3CBRI0". This is the start of test case "TERC2C00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Error tests of AI_RC2_CBC Note: Depends on: Note: - KI_Item Note: - KI_8Byte Note: - KI_DES8 Note: - KI_RSAPublic Note: Test cases Note: - Check for NO error: BE_INPUT_LEN if input length is Note: zero. Note: - Check for error: BE_INPUT_LEN from EncryptFinal for Note: input lengths of 0, 7, 9. Note: - Check for error: BE_INPUT_LEN from DecryptFinal for Note: input lengths of 0, 7, 9. Note: - Check for BE_OUTPUT_LEN error from En/DecryptUpdate. Note: - Check for NO error: BE_OUTPUT_LEN for En/DecryptFinal Baldwin Informational, Expires 12/25/1999 637 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Check for error: BE_ALGORITHM_ALREADY_SET Note: - Check for error: BE_ALGORITHM_NOT_INITIALIZED Note: - Check for error: BE_ALGORITHM_NOT_SET Note: - Check for error: BE_WRONG_KEY_INFO (public key) Note: - Check for error: BE_METHOD_NOT_IN_CHOOSER Note: - Check for error: BE_KEY_NOT_SET Note: - Check for error: BE_KEY_ALREADY_SET Note: - Check for error: BE_KEY_OBJ and BE_ALGORITHM_NOT_INITIAL Note: IZED Note: - Check for error: BE_NOT_SUPPORTED (0 and 300 byte key) Note: - Check for error: BE_NOT_SUPPORTED (0 and 3000 bit Note: effective keysize) Note: Not testable: Note: - Check for error: BE_WRONG_ALGORITHM_INFO Note: - Check for error: BE_KEY_LEN Note: - Check for error: BE_DATA Note: - Check for error: BE_NOT_INITIALIZED Note: - Check for error: BE_INPUT_COUNT Note: - Check for error: BE_OUTPUT_COUNT Note: To do: Note: - Add tests using the CreateNull operations Note: - Add out of memory error testing, should only effect Note: Init. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "input" of decimal value "100" bytes. Create buffer "output" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Create buffer "onebytelong" of decimal value "1" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 638 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "ivector" to hex value "0001101001101011". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from "0102030405060708". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check for no BE_INPUT_LEN error if input length is Note: zero. Set buffer "input" to hex value "". Call B_EncryptUpdate passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 639 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Check equality of buffer "ciphertext" with hex value "". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Check equality of buffer "ciphertext" with hex value "". Note: ------------------------------------------------------- Note: - Check for BE_INPUT_LEN error from En/DecryptFinal for Note: input lengths of 1, 7, 9. Note: Input length is 1 Set buffer "input" to hex value "01". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 640 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Note: Input length is 7 Set buffer "input" to hex value "01020304050607". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Baldwin Informational, Expires 12/25/1999 641 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Note: Input length is 9 Set buffer "input" to hex value "010203040506070809". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 642 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Note: ------------------------------------------------------- Note: Check for error: BE_OUTPUT_LEN for En/DecryptUpdate Set buffer "input" to hex value "112233445566778899". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_OUTPUT_LEN". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_OUTPUT_LEN". Baldwin Informational, Expires 12/25/1999 643 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Note: ------------------------------------------------------- Note: Check for NO error: BE_OUTPUT_LEN for En/DecryptFinal Note: Since CBC mode w/o padding does not hang onto bytes, Note: there is never any output for En/DecryptFinal. Note: Before BSafe 2.5 this could produce an error because Note: the CBC routines would always buffer 8 bytes. Set buffer "input" to hex value "1122334455667788112233445566778 8". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of Baldwin Informational, Expires 12/25/1999 644 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_DecryptFinal passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Note: ------------------------------------------------------- Note: - Check for error: BE_ALGORITHM_ALREADY_SET Set "_ExpectedStatus" to "BE_ALGORITHM_ALREADY_SET". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check for error: BE_ALGORITHM_NOT_INITIALIZED Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 645 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 646 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Note: ------------------------------------------------------- Note: - Check for error: BE_ALGORITHM_NOT_SET Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_RC2_CBC". Display info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 647 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call B_DecryptFinal passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Note: ------------------------------------------------------- Note: - Check for error: BE_WRONG_KEY_INFO Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer Baldwin Informational, Expires 12/25/1999 648 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "11", "22". Call B_SetKeyInfo passing "key" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check for error: BE_METHOD_NOT_IN_CHOOSER Set "_Chooser" to "AM_MD2", "NULL_PTR". Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" Baldwin Informational, Expires 12/25/1999 649 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from "0102030405060708". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_METHOD_NOT_IN_CHOOSER". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_METHOD_NOT_IN_CHOOSER". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now, reset the Chooser to Default Chooser values. Set "_Chooser" to DEMO_ALGORITHM_CHOOSER. Note: ------------------------------------------------------- Note: - Check for error: BE_KEY_NOT_SET Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 650 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_NOT_SET". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_NOT_SET". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check for error: BE_KEY_ALREADY_SET Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DES8" initialized from "0102030405060708". Call B_SetKeyInfo passing "key" and "KI_DES8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_ALREADY_SET". Set "_InfoPointer" to address of info structure for "KI_DES8" initialized from "0102030405060708". Call B_SetKeyInfo passing "key" and "KI_DES8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check for error: BE_KEY_OBJ and BE_ALGORITHM_NOT_INITIAL Note: IZED Call Call B_DestroyAlgorithmObject passing "encrypter". Baldwin Informational, Expires 12/25/1999 651 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_OBJ". Call Call B_EncryptInit passing "encrypter" and "decrypter" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 652 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Set "_ExpectedStatus" to "BE_KEY_OBJ". Call Call B_DecryptInit passing "decrypter" and "encrypter" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_DecryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Note: ------------------------------------------------------- Note: - Check for error: BE_KEY_LEN on zero and 300 byte keys Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 653 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Zero length key Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized fromRC2_CBC". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: 300 byte key Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "0102030405060708091011121314151617181920212223 2425262728293001020304050607080910111213141516171819202122232425 2627282930010203040506070809101112131415161718192021222324252627 2829300102030405060708091011121314151617181920212223242526272829 3001020304050607080910111213141516171819202122232425262728293001 0203040506070809101112131415161718192021222324252627282930010203 0405060708091011121314151617181920212223242526272829300102030405 Baldwin Informational, Expires 12/25/1999 654 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 0607080910111213141516171819202122232425262728293001020304050607 0809101112131415161718192021222324252627282930010203040506070809 101112131415161718192021222324252627282930". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check for error: BE_NOT_SUPPORTED (0 and 3000 bit Note: effective keysize) Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Zero length effective key size Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "0", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 655 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "01020304050607080910". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: 3000 bit effective key size Set "_ExpectedStatus" to "BE_ALGORITHM_INFO". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "3000", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "01020304050607080910". Call B_SetKeyInfo passing "key" and "KI_Item" and Baldwin Informational, Expires 12/25/1999 656 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: NextExpectedError (BE_NOT_SUPPORTED) Note: EncryptInit (encrypter, key) Note: NextExpectedError (BE_NOT_SUPPORTED) Note: DecryptInit (encrypter, key) Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TERC2C00". This is the start of test case "TFCIV800". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for AI_CBC_IV8 corresponding to Note: AI_DES_CBC_IV8, AI_DES_CBCPadBER, AI_DES_CBCPadIV8, Note: AI_DES_CBCPadPEM Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Create buffer "inputData" of decimal value "100" bytes. Create buffer "cypherText" of decimal value "100" bytes. Create buffer "plainText" of decimal value "100" bytes. Create buffer "iv" of decimal value "8" bytes. Create buffer "newiv" of decimal value "8" bytes. Create buffer "key" of decimal value "8" bytes. Set buffer "inputData" to hex value "000102030405060708091011121 314151617181920212223". Set buffer "iv" to hex value "0011223344556677". Set buffer "newiv" to hex value "7766554433221100". Set buffer "key" to hex value "1234567890123456". Note: global key object Create key object "keyObj". Call B_CreateKeyObject passing "keyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "key". Call B_SetKeyInfo passing "keyObj" and "KI_Item" and Baldwin Informational, Expires 12/25/1999 657 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_DES_CBC_IV8 Note: Case 0: Check the output of the base algorithm Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBC_IV8". Check equality of info structure for "AI_DES_CBC_IV8" with expected info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBC_IV8". Baldwin Informational, Expires 12/25/1999 658 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of info structure for "AI_DES_CBC_IV8" with expected info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ee213f0eb081e4f0dffbff5462293364779769731295aa59". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 659 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBC_IV8". Check equality of info structure for "AI_DES_CBC_IV8" with expected info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 660 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBC_IV8". Check equality of info structure for "AI_DES_CBC_IV8" with expected info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of Baldwin Informational, Expires 12/25/1999 661 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the iv from Note: AI_DES_CBC_IV8 Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBC_IV8". Check equality of info structure for "AI_DES_CBC_IV8" with expected info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info Baldwin Informational, Expires 12/25/1999 662 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 structure for "AI_DES_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBC_IV8". Check equality of info structure for "AI_DES_CBC_IV8" with expected info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 663 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBC_IV8". Check equality of info structure for "AI_DES_CBC_IV8" with expected info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBC_IV8". Check equality of info structure for "AI_DES_CBC_IV8" with expected info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 664 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ee213f0eb081e4f0dffbff5462293364779769731295aa59". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 665 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBC_IV8". Check equality of info structure for "AI_DES_CBC_IV8" with expected info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBC_IV8". Check equality of info structure for "AI_DES_CBC_IV8" with expected info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Baldwin Informational, Expires 12/25/1999 666 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_DES_CBCPadIV8 Note: Case 0: Check the output of the base algorithm Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 667 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Baldwin Informational, Expires 12/25/1999 668 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "7766554433221100"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "7766554433221100"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 669 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ee213f0eb081e4f0dffbff5462293364779769731295aa591301f0c35115731 1". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 670 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info Baldwin Informational, Expires 12/25/1999 671 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" Baldwin Informational, Expires 12/25/1999 672 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef4256b062c4dd9fd e". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the initial iv Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 673 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with Baldwin Informational, Expires 12/25/1999 674 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef4256b062c4dd9fd Baldwin Informational, Expires 12/25/1999 675 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 e". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info Baldwin Informational, Expires 12/25/1999 676 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "7766554433221100"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "7766554433221100"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of Baldwin Informational, Expires 12/25/1999 677 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ee213f0eb081e4f0dffbff5462293364779769731295aa591301f0c35115731 1". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 678 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "iv". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "iv". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Baldwin Informational, Expires 12/25/1999 679 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 680 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef4256b062c4dd9fd e". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_DES_CBCPadBER Note: Case 1: use the initial iv Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 681 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e030207040800112 23344556677". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DES_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e030207040800112 23344556677". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DES_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadIV8". Baldwin Informational, Expires 12/25/1999 682 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 683 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef4256b062c4dd9fd e". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the initial iv Note: since final already calls. Baldwin Informational, Expires 12/25/1999 684 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from Baldwin Informational, Expires 12/25/1999 685 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 686 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef4256b062c4dd9fd e". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 687 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "7766554433221100"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "7766554433221100"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Baldwin Informational, Expires 12/25/1999 688 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ee213f0eb081e4f0dffbff5462293364779769731295aa591301f0c35115731 1". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and Baldwin Informational, Expires 12/25/1999 689 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and Baldwin Informational, Expires 12/25/1999 690 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 691 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef4256b062c4dd9fd e". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_DES_CBCPadPEM Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 692 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DES_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DES_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and Baldwin Informational, Expires 12/25/1999 693 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" Baldwin Informational, Expires 12/25/1999 694 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef4256b062c4dd9fd e". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the initial iv Baldwin Informational, Expires 12/25/1999 695 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 696 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 697 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef4256b062c4dd9fd e". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with Baldwin Informational, Expires 12/25/1999 698 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "7766554433221100"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "7766554433221100"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 699 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ee213f0eb081e4f0dffbff5462293364779769731295aa591301f0c35115731 1". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 700 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadBER" initialized from "301106052b0e03020704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadBER". Check equality of info structure for "AI_DES_CBCPadBER" with expected info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 701 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadIV8". Check equality of info structure for "AI_DES_CBCPadIV8" with expected info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_CBCPadPEM" initialized from "DES-CBC", "0011223344556677"". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_CBCPadPEM". Check equality of info structure for "AI_DES_CBCPadPEM" with expected info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 702 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "5363cdc050bc40e578a1f1c5c3b8d9e39960a03ec7ded8ef4256b062c4dd9fd e". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFCIV800". This is the start of test case "TFCIV801". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 703 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for AI_CBC_IV8 corresponding to Note: AI_RC2_CBC, AI_RC2_CBCPadBER, AI_RC2_CBCPad, Note: AI_RC2_CBCPadPEM Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "NULL_PTR". Note: Initialize, set up data Create buffer "inputData" of decimal value "100" bytes. Create buffer "cypherText" of decimal value "100" bytes. Create buffer "plainText" of decimal value "100" bytes. Create buffer "iv" of decimal value "8" bytes. Create buffer "newiv" of decimal value "8" bytes. Create buffer "key" of decimal value "8" bytes. Note: vector data Set buffer "inputData" to hex value "000102030405060708091011121 314151617181920212223". Set buffer "iv" to hex value "0011223344556677". Set buffer "newiv" to hex value "7766554433221100". Set buffer "key" to hex value "1234567890123456". Note: global key object Create key object "keyObj". Call B_CreateKeyObject passing "keyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "key". Call B_SetKeyInfo passing "keyObj" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_RC2_CBC Note: Case 0: Check the output of the base algorithm Baldwin Informational, Expires 12/25/1999 704 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "32", contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "32", contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBC" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBC". Check equality of info structure for "AI_RC2_CBC" with expected info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBC" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBC". Check equality of info structure for "AI_RC2_CBC" with expected info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 705 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ada134f25ba7e0281cbe461f05491f1cc08e67d3aea1f190". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Baldwin Informational, Expires 12/25/1999 706 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "32", contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "32", contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBC" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBC". Check equality of info structure for "AI_RC2_CBC" with expected info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBC" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Baldwin Informational, Expires 12/25/1999 707 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBC". Check equality of info structure for "AI_RC2_CBC" with expected info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 708 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the iv from Note: AI_DES_CBC_IV8 Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBC" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBC". Check equality of info structure for "AI_RC2_CBC" with expected info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBC" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBC". Baldwin Informational, Expires 12/25/1999 709 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of info structure for "AI_RC2_CBC" with expected info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Baldwin Informational, Expires 12/25/1999 710 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBC" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBC". Check equality of info structure for "AI_RC2_CBC" with expected info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBC" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBC". Check equality of info structure for "AI_RC2_CBC" with expected info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ada134f25ba7e0281cbe461f05491f1cc08e67d3aea1f190". Baldwin Informational, Expires 12/25/1999 711 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 712 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBC" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBC". Check equality of info structure for "AI_RC2_CBC" with expected info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBC" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBC". Check equality of info structure for "AI_RC2_CBC" with expected info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and Baldwin Informational, Expires 12/25/1999 713 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_RC2_CBCPad Note: Case 0: Check the output of the base algorithm Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "32", contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "32", contents of buffer "newiv". Baldwin Informational, Expires 12/25/1999 714 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204087766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204087766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 715 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAh3ZlVEMyIRAA=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAh3ZlVEMyIRAA=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 716 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ada134f25ba7e0281cbe461f05491f1cc08e67d3aea1f19084916f303c1453e 6". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "32", contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and Baldwin Informational, Expires 12/25/1999 717 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "32", contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Baldwin Informational, Expires 12/25/1999 718 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 719 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b7e5f1c09a3e624a 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the initial iv Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and Baldwin Informational, Expires 12/25/1999 720 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 721 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b7e5f1c09a3e624a 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of Baldwin Informational, Expires 12/25/1999 722 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Note: Update the algorithm with new IV8 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204087766554433221100". Baldwin Informational, Expires 12/25/1999 723 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204087766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAh3ZlVEMyIRAA=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAh3ZlVEMyIRAA=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and Baldwin Informational, Expires 12/25/1999 724 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ada134f25ba7e0281cbe461f05491f1cc08e67d3aea1f19084916f303c1453e 6". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 725 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 726 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 727 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b7e5f1c09a3e624a 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_RC2_CBCPadBER Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d0302040 Baldwin Informational, Expires 12/25/1999 728 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 80011223344556677". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_RC2_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d0302040 80011223344556677". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC2_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from Baldwin Informational, Expires 12/25/1999 729 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of Baldwin Informational, Expires 12/25/1999 730 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b7e5f1c09a3e624a 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the initial iv Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 731 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Baldwin Informational, Expires 12/25/1999 732 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b7e5f1c09a3e624a 9". Baldwin Informational, Expires 12/25/1999 733 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204087766554433221100". Baldwin Informational, Expires 12/25/1999 734 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204087766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAh3ZlVEMyIRAA=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAh3ZlVEMyIRAA=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and Baldwin Informational, Expires 12/25/1999 735 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ada134f25ba7e0281cbe461f05491f1cc08e67d3aea1f19084916f303c1453e 6". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 736 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 737 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 738 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b7e5f1c09a3e624a 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_RC2_CBCPadPEM Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 739 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_RC2_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC2_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 740 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Baldwin Informational, Expires 12/25/1999 741 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b7e5f1c09a3e624a 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the initial iv Note: since final already calls. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 742 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Baldwin Informational, Expires 12/25/1999 743 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 744 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b7e5f1c09a3e624a 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with Baldwin Informational, Expires 12/25/1999 745 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204087766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204087766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAh3ZlVEMyIRAA=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAh3ZlVEMyIRAA=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 746 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "ada134f25ba7e0281cbe461f05491f1cc08e67d3aea1f19084916f303c1453e 6". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 747 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPad" initialized from "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPad". Check equality of info structure for "AI_RC2_CBCPad" with expected info structure for "AI_RC2_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 748 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301406082a864886f70d030204080011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadPEM" initialized from "RC2-CBC", "BAgAESIzRFVmdw=="". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC2_CBCPadPEM". Check equality of info structure for "AI_RC2_CBCPadPEM" with expected info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 749 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "d08502e791f56b76535055800911b4d6724ecd8ee3e3443b7e5f1c09a3e624a 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 750 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFCIV801". This is the start of test case "TFCIV802". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for AI_CBC_IV8 corresponding to Note: AI_DES_EDE3_CBC_IV8, AI_DES_EDE3_CBCPadBER, Note: AI_DES_EDE3_CBCPadIV8 Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DES_EDE3_CBC_ENCRYPT", "AM_DES_EDE3_CBC_DECRYPT", "NULL_PTR". Note: Initialize, set up data Create buffer "inputData" of decimal value "100" bytes. Create buffer "cypherText" of decimal value "100" bytes. Create buffer "plainText" of decimal value "100" bytes. Create buffer "iv" of decimal value "8" bytes. Create buffer "newiv" of decimal value "8" bytes. Create buffer "key" of decimal value "24" bytes. Note: vector data Set buffer "inputData" to hex value "000102030405060708091011121 314151617181920212223". Set buffer "iv" to hex value "0011223344556677". Set buffer "newiv" to hex value "7766554433221100". Set buffer "key" to hex value "112233445566778811223344556677881 122334455667788". Note: global key object Create key object "keyObj". Call B_CreateKeyObject passing "keyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "key". Baldwin Informational, Expires 12/25/1999 751 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetKeyInfo passing "keyObj" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_DES_EDE3_CBC_IV8 Note: Case 0: Check the output of the base algorithm Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBC_IV8". Check equality of info structure for "AI_DES_EDE3_CBC_IV8" with expected info structure for "AI_DES_EDE3_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 752 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_DES_EDE3_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBC_IV8". Check equality of info structure for "AI_DES_EDE3_CBC_IV8" with expected info structure for "AI_DES_EDE3_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3bd6e1d301a382e0f6dc9868c7a019ec470f379d9928148d". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 753 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBC_IV8" initialized from Baldwin Informational, Expires 12/25/1999 754 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBC_IV8". Check equality of info structure for "AI_DES_EDE3_CBC_IV8" with expected info structure for "AI_DES_EDE3_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBC_IV8". Check equality of info structure for "AI_DES_EDE3_CBC_IV8" with expected info structure for "AI_DES_EDE3_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 755 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "4c0ce7ea6e1fd7c57284b9d5de41e8aa00e1f61dd4537842". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the iv from Note: AI_DES_CBC_IV8 Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 756 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Update the algorithm with new IV8 Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBC_IV8". Check equality of info structure for "AI_DES_EDE3_CBC_IV8" with expected info structure for "AI_DES_EDE3_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBC_IV8". Check equality of info structure for "AI_DES_EDE3_CBC_IV8" with expected info structure for "AI_DES_EDE3_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value Baldwin Informational, Expires 12/25/1999 757 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "4c0ce7ea6e1fd7c57284b9d5de41e8aa00e1f61dd4537842". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBC_IV8". Check equality of info structure for "AI_DES_EDE3_CBC_IV8" with expected info structure for "AI_DES_EDE3_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBC_IV8". Check equality of info structure for "AI_DES_EDE3_CBC_IV8" with expected info structure for "AI_DES_EDE3_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 758 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3bd6e1d301a382e0f6dc9868c7a019ec470f379d9928148d". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 759 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBC_IV8". Check equality of info structure for "AI_DES_EDE3_CBC_IV8" with expected info structure for "AI_DES_EDE3_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBC_IV8". Check equality of info structure for "AI_DES_EDE3_CBC_IV8" with expected info structure for "AI_DES_EDE3_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Baldwin Informational, Expires 12/25/1999 760 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "4c0ce7ea6e1fd7c57284b9d5de41e8aa00e1f61dd4537842". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 761 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case: AI_DES_EDE3_CBCPadIV8 Note: Case 0: Check the output of the base algorithm Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DES_EDE3_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DES_EDE3_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 762 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next Baldwin Informational, Expires 12/25/1999 763 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3bd6e1d301a382e0f6dc9868c7a019ec470f379d9928148d1f7e7108b485ce3 2". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 764 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DES_EDE3_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DES_EDE3_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 765 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value Baldwin Informational, Expires 12/25/1999 766 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "4c0ce7ea6e1fd7c57284b9d5de41e8aa00e1f61dd4537842f65661c5fc8021b 4". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the iv from Note: AI_DES_CBC_IV8 Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadIV8". Baldwin Informational, Expires 12/25/1999 767 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 768 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "4c0ce7ea6e1fd7c57284b9d5de41e8aa00e1f61dd4537842f65661c5fc8021b 4". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 769 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" Baldwin Informational, Expires 12/25/1999 770 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3bd6e1d301a382e0f6dc9868c7a019ec470f379d9928148d1f7e7108b485ce3 2". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 771 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 772 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "4c0ce7ea6e1fd7c57284b9d5de41e8aa00e1f61dd4537842f65661c5fc8021b 4". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 773 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_DES_EDE3_CBCPadBER Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d03 0704080011223344556677". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DES_EDE3_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d03 0704080011223344556677". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DES_EDE3_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 774 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 775 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "4c0ce7ea6e1fd7c57284b9d5de41e8aa00e1f61dd4537842f65661c5fc8021b 4". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the iv from Baldwin Informational, Expires 12/25/1999 776 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: AI_DES_CBC_IV8 Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 777 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "4c0ce7ea6e1fd7c57284b9d5de41e8aa00e1f61dd4537842f65661c5fc8021b 4". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 778 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704087766554433221100". Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 779 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3bd6e1d301a382e0f6dc9868c7a019ec470f379d9928148d1f7e7108b485ce3 2". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 780 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadIV8" initialized from "0011223344556677". Baldwin Informational, Expires 12/25/1999 781 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadIV8". Check equality of info structure for "AI_DES_EDE3_CBCPadIV8" with expected info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DES_EDE3_CBCPadBER" initialized from "301406082a864886f70d030704080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DES_EDE3_CBCPadBER". Check equality of info structure for "AI_DES_EDE3_CBCPadBER" with expected info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 782 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "4c0ce7ea6e1fd7c57284b9d5de41e8aa00e1f61dd4537842f65661c5fc8021b 4". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFCIV802". This is the start of test case "TFCIV803". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for AI_CBC_IV8 corresponding to Note: AI_DESX_CBC_IV8, AI_DESX_CBCPadBER, AI_DESX_CBCPadIV8 Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 783 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DESX_CBC_ENCRYPT", "AM_DESX_CBC_DECRYPT", "NULL_PTR". Note: Initialize, set up data Create buffer "inputData" of decimal value "100" bytes. Create buffer "cypherText" of decimal value "100" bytes. Create buffer "plainText" of decimal value "100" bytes. Create buffer "iv" of decimal value "8" bytes. Create buffer "newiv" of decimal value "8" bytes. Create buffer "key" of decimal value "24" bytes. Note: vector data Set buffer "inputData" to hex value "000102030405060708091011121 314151617181920212223". Set buffer "iv" to hex value "0011223344556677". Set buffer "newiv" to hex value "7766554433221100". Set buffer "key" to hex value "112233445566778811223344556677881 122334455667788". Note: global key object Create key object "keyObj". Call B_CreateKeyObject passing "keyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "key". Call B_SetKeyInfo passing "keyObj" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_DESX_CBC_IV8 Note: Case 0: Check the output of the base algorithm Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 784 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DESX_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DESX_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBC_IV8". Check equality of info structure for "AI_DESX_CBC_IV8" with expected info structure for "AI_DESX_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBC_IV8". Check equality of info structure for "AI_DESX_CBC_IV8" with expected info structure for "AI_DESX_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 785 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "1df06d88215404ca6023d25142167e1ea6d8bd0fce5d3fb7". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 786 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DESX_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DESX_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBC_IV8". Check equality of info structure for "AI_DESX_CBC_IV8" with expected info structure for "AI_DESX_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBC_IV8". Check equality of info structure for "AI_DESX_CBC_IV8" with expected info structure for "AI_DESX_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 787 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3fe6e5475b08323ad7862f3a1680afe52ee2447f8f01b136". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 788 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the iv from Note: AI_DES_CBC_IV8 Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBC_IV8". Check equality of info structure for "AI_DESX_CBC_IV8" with expected info structure for "AI_DESX_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBC_IV8". Check equality of info structure for "AI_DESX_CBC_IV8" with Baldwin Informational, Expires 12/25/1999 789 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 expected info structure for "AI_DESX_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3fe6e5475b08323ad7862f3a1680afe52ee2447f8f01b136". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Baldwin Informational, Expires 12/25/1999 790 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBC_IV8". Check equality of info structure for "AI_DESX_CBC_IV8" with expected info structure for "AI_DESX_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBC_IV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBC_IV8". Check equality of info structure for "AI_DESX_CBC_IV8" with expected info structure for "AI_DESX_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "1df06d88215404ca6023d25142167e1ea6d8bd0fce5d3fb7". Baldwin Informational, Expires 12/25/1999 791 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 792 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBC_IV8". Check equality of info structure for "AI_DESX_CBC_IV8" with expected info structure for "AI_DESX_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBC_IV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBC_IV8". Check equality of info structure for "AI_DESX_CBC_IV8" with expected info structure for "AI_DESX_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3fe6e5475b08323ad7862f3a1680afe52ee2447f8f01b136". Baldwin Informational, Expires 12/25/1999 793 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_DESX_CBCPadIV8 Note: Case 0: Check the output of the base algorithm Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DESX_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 794 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DESX_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Baldwin Informational, Expires 12/25/1999 795 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "1df06d88215404ca6023d25142167e1ea6d8bd0fce5d3fb7c21ae689e96f71a 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 796 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DESX_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DESX_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Baldwin Informational, Expires 12/25/1999 797 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 798 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3fe6e5475b08323ad7862f3a1680afe52ee2447f8f01b136352c2d512397c29 d". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer Baldwin Informational, Expires 12/25/1999 799 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the iv from Note: AI_DES_CBC_IV8 Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and Baldwin Informational, Expires 12/25/1999 800 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "encryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3fe6e5475b08323ad7862f3a1680afe52ee2447f8f01b136352c2d512397c29 d". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next Baldwin Informational, Expires 12/25/1999 801 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from Baldwin Informational, Expires 12/25/1999 802 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "301406082a864886f70d030604087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "1df06d88215404ca6023d25142167e1ea6d8bd0fce5d3fb7c21ae689e96f71a 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 803 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 804 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" Baldwin Informational, Expires 12/25/1999 805 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3fe6e5475b08323ad7862f3a1680afe52ee2447f8f01b136352c2d512397c29 d". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_DESX_CBCPadBER Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 806 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604 080011223344556677". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_DESX_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604 080011223344556677". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_DESX_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 807 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Baldwin Informational, Expires 12/25/1999 808 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "cypherText" with hex value "3fe6e5475b08323ad7862f3a1680afe52ee2447f8f01b136352c2d512397c29 d". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the iv from Note: AI_DES_CBC_IV8 Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and Baldwin Informational, Expires 12/25/1999 809 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "encryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 810 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3fe6e5475b08323ad7862f3a1680afe52ee2447f8f01b136352c2d512397c29 d". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 811 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604087766554433221100". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 812 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "1df06d88215404ca6023d25142167e1ea6d8bd0fce5d3fb7c21ae689e96f71a 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 813 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadIV8" initialized from "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadIV8". Check equality of info structure for "AI_DESX_CBCPadIV8" with expected info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DESX_CBCPadBER" initialized from Baldwin Informational, Expires 12/25/1999 814 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "301406082a864886f70d030604080011223344556677". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_DESX_CBCPadBER". Check equality of info structure for "AI_DESX_CBCPadBER" with expected info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "3fe6e5475b08323ad7862f3a1680afe52ee2447f8f01b136352c2d512397c29 d". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 815 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFCIV803". This is the start of test case "TFCIV804". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for AI_CBC_IV8 corresponding to Note: AI_RC5_CBC, AI_RC5_CBCPad Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC5_CBC_ENCRYPT", "AM_RC5_CBC_DECRYPT", "NULL_PTR". Note: Initialize, set up data Create buffer "inputData" of decimal value "100" bytes. Create buffer "cypherText" of decimal value "100" bytes. Create buffer "plainText" of decimal value "100" bytes. Create buffer "iv" of decimal value "8" bytes. Create buffer "newiv" of decimal value "8" bytes. Create buffer "key" of decimal value "8" bytes. Note: vector data Set buffer "inputData" to hex value "000102030405060708091011121 314151617181920212223". Set buffer "iv" to hex value "0011223344556677". Set buffer "newiv" to hex value "7766554433221100". Set buffer "key" to hex value "1234567890123456". Baldwin Informational, Expires 12/25/1999 816 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: global key object Create key object "keyObj". Call B_CreateKeyObject passing "keyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "key". Call B_SetKeyInfo passing "keyObj" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_RC5_CBC Note: Case 0: Check the output of the base algorithm Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and Baldwin Informational, Expires 12/25/1999 817 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "encryptionObj" and "AI_RC5_CBC". Check equality of info structure for "AI_RC5_CBC" with expected info structure for "AI_RC5_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBC". Check equality of info structure for "AI_RC5_CBC" with expected info structure for "AI_RC5_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "211394f772f9b728a2649d018de1d2aee8c3ee063507136f". Call B_DecryptUpdate passing "decryptionObj" and address of Baldwin Informational, Expires 12/25/1999 818 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", contents of buffer "iv". Baldwin Informational, Expires 12/25/1999 819 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBC". Check equality of info structure for "AI_RC5_CBC" with expected info structure for "AI_RC5_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBC". Check equality of info structure for "AI_RC5_CBC" with expected info structure for "AI_RC5_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 820 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "53decc19ee94e6d0fb497ee707bfff094dba7e93ebe17981". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the iv from Note: AI_DES_CBC_IV8 Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 821 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBC". Check equality of info structure for "AI_RC5_CBC" with expected info structure for "AI_RC5_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBC". Check equality of info structure for "AI_RC5_CBC" with expected info structure for "AI_RC5_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "53decc19ee94e6d0fb497ee707bfff094dba7e93ebe17981". Baldwin Informational, Expires 12/25/1999 822 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBC". Check equality of info structure for "AI_RC5_CBC" with expected info structure for "AI_RC5_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBC". Check equality of info structure for "AI_RC5_CBC" with expected info structure for "AI_RC5_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Baldwin Informational, Expires 12/25/1999 823 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "211394f772f9b728a2649d018de1d2aee8c3ee063507136f". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and Baldwin Informational, Expires 12/25/1999 824 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBC". Check equality of info structure for "AI_RC5_CBC" with expected info structure for "AI_RC5_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBC". Check equality of info structure for "AI_RC5_CBC" with expected info structure for "AI_RC5_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of Baldwin Informational, Expires 12/25/1999 825 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "53decc19ee94e6d0fb497ee707bfff094dba7e93ebe17981". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_RC5_CBCPad Baldwin Informational, Expires 12/25/1999 826 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 0: Check the output of the base algorithm Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_RC5_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC5_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 827 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "211394f772f9b728a2649d018de1d2aee8c3ee063507136f27e98e494564787 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 828 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_RC5_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC5_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 829 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "53decc19ee94e6d0fb497ee707bfff094dba7e93ebe17981da1a461100f42dc 6". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of Baldwin Informational, Expires 12/25/1999 830 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the initial iv Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info Baldwin Informational, Expires 12/25/1999 831 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "53decc19ee94e6d0fb497ee707bfff094dba7e93ebe17981da1a461100f42dc 6". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 832 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Note: Update the algorithm with new IV8 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 833 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "211394f772f9b728a2649d018de1d2aee8c3ee063507136f27e98e494564787 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" Baldwin Informational, Expires 12/25/1999 834 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 835 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "53decc19ee94e6d0fb497ee707bfff094dba7e93ebe17981da1a461100f42dc 6". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFCIV804". This is the start of test case "TFDESC00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test of AI_DES_CBC_IV8 Note: Depends on: Note: - AI_MD5Random Note: - KI_8Byte Note: Test cases Note: - Same result produced for first block of CBC Note: when the IV and plaintext are switched, since Note: it is their xor that is encrypted. Test for Baldwin Informational, Expires 12/25/1999 836 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: non-zero plaintext and IV. Note: - Check that encrypting 3 blocks at once produces Note: the same answer doing them one at a time with Note: the appropriate IVs. Note: To Do: Note: - Test 3 block decryption. Note: History: Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "AM_MD5_RANDOM", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Same result produced for first block of CBC Note: when the IV and plaintext are switched, since Note: it is their xor that is encrypted. Test for Note: zero and non-zero plaintext. Set buffer "keytext" to hex value "0123456789ABCDEF". Note: SetData (plaintext, 11 11 11 11 11 11 11 11) Set buffer "plaintext" to hex value "1110010110010100". Set buffer "ivector" to hex value "0001101001101011". Set buffer "ciphertext" to hex value "17668DFC7292532D". Set buffer "encryptedtext" to hex value "". Baldwin Informational, Expires 12/25/1999 837 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "decryptedtext" to hex value "". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Baldwin Informational, Expires 12/25/1999 838 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer Baldwin Informational, Expires 12/25/1999 839 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "plaintext". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "plaintext". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "ivector" and length of initialized bytes in buffer "ivector" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 840 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "ivector". Display buffer "encryptedtext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Cleanup Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check that encrypting 3 blocks at once produces Note: the same answer doing them one at a time with Note: the appropriate IVs. Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "ivector" to hex value "456789ABCDEF0123". Set buffer "plaintext" to hex value "". Set buffer "ciphertext" to hex value "". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and Baldwin Informational, Expires 12/25/1999 841 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Fill in data object with 24 random bytes. Create buffer "seed" of decimal value "6" bytes. Set buffer "seed" to hex value "a1b2c3d4e5f6". Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "seed" and length of initialized Baldwin Informational, Expires 12/25/1999 842 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "24". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "plaintext" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "plaintext" by "_OutputLen". Finalize "plaintext". Display buffer "plaintext". Call Call B_DestroyAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 843 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try again one block at a time. Create buffer "ciphertext1" of decimal value "16" bytes. Create buffer "ciphertext2" of decimal value "16" bytes. Create buffer "ciphertext3" of decimal value "16" bytes. Create buffer "plaintext1" of decimal value "16" bytes. Create buffer "plaintext2" of decimal value "16" bytes. Create buffer "plaintext3" of decimal value "16" bytes. Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 844 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "plaintext1" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "plaintext1" by "_OutputLen". Finalize "plaintext1". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "plaintext2" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "plaintext2" by "_OutputLen". Finalize "plaintext2". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "plaintext3" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "plaintext3" by "_OutputLen". Finalize "plaintext3". Display buffer "plaintext1". Display buffer "plaintext2". Display buffer "plaintext3". Call Call B_DestroyAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter1". Call B_CreateAlgorithmObject passing "encrypter1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter1" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter1" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 845 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypter1" and address of next free byte in buffer "ciphertext1" and address of "_OutputLen" and length of free bytes in buffer "ciphertext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter1" and address of next free byte in buffer "ciphertext1" and address of "_OutputLen" and length of free bytes in buffer "ciphertext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext1" by "_OutputLen". Finalize buffer "ciphertext1". Create algorithm object "encrypter2". Call B_CreateAlgorithmObject passing "encrypter2". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ciphertext1". Call B_SetAlgorithmInfo passing "encrypter2" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter2" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter2" and address of next free byte in buffer "ciphertext2" and address of "_OutputLen" and length of free bytes in buffer "ciphertext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext2" by "_OutputLen". Call B_EncryptFinal passing "encrypter2" and address of next free byte in buffer "ciphertext2" and address of "_OutputLen" and length of free bytes in buffer "ciphertext2" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 846 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext2" by "_OutputLen". Finalize buffer "ciphertext2". Create algorithm object "encrypter3". Call B_CreateAlgorithmObject passing "encrypter3". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ciphertext2". Call B_SetAlgorithmInfo passing "encrypter3" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter3" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter3" and address of next free byte in buffer "ciphertext3" and address of "_OutputLen" and length of free bytes in buffer "ciphertext3" and address of first initialized byte in buffer "plaintext3" and length of initialized bytes in buffer "plaintext3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext3" by "_OutputLen". Call B_EncryptFinal passing "encrypter3" and address of next free byte in buffer "ciphertext3" and address of "_OutputLen" and length of free bytes in buffer "ciphertext3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext3" by "_OutputLen". Finalize buffer "ciphertext3". Note: Check the plaintext. Display buffer "plaintext". Check equality of buffer "plaintext1" with hex value "88bca90e90875a7f". Check equality of buffer "plaintext2" with hex value "0f79c384627bafb2". Check equality of buffer "plaintext3" with hex value Baldwin Informational, Expires 12/25/1999 847 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "16f80a6f85920584". Note: Check the ciphertext. Display buffer "ciphertext". Check equality of buffer "ciphertext1" with hex value "7b9a60072946f295". Check equality of buffer "ciphertext2" with hex value "75d6c6ac805c5a23". Check equality of buffer "ciphertext3" with hex value "0d91b1830c8d1142". Note: ------------------------------------------------------- Note: - Check that output is produced whenever possible. Note: Test output of EncryptUpdate on various size inputs. Note: Try input lengths of 7, 8, 9, 15, 16, 17, 23, 24, 25. Create buffer "input" of decimal value "100" bytes. Create buffer "output1" of decimal value "100" bytes. Create buffer "output2" of decimal value "100" bytes. Create buffer "output3" of decimal value "100" bytes. Set buffer "input" to hex value "1122334455667788AA1122334455667 788AA1122334455667722334455667788". Set length of buffer "input" to decimal value "7". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Check equality of buffer "output1" with hex value "". Set length of buffer "input" to decimal value "8". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first Baldwin Informational, Expires 12/25/1999 848 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Check equality of buffer "output1" with hex value "0e75051bb4870f36". Set length of buffer "input" to decimal value "9". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "15". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "16". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 849 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "0e75051bb4870f36dec089c77d3d3ba3". Set length of buffer "input" to decimal value "17". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "23". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Baldwin Informational, Expires 12/25/1999 850 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "24". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "0e75051bb4870f36dec089c77d3d3ba3affd94870f492273". Set length of buffer "input" to decimal value "25". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Note: ------------------------------------------------------- Note: - Check that output is produced whenever possible. Note: Test output of DecryptUpdate on various size inputs. Note: Try input lengths of 7, 8, 9, 15, 16, 17, 23, 24, 25. Set buffer "input" to hex value "1122334455667788AA1122334455667 788AA1122334455667722334455667788". Set length of buffer "input" to decimal value "7". Set length of buffer "output1" to decimal value "0". Baldwin Informational, Expires 12/25/1999 851 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Check equality of buffer "output1" with hex value "". Set length of buffer "input" to decimal value "8". Set length of buffer "output1" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "ba3a677d27e39feb". Set length of buffer "input" to decimal value "9". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Baldwin Informational, Expires 12/25/1999 852 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "15". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "16". Set length of buffer "output1" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "ba3a677d27e39feb433c6d6b428a430a". Set length of buffer "input" to decimal value "17". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first Baldwin Informational, Expires 12/25/1999 853 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "23". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "24". Set length of buffer "output1" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "ba3a677d27e39feb433c6d6b428a430aa2ecc6cbba99f6e3". Set length of buffer "input" to decimal value "25". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and Baldwin Informational, Expires 12/25/1999 854 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Note: Cleanup This is the end of test case "TFDESC00". This is the start of test case "TFDESC01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test of AI_DES_CBC_IV8 Note: Depends on: Note: - KI_8Byte Note: Test cases Note: - Test that multiple EncryptUpdate calls produce the same Note: result as a single call. Two Update calls are made Note: with the first input block ranges from 0 to 8 long, Note: the second is ranges from 8 to 0. Note: - Test that multiple EncryptUpdate calls produce the same Note: result as a single call. Three Update calls are made Note: with the first input block ranges from 8 to 16 long, Note: the second block is 16 bytes long, and Note: the third ranges from 8 to 0. Note: - Test that multiple DecryptUpdate calls produce the same Note: result as a single call. Three Update calls are made Note: with the first input block ranges from 8 to 16 long, Note: the second block is 16 bytes long, and Note: the third ranges from 8 to 0. Note: - Test that multiple DecryptUpdate calls produce the same Note: result as a single call. Two Update calls are made Note: with the first input block ranges from 8 to 16 long, Note: the second ranges from 8 to 0. Baldwin Informational, Expires 12/25/1999 855 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Check that output is produced whenever possible. Note: Test output of EncryptUpdate on various size inputs. Note: Try input lengths of 7, 8, 9, 15, 16, 17, 23, 24, 25. Note: - Check that output is produced whenever possible. Note: Test output of DecryptUpdate on various size inputs. Note: Try input lengths of 7, 8, 9, 15, 16, 17, 23, 24, 25. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Create buffer "input1" of decimal value "100" bytes. Create buffer "input2" of decimal value "100" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test that multiple EncryptUpdate calls produce the same Note: result as a single call. Two Update calls are made Note: with the first input block ranges from 0 to 8 long, Note: the second is ranges from 8 to 0. Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "6789ABCDEF012345". Set buffer "ivector" to hex value "0000000000000000". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Baldwin Informational, Expires 12/25/1999 856 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute the expected answer. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 857 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "ciphertext". Display buffer "ciphertext". Note: Try 1-7 split Set buffer "input1" to hex value "67". Set buffer "input2" to hex value "89ABCDEF012345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 2-6 split Set buffer "input1" to hex value "6789". Set buffer "input2" to hex value "ABCDEF012345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and Baldwin Informational, Expires 12/25/1999 858 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 3-5 split Set buffer "input1" to hex value "6789AB". Set buffer "input2" to hex value "CDEF012345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 859 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 4-4 split Set buffer "input1" to hex value "6789ABCD". Set buffer "input2" to hex value "EF012345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 860 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 5-3 split Set buffer "input1" to hex value "6789ABCDEF". Set buffer "input2" to hex value "012345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 861 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 6-2 split Set buffer "input1" to hex value "6789ABCDEF01". Set buffer "input2" to hex value "2345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 7-1 split Set buffer "input1" to hex value "6789ABCDEF0123". Set buffer "input2" to hex value "45". Baldwin Informational, Expires 12/25/1999 862 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 8-0 split Set buffer "input1" to hex value "6789ABCDEF012345". Set buffer "input2" to hex value "". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address Baldwin Informational, Expires 12/25/1999 863 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: ------------------------------------------------------- Note: - Test that multiple EncryptUpdate calls produce the same Note: result as a single call. Three Update calls are made Note: with the first input block ranges from 8 to 16 long, Note: the second block is 16 bytes long, and Note: the third ranges from 8 to 0. Set buffer "plaintext" to hex value "101112131415161718192021222 3242526272829303132333435363738394041". Create buffer "input3" of decimal value "100" bytes. Note: Compute the expected answer. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 864 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Note: Try 8-16-8. Set buffer "input1" to hex value "1011121314151617". Set buffer "input2" to hex value "181920212223242526272829303132 33". Set buffer "input3" to hex value "3435363738394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 865 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 9-16-7. Set buffer "input1" to hex value "101112131415161718". Set buffer "input2" to hex value "192021222324252627282930313233 34". Set buffer "input3" to hex value "35363738394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 866 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 10-16-6. Set buffer "input1" to hex value "10111213141516171819". Set buffer "input2" to hex value "202122232425262728293031323334 35". Set buffer "input3" to hex value "363738394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Baldwin Informational, Expires 12/25/1999 867 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 11-16-5. Set buffer "input1" to hex value "1011121314151617181920". Set buffer "input2" to hex value "212223242526272829303132333435 36". Set buffer "input3" to hex value "3738394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 12-16-4. Baldwin Informational, Expires 12/25/1999 868 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input1" to hex value "101112131415161718192021". Set buffer "input2" to hex value "222324252627282930313233343536 37". Set buffer "input3" to hex value "38394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 13-16-3. Set buffer "input1" to hex value "10111213141516171819202122". Set buffer "input2" to hex value "232425262728293031323334353637 38". Baldwin Informational, Expires 12/25/1999 869 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input3" to hex value "394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 14-16-2. Set buffer "input1" to hex value "1011121314151617181920212223". Set buffer "input2" to hex value "242526272829303132333435363738 39". Set buffer "input3" to hex value "4041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 870 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 15-16-1. Set buffer "input1" to hex value "101112131415161718192021222324 ". Set buffer "input2" to hex value "252627282930313233343536373839 40". Set buffer "input3" to hex value "41". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 871 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 16-16-0. Set buffer "input1" to hex value "101112131415161718192021222324 25". Set buffer "input2" to hex value "262728293031323334353637383940 41". Set buffer "input3" to hex value "". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 872 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: ------------------------------------------------------- Note: - Test that multiple DecryptUpdate calls produce the same Note: result as a single call. Three Update calls are made Note: with the first input block ranges from 8 to 16 long, Note: the second block is 16 bytes long, and Note: the third ranges from 8 to 0. Note: The expected decryption of "ciphertext" is "plaintext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try 8-16-8. Set buffer "input1" to hex value "d41f760b73919265". Set buffer "input2" to hex value "52423c5b3204dfeecbdc9d7e6b8366 fa". Baldwin Informational, Expires 12/25/1999 873 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input3" to hex value "397cdf48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 9-16-7. Set buffer "input1" to hex value "d41f760b7391926552". Set buffer "input2" to hex value "423c5b3204dfeecbdc9d7e6b8366fa 39". Set buffer "input3" to hex value "7cdf48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 874 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 10-16-6. Set buffer "input1" to hex value "d41f760b739192655242". Set buffer "input2" to hex value "3c5b3204dfeecbdc9d7e6b8366fa39 7c". Set buffer "input3" to hex value "df48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 875 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 11-16-5. Set buffer "input1" to hex value "d41f760b7391926552423c". Set buffer "input2" to hex value "5b3204dfeecbdc9d7e6b8366fa397c df". Set buffer "input3" to hex value "48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 876 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 12-16-4. Set buffer "input1" to hex value "d41f760b7391926552423c5b". Set buffer "input2" to hex value "3204dfeecbdc9d7e6b8366fa397cdf 48". Set buffer "input3" to hex value "a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of Baldwin Informational, Expires 12/25/1999 877 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 13-16-3. Set buffer "input1" to hex value "d41f760b7391926552423c5b32". Set buffer "input2" to hex value "04dfeecbdc9d7e6b8366fa397cdf48 a2". Set buffer "input3" to hex value "e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 878 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 14-16-2. Set buffer "input1" to hex value "d41f760b7391926552423c5b3204". Set buffer "input2" to hex value "dfeecbdc9d7e6b8366fa397cdf48a2 e3". Set buffer "input3" to hex value "59dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 879 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 15-16-1. Set buffer "input1" to hex value "d41f760b7391926552423c5b3204df ". Set buffer "input2" to hex value "eecbdc9d7e6b8366fa397cdf48a2e3 59". Set buffer "input3" to hex value "dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 880 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 16-16-0. Set buffer "input1" to hex value "d41f760b7391926552423c5b3204df ee". Set buffer "input2" to hex value "cbdc9d7e6b8366fa397cdf48a2e359 dc". Set buffer "input3" to hex value "". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 881 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: - Test that multiple DecryptUpdate calls produce the same Note: result as a single call. Two Update calls are made Note: with the first input block ranges from 8 to 16 long, Note: the second ranges from 8 to 0. Note: Compute the expected answer. Set buffer "ciphertext" to hex value "d41f760b73919265397cdf48a2 e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Set buffer "plaintext" to contents of buffer "decryptedtext". Note: Try 8-8. Set buffer "input1" to hex value "d41f760b73919265". Set buffer "input3" to hex value "397cdf48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 882 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 9-7. Set buffer "input1" to hex value "d41f760b7391926539". Set buffer "input3" to hex value "7cdf48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 883 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 10-6. Set buffer "input1" to hex value "d41f760b73919265397c". Set buffer "input3" to hex value "df48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 11-5. Baldwin Informational, Expires 12/25/1999 884 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input1" to hex value "d41f760b73919265397cdf". Set buffer "input3" to hex value "48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 12-4. Set buffer "input1" to hex value "d41f760b73919265397cdf48". Set buffer "input3" to hex value "a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 885 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 13-3. Set buffer "input1" to hex value "d41f760b73919265397cdf48a2". Set buffer "input3" to hex value "e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 886 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 14-2. Set buffer "input1" to hex value "d41f760b73919265397cdf48a2e3". Set buffer "input3" to hex value "59dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 15-1. Set buffer "input1" to hex value "d41f760b73919265397cdf48a2e359 ". Set buffer "input3" to hex value "dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 887 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 16-0. Set buffer "input1" to hex value "d41f760b73919265397cdf48a2e359 dc". Set buffer "input3" to hex value "". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 888 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: - Check that output is produced whenever possible. Note: Test output of EncryptUpdate on various size inputs. Note: Try input lengths of 7, 8, 9, 15, 16, 17, 23, 24, 25. Set buffer "keytext" to hex value "0123456789ABCDEF". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "input" of decimal value "100" bytes. Create buffer "output1" of decimal value "100" bytes. Create buffer "output2" of decimal value "100" bytes. Create buffer "output3" of decimal value "100" bytes. Set buffer "input" to hex value "1122334455667788AA1122334455667 788AA1122334455667722334455667788". Set length of buffer "input" to decimal value "7". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 889 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Check equality of buffer "output1" with hex value "". Set length of buffer "input" to decimal value "8". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "b4cc3fd9d8d95214". Set length of buffer "input" to decimal value "9". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "15". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 890 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "16". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "b4cc3fd9d8d95214b0daeeb6504e8509". Set length of buffer "input" to decimal value "17". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Baldwin Informational, Expires 12/25/1999 891 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "input" to decimal value "23". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "24". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "b4cc3fd9d8d95214b0daeeb6504e85097e24b5c8197daa72". Set length of buffer "input" to decimal value "25". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 892 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Note: ------------------------------------------------------- Note: - Check that output is produced whenever possible. Note: Test output of DecryptUpdate on various size inputs. Note: Try input lengths of 7, 8, 9, 15, 16, 17, 23, 24, 25. Set buffer "input" to hex value "1122334455667788AA1122334455667 788AA1122334455667722334455667788". Set length of buffer "input" to decimal value "7". Set length of buffer "output1" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Check equality of buffer "output1" with hex value "". Set length of buffer "input" to decimal value "8". Set length of buffer "output1" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "ff5deed6ea0c9ec8". Baldwin Informational, Expires 12/25/1999 893 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "input" to decimal value "9". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "15". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "16". Set length of buffer "output1" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 894 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "ff5deed6ea0c9ec8433c6d6b428a430a". Set length of buffer "input" to decimal value "17". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "23". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "24". Set length of buffer "output1" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 895 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "ff5deed6ea0c9ec8433c6d6b428a430aa2ecc6cbba99f6e3". Set length of buffer "input" to decimal value "25". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Note: Cleanup This is the end of test case "TFDESC01". This is the start of test case "TFDESC02". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional & Error test of AI_DES_CBC_IV8 Note: Check that various KI types can be used. Note: Check that errors occur for incorrect KI types. Note: Depends on: Note: - KI_8Byte Note: - KI_24Byte Baldwin Informational, Expires 12/25/1999 896 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - KI_DES8 Note: - KI_DES_BSAFE1 Note: - KI_DESX Note: - KI_DESX_BSAFE1 Note: - KI_Item (0, 8, and 13 bytes) Note: - KI_PKCS_RSAPrivate Note: - KI_PKCS_RSAPrivateBER Note: - KI_RC2_BSAFE1 Note: - KI_RC2WithBSAFE1Params Note: - KI_RSA_CRT Note: - KI_RSAPrivate Note: - KI_RSAPrivateBSAFE1 Note: - KI_RSAPublic Note: - KI_RSAPublicBER Note: - KI_RSAPublicBSAFE1 Note: Test cases: Note: - Test algorithm with KI_8Byte Note: - Test algorithm with KI_DES8 Note: - Test algorithm with KI_Item (8 bytes) Note: - Test algorithm with KI_Item (13 bytes) Note: - Test algorithm with KI_Item (0 bytes) Note: - Test algorithm with KI_24Byte Note: - Test algorithm with KI_DES_BSAFE1 Note: - Test algorithm with KI_DESX Note: - Test algorithm with KI_DESX_BSAFE1 Note: To do: Note: - Test algorithm with KI_PKCS_RSAPrivate Note: - Test algorithm with KI_PKCS_RSAPrivateBER Note: - Test algorithm with KI_RC2_BSAFE1 Note: - Test algorithm with KI_RC2WithBSAFE1Params Note: - Test algorithm with KI_RSA_CRT Note: - Test algorithm with KI_RSAPrivate Note: - Test algorithm with KI_RSAPrivateBSAFE1 Note: - Test algorithm with KI_RSAPublic Note: - Test algorithm with KI_RSAPublicBER Note: - Test algorithm with KI_RSAPublicBSAFE1 Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "keyInfo" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Baldwin Informational, Expires 12/25/1999 897 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "6789ABCDEF012345". Set buffer "ivector" to hex value "00000000EFAB23EF". Set buffer "ciphertext1" to hex value "fc624960b90f7a7d". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test algorithm with KI_8Byte Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and Baldwin Informational, Expires 12/25/1999 898 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 899 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test algorithm with KI_DES8 Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DES8" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_DES8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Call Call B_DecryptInit passing "decrypter" and "key" and Baldwin Informational, Expires 12/25/1999 900 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test algorithm with KI_Item (8 bytes) Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 901 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 902 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Test algorithm with KI_Item (13 bytes) Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "01020304050607080910111213". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test algorithm with KI_Item (0 bytes) Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized fromO". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 903 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test algorithm with KI_24Byte Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from "0102030405060708091011121314151617181920212223 24". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test algorithm with KI_DES_BSAFE1 Create key object "key1". Baldwin Informational, Expires 12/25/1999 904 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateKeyObject passing "key1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DES8" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key1" and "KI_DES8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DES_BSAFE1". Call B_GetKeyInfo passing "_InfoPointer" and "key1" and "KI_DES_BSAFE1". Load buffer "keyInfo" from info structure for "KI_DES_BSAFE1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DES_BSAFE1" initialized from contents of buffer "keyInfo". Call B_SetKeyInfo passing "key" and "KI_DES_BSAFE1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 905 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test algorithm with KI_DESX Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DESX" initialized from contents of buffer "keytext", contents of Baldwin Informational, Expires 12/25/1999 906 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "keytext", contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_DESX" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test algorithm with KI_DESX_BSAFE1 Note: CreateKeyObject (key1) Note: SetKeyInfo (key1, KI_DESX, @keytext, @keytext, @keytext) Note: GetKeyInfoToData (keyInfo, key1, KI_DESX_BSAFE1) Note: DestroyKeyObject (key1) Note: CreateKeyObject (key) Note: SetKeyInfo (key, KI_DESX_BSAFE1, @keyInfo) Note: NextExpectedError(BE_WRONG_KEY_INFO) Note: EncryptInit (encrypter, key) Note: NextExpectedError(BE_WRONG_KEY_INFO) Note: DecryptInit (decrypter, key) Note: DestroyKeyObject (key) This is the end of test case "TFDESC02". This is the start of test case "TFRC2C00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test of AI_RC2_CBC: IV & CBC Note: Depends on: Baldwin Informational, Expires 12/25/1999 907 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - AI_MD5Random Note: - KI_8Byte Note: Test cases Note: - Same result produced for first block of CBC Note: when the IV and plaintext are switched, since Note: it is their xor that is encrypted. Test for Note: non-zero plaintext and IV. Note: - Check that encrypting 3 blocks at once produces Note: the same answer doing them one at a time with Note: the appropriate IVs. Note: History: Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "AM_MD5_RANDOM", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Same result produced for first block of CBC Note: when the IV and plaintext are switched, since Note: it is their xor that is encrypted. Test for Note: zero and non-zero plaintext. Baldwin Informational, Expires 12/25/1999 908 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keytext" to hex value "0123456789ABCDEF". Note: SetData (plaintext, 11 11 11 11 11 11 11 11) Set buffer "plaintext" to hex value "1110010110010100". Set buffer "ivector" to hex value "0001101001101011". Set buffer "ciphertext" to hex value "83919a5cbdda91e8". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 909 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 910 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "plaintext". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "plaintext". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "ivector" and length of initialized bytes in buffer "ivector" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and Baldwin Informational, Expires 12/25/1999 911 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "ivector". Display buffer "encryptedtext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Cleanup Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check that encrypting 3 blocks at once produces Note: the same answer doing them one at a time with Note: the appropriate IVs. Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "ivector" to hex value "456789ABCDEF0123". Set buffer "plaintext" to hex value "". Set buffer "ciphertext" to hex value "". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Baldwin Informational, Expires 12/25/1999 912 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Fill in data object with 24 random bytes. Create buffer "seed" of decimal value "6" bytes. Set buffer "seed" to hex value "a1b2c3d4e5f6". Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and Baldwin Informational, Expires 12/25/1999 913 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "24". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "plaintext" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "plaintext" by "_OutputLen". Finalize "plaintext". Display buffer "plaintext". Call Call B_DestroyAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 914 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try again one block at a time. Create buffer "ciphertext1" of decimal value "16" bytes. Create buffer "ciphertext2" of decimal value "16" bytes. Create buffer "ciphertext3" of decimal value "16" bytes. Create buffer "plaintext1" of decimal value "16" bytes. Create buffer "plaintext2" of decimal value "16" bytes. Create buffer "plaintext3" of decimal value "16" bytes. Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" Baldwin Informational, Expires 12/25/1999 915 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "plaintext1" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "plaintext1" by "_OutputLen". Finalize "plaintext1". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "plaintext2" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "plaintext2" by "_OutputLen". Finalize "plaintext2". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "plaintext3" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "plaintext3" by "_OutputLen". Finalize "plaintext3". Display buffer "plaintext1". Display buffer "plaintext2". Display buffer "plaintext3". Call Call B_DestroyAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter1". Call B_CreateAlgorithmObject passing "encrypter1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer Baldwin Informational, Expires 12/25/1999 916 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "ivector". Call B_SetAlgorithmInfo passing "encrypter1" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter1" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter1" and address of next free byte in buffer "ciphertext1" and address of "_OutputLen" and length of free bytes in buffer "ciphertext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter1" and address of next free byte in buffer "ciphertext1" and address of "_OutputLen" and length of free bytes in buffer "ciphertext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext1" by "_OutputLen". Finalize buffer "ciphertext1". Create algorithm object "encrypter2". Call B_CreateAlgorithmObject passing "encrypter2". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "ciphertext1". Call B_SetAlgorithmInfo passing "encrypter2" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter2" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter2" and address of next free byte in buffer "ciphertext2" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 917 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "ciphertext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext2" by "_OutputLen". Call B_EncryptFinal passing "encrypter2" and address of next free byte in buffer "ciphertext2" and address of "_OutputLen" and length of free bytes in buffer "ciphertext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext2" by "_OutputLen". Finalize buffer "ciphertext2". Create algorithm object "encrypter3". Call B_CreateAlgorithmObject passing "encrypter3". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "ciphertext2". Call B_SetAlgorithmInfo passing "encrypter3" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter3" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter3" and address of next free byte in buffer "ciphertext3" and address of "_OutputLen" and length of free bytes in buffer "ciphertext3" and address of first initialized byte in buffer "plaintext3" and length of initialized bytes in buffer "plaintext3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext3" by "_OutputLen". Call B_EncryptFinal passing "encrypter3" and address of next free byte in buffer "ciphertext3" and address of "_OutputLen" and length of free bytes in buffer "ciphertext3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 918 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext3" by "_OutputLen". Finalize buffer "ciphertext3". Note: Check the plaintext. Display buffer "plaintext". Check equality of buffer "plaintext1" with hex value "88bca90e90875a7f". Check equality of buffer "plaintext2" with hex value "0f79c384627bafb2". Check equality of buffer "plaintext3" with hex value "16f80a6f85920584". Note: Check the ciphertext. Display buffer "ciphertext". Check equality of buffer "ciphertext1" with hex value "b0e5cddd09cb4581". Check equality of buffer "ciphertext2" with hex value "b20420abb639d2be". Check equality of buffer "ciphertext3" with hex value "0bb613fc9b702a66". Note: Cleanup This is the end of test case "TFRC2C00". This is the start of test case "TFRC2C01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test of AI_RC2_CBC chaining & buffering Note: Depends on: Note: - KI_8Byte Note: Test cases Note: - Test that multiple EncryptUpdate calls produce the same Note: result as a single call. Two Update calls are made Note: with the first input block ranges from 0 to 8 long, Note: the second is ranges from 8 to 0. Note: - Test that multiple EncryptUpdate calls produce the same Note: result as a single call. Three Update calls are made Note: with the first input block ranges from 8 to 16 long, Note: the second block is 16 bytes long, and Note: the third ranges from 8 to 0. Note: - Test that multiple DecryptUpdate calls produce the same Note: result as a single call. Three Update calls are made Baldwin Informational, Expires 12/25/1999 919 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: with the first input block ranges from 8 to 16 long, Note: the second block is 16 bytes long, and Note: the third ranges from 8 to 0. Note: - Test that multiple DecryptUpdate calls produce the same Note: result as a single call. Two Update calls are made Note: with the first input block ranges from 8 to 16 long, Note: the second ranges from 8 to 0. Note: - Check that output is produced whenever possible. Note: Test output of EncryptUpdate on various size inputs. Note: Try input lengths of 7, 8, 9, 15, 16, 17, 23, 24, 25. Note: - Check that output is produced whenever possible. Note: Test output of DecryptUpdate on various size inputs. Note: Try input lengths of 7, 8, 9, 15, 16, 17, 23, 24, 25. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Create buffer "input" of decimal value "100" bytes. Create buffer "input1" of decimal value "100" bytes. Create buffer "input2" of decimal value "100" bytes. Create buffer "input3" of decimal value "100" bytes. Create buffer "output1" of decimal value "100" bytes. Create buffer "output2" of decimal value "100" bytes. Create buffer "output3" of decimal value "100" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 920 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: - Test that multiple EncryptUpdate calls produce the same Note: result as a single call. Two Update calls are made Note: with the first input block ranges from 0 to 8 long, Note: the second is ranges from 8 to 0. Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "6789ABCDEF012345". Set buffer "ivector" to hex value "0000000000000000". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute the expected answer. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "plaintext" and length of Baldwin Informational, Expires 12/25/1999 921 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Note: Try 1-7 split Set buffer "input1" to hex value "67". Set buffer "input2" to hex value "89ABCDEF012345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 922 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 2-6 split Set buffer "input1" to hex value "6789". Set buffer "input2" to hex value "ABCDEF012345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 3-5 split Set buffer "input1" to hex value "6789AB". Baldwin Informational, Expires 12/25/1999 923 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input2" to hex value "CDEF012345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 4-4 split Set buffer "input1" to hex value "6789ABCD". Set buffer "input2" to hex value "EF012345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 924 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 5-3 split Set buffer "input1" to hex value "6789ABCDEF". Set buffer "input2" to hex value "012345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 925 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 6-2 split Set buffer "input1" to hex value "6789ABCDEF01". Set buffer "input2" to hex value "2345". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 926 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 7-1 split Set buffer "input1" to hex value "6789ABCDEF0123". Set buffer "input2" to hex value "45". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 927 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Try 8-0 split Set buffer "input1" to hex value "6789ABCDEF012345". Set buffer "input2" to hex value "". Set buffer "encryptedtext" to hex value "". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: ------------------------------------------------------- Note: - Test that multiple EncryptUpdate calls produce the same Note: result as a single call. Three Update calls are made Note: with the first input block ranges from 8 to 16 long, Note: the second block is 16 bytes long, and Note: the third ranges from 8 to 0. Set buffer "plaintext" to hex value "101112131415161718192021222 3242526272829303132333435363738394041". Baldwin Informational, Expires 12/25/1999 928 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Compute the expected answer. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Note: Try 8-16-8. Set buffer "input1" to hex value "1011121314151617". Set buffer "input2" to hex value "181920212223242526272829303132 33". Set buffer "input3" to hex value "3435363738394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 929 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 9-16-7. Set buffer "input1" to hex value "101112131415161718". Set buffer "input2" to hex value "192021222324252627282930313233 34". Set buffer "input3" to hex value "35363738394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 930 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 10-16-6. Set buffer "input1" to hex value "10111213141516171819". Set buffer "input2" to hex value "202122232425262728293031323334 35". Set buffer "input3" to hex value "363738394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 931 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 11-16-5. Set buffer "input1" to hex value "1011121314151617181920". Set buffer "input2" to hex value "212223242526272829303132333435 36". Set buffer "input3" to hex value "3738394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 932 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 12-16-4. Set buffer "input1" to hex value "101112131415161718192021". Set buffer "input2" to hex value "222324252627282930313233343536 37". Set buffer "input3" to hex value "38394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 933 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 13-16-3. Set buffer "input1" to hex value "10111213141516171819202122". Set buffer "input2" to hex value "232425262728293031323334353637 38". Set buffer "input3" to hex value "394041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 934 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 14-16-2. Set buffer "input1" to hex value "1011121314151617181920212223". Set buffer "input2" to hex value "242526272829303132333435363738 39". Set buffer "input3" to hex value "4041". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 935 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Try 15-16-1. Set buffer "input1" to hex value "101112131415161718192021222324 ". Set buffer "input2" to hex value "252627282930313233343536373839 40". Set buffer "input3" to hex value "41". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: Try 16-16-0. Set buffer "input1" to hex value "101112131415161718192021222324 Baldwin Informational, Expires 12/25/1999 936 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 25". Set buffer "input2" to hex value "262728293031323334353637383940 41". Set buffer "input3" to hex value "". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Note: ------------------------------------------------------- Note: - Test that multiple DecryptUpdate calls produce the same Note: result as a single call. Three Update calls are made Note: with the first input block ranges from 8 to 16 long, Note: the second block is 16 bytes long, and Note: the third ranges from 8 to 0. Baldwin Informational, Expires 12/25/1999 937 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Compute the expected decryption of the input value. Set buffer "input" to hex value "d41f760b7391926552423c5b3204dfe ecbdc9d7e6b8366fa397cdf48a2e359dc". Set buffer "plaintext" to hex value "". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "plaintext" and address of "_OutputLen" and length of free bytes in buffer "plaintext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plaintext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "plaintext" and address of "_OutputLen" and length of free bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plaintext" by "_OutputLen". Finalize buffer "plaintext". Note: Try 8-16-8. Set buffer "input1" to hex value "d41f760b73919265". Set buffer "input2" to hex value "52423c5b3204dfeecbdc9d7e6b8366 fa". Set buffer "input3" to hex value "397cdf48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 938 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 9-16-7. Set buffer "input1" to hex value "d41f760b7391926552". Set buffer "input2" to hex value "423c5b3204dfeecbdc9d7e6b8366fa 39". Set buffer "input3" to hex value "7cdf48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 939 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 10-16-6. Set buffer "input1" to hex value "d41f760b739192655242". Set buffer "input2" to hex value "3c5b3204dfeecbdc9d7e6b8366fa39 7c". Set buffer "input3" to hex value "df48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 940 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 11-16-5. Set buffer "input1" to hex value "d41f760b7391926552423c". Set buffer "input2" to hex value "5b3204dfeecbdc9d7e6b8366fa397c df". Set buffer "input3" to hex value "48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 941 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 12-16-4. Set buffer "input1" to hex value "d41f760b7391926552423c5b". Set buffer "input2" to hex value "3204dfeecbdc9d7e6b8366fa397cdf 48". Set buffer "input3" to hex value "a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 942 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 13-16-3. Set buffer "input1" to hex value "d41f760b7391926552423c5b32". Set buffer "input2" to hex value "04dfeecbdc9d7e6b8366fa397cdf48 a2". Set buffer "input3" to hex value "e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 943 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 14-16-2. Set buffer "input1" to hex value "d41f760b7391926552423c5b3204". Set buffer "input2" to hex value "dfeecbdc9d7e6b8366fa397cdf48a2 e3". Set buffer "input3" to hex value "59dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 944 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Try 15-16-1. Set buffer "input1" to hex value "d41f760b7391926552423c5b3204df ". Set buffer "input2" to hex value "eecbdc9d7e6b8366fa397cdf48a2e3 59". Set buffer "input3" to hex value "dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 16-16-0. Baldwin Informational, Expires 12/25/1999 945 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input1" to hex value "d41f760b7391926552423c5b3204df ee". Set buffer "input2" to hex value "cbdc9d7e6b8366fa397cdf48a2e359 dc". Set buffer "input3" to hex value "". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: - Test that multiple DecryptUpdate calls produce the same Note: result as a single call. Two Update calls are made Note: with the first input block ranges from 8 to 16 long, Note: the second ranges from 8 to 0. Baldwin Informational, Expires 12/25/1999 946 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Compute the expected answer. Set buffer "ciphertext" to hex value "d41f760b73919265397cdf48a2 e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Set buffer "plaintext" to contents of buffer "decryptedtext". Note: Try 8-8. Set buffer "input1" to hex value "d41f760b73919265". Set buffer "input3" to hex value "397cdf48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 947 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 9-7. Set buffer "input1" to hex value "d41f760b7391926539". Set buffer "input3" to hex value "7cdf48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 10-6. Set buffer "input1" to hex value "d41f760b73919265397c". Set buffer "input3" to hex value "df48a2e359dc". Baldwin Informational, Expires 12/25/1999 948 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 11-5. Set buffer "input1" to hex value "d41f760b73919265397cdf". Set buffer "input3" to hex value "48a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 949 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 12-4. Set buffer "input1" to hex value "d41f760b73919265397cdf48". Set buffer "input3" to hex value "a2e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 950 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Try 13-3. Set buffer "input1" to hex value "d41f760b73919265397cdf48a2". Set buffer "input3" to hex value "e359dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 14-2. Set buffer "input1" to hex value "d41f760b73919265397cdf48a2e3". Set buffer "input3" to hex value "59dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 951 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 15-1. Set buffer "input1" to hex value "d41f760b73919265397cdf48a2e359 ". Set buffer "input3" to hex value "dc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 952 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: Try 16-0. Set buffer "input1" to hex value "d41f760b73919265397cdf48a2e359 dc". Set buffer "input3" to hex value "". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: - Check that output is produced whenever possible. Note: Test output of EncryptUpdate on various size inputs. Note: Try input lengths of 7, 8, 9, 15, 16, 17, 23, 24, 25. Set buffer "input" to hex value "1122334455667788AA1122334455667 788AA1122334455667722334455667788". Baldwin Informational, Expires 12/25/1999 953 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "input" to decimal value "7". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Check equality of buffer "output1" with hex value "". Set length of buffer "input" to decimal value "8". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "560788c117ec3bf0". Set length of buffer "input" to decimal value "9". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 954 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "15". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "16". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "560788c117ec3bf028d552db234b64c5". Set length of buffer "input" to decimal value "17". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 955 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "23". Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "24". Set length of buffer "output1" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "560788c117ec3bf028d552db234b64c58e0c5d57af03d760". Set length of buffer "input" to decimal value "25". Baldwin Informational, Expires 12/25/1999 956 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "output2" to decimal value "0". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Note: ------------------------------------------------------- Note: - Check that output is produced whenever possible. Note: Test output of DecryptUpdate on various size inputs. Note: Try input lengths of 7, 8, 9, 15, 16, 17, 23, 24, 25. Set buffer "input" to hex value "1122334455667788AA1122334455667 788AA1122334455667722334455667788". Set length of buffer "input" to decimal value "7". Set length of buffer "output1" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Check equality of buffer "output1" with hex value "". Set length of buffer "input" to decimal value "8". Set length of buffer "output1" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 957 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "d46ab3ff76a5760b". Set length of buffer "input" to decimal value "9". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "15". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "16". Baldwin Informational, Expires 12/25/1999 958 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "output1" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "d46ab3ff76a5760b9501480e891f7022". Set length of buffer "input" to decimal value "17". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "23". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 959 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Set length of buffer "input" to decimal value "24". Set length of buffer "output1" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Display buffer "output1". Check equality of buffer "output1" with hex value "d46ab3ff76a5760b9501480e891f70228424327e384f4a5e". Set length of buffer "input" to decimal value "25". Set length of buffer "output2" to decimal value "0". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Display buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Note: Cleanup This is the end of test case "TFRC2C01". This is the start of test case "TFRC2C02". Baldwin Informational, Expires 12/25/1999 960 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests, RC2 encryption and decryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "NULL_PTR". Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122eeff". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, get the algorithm Note: info in BER Note: format, build another algorithm object, encrypt the input Baldwin Informational, Expires 12/25/1999 961 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: with this new Note: algorithm object and compare to the encrypted data of the Note: original Note: algorithm object. Decrypt the encrypted data and compare Note: the decryption Note: result with the original input. Do this with various Note: effective key bits. Create buffer "algInfoBER" of decimal value "256" bytes. Create buffer "input" of decimal value "16" bytes. Create buffer "output" of decimal value "24" bytes. Create buffer "outputBER" of decimal value "24" bytes. Create buffer "unput" of decimal value "24" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "128" bytes. Create buffer "keyLen" of decimal value "3" bytes. Create buffer "effective" of decimal value "3" bytes. Set buffer "keyLen" to hex value "1". Set buffer "effective" to hex value "1". Note: Outer loop, keyLen, 1 to 128 bytes Begin a loop of decimal value "128" iterations. Note: Inner loop, effective key bits, 1 to 1024 bits Begin a loop of decimal value "8" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 962 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from contents of buffer "effective", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 963 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "output". Note: Get the Alg info in BER format Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptObj" and "AI_RC2_CBCPadBER". Load buffer "algInfoBER" from info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encryptBER". Call B_CreateAlgorithmObject passing "encryptBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER" initialized from contents of buffer "algInfoBER". Call B_SetAlgorithmInfo passing "encryptBER" and "AI_RC2_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptBER" and address of next free byte in buffer "outputBER" and address of "_OutputLen" and length of free bytes in buffer "outputBER" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputBER" by "_OutputLen". Call B_EncryptFinal passing "encryptBER" and address of next free byte in buffer "outputBER" and address of "_OutputLen" and length of free bytes in buffer "outputBER" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "outputBER" by "_OutputLen". Finalize buffer "outputBER". Check equality of buffer "output" with contents of buffer "outputBER". Call Call B_DestroyAlgorithmObject passing "encryptBER". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 964 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from contents of buffer "effective", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 965 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Increment buffer "effective" by decimal value "1". End the loop and display execution times. Increment buffer "keyLen" by decimal value "1". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TFRC2C02". This is the start of test case "TFRC5B02". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for AI_RC5_CBCPadBER Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC5_CBC_ENCRYPT", "AM_RC5_CBC_DECRYPT", "AM_MD5_RANDOM", "NULL_PTR". Create buffer "input" of decimal value "256" bytes. Set buffer "input" to hex value "99aabbcc". Create buffer "output" of decimal value "264" bytes. Create buffer "unput" of decimal value "256" bytes. Create buffer "ber" of decimal value "40" bytes. Create buffer "keyData" of decimal value "256" bytes. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and Baldwin Informational, Expires 12/25/1999 966 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "input" and length of initialized bytes in "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "rounds" of decimal value "4" bytes. Create buffer "keyLen" of decimal value "4" bytes. Set buffer "rounds" to hex value "0". Create buffer "initVector" of decimal value "8" bytes. Begin a loop of decimal value "256" iterations. Set buffer "keyLen" to hex value "8". Begin a loop of decimal value "4" iterations. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Set "_OutputLen" to decimal value "253". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Create key object "rc5Key". Call B_CreateKeyObject passing "rc5Key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 967 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "rc5Key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rc5Encrypt". Call B_CreateAlgorithmObject passing "rc5Encrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad" initialized from "10", contents of buffer "rounds", "32", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "rc5Encrypt" and "AI_RC5_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "rc5Encrypt" and "AI_RC5_CBCPadBER". Load buffer "ber" from info structure for "AI_RC5_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "rc5Decrypt". Call B_CreateAlgorithmObject passing "rc5Decrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER" initialized from contents of buffer "ber". Call B_SetAlgorithmInfo passing "rc5Decrypt" and "AI_RC5_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "rc5Encrypt" and "rc5Key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "rc5Encrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first Baldwin Informational, Expires 12/25/1999 968 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "rc5Encrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Call Call B_DecryptInit passing "rc5Decrypt" and "rc5Key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "rc5Decrypt" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "rc5Decrypt" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "unput" with contents of buffer "input". Call Call B_DestroyAlgorithmObject passing "rc5Encrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc5Decrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "rc5Key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 969 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment buffer "keyLen" by decimal value "64". End the loop and display execution times. Increment buffer "rounds" by decimal value "1". End the loop and display execution times. This is the end of test case "TFRC5B02". This is the start of test case "TLRC2C05". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_RC2_CBC all allowed key sizes Note: Depends on: Note: - KI_Item Note: Test Cases: Note: - For an 8 byte key, try effective key sizes from 1 to Note: 1024 bits Note: check that encryption equals decryption for 32 byte Note: input. Note: Generate new input data, key bytes and IV for each case. Note: - For an 80 bit effective keysize, try key byte length Note: from 1 to 128 Note: check that encryption equals decryption for 32 byte Note: input. Note: Generate new input data, key bytes and IV for each case. Note: - For key byte length from 1 to 128 by 1, and Note: for effective key size from 1 to 1024 by 1 Note: check that encryption equals decryption for 32 byte Note: input. Note: Use same input block and IV for each case. Note: To Do: Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "NULL_PTR". Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 970 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Setup data objects Create buffer "dataLen" of decimal value "2" bytes. Note: Hex 20 = 32 decimal. Set buffer "dataLen" to hex value "20". Create buffer "input" of contents of buffer "dataLen" bytes. Create buffer "output" of contents of buffer "dataLen" bytes. Create buffer "unput" of contents of buffer "dataLen" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "500" bytes. Create buffer "keyByteLen" of decimal value "2" bytes. Create buffer "effectiveKeyBits" of decimal value "2" bytes. Note: ---------------------------------------------------------- Note: ---------- Note: - For an 8 byte key, try effective key sizes from 1 to Note: 1024 bits Note: check that encryption equals decryption for 32 byte Note: input. Note: Generate new input data, key bytes and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Set buffer "effectiveKeyBits" to hex value "1". Set buffer "keyByteLen" to hex value "8". Begin a loop of decimal value "1024" iterations. Note: Generate random input bytes, a random init vector, and a Baldwin Informational, Expires 12/25/1999 971 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: random key. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Display buffer "effectiveKeyBits". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the effective number of key bits in the algorithm Note: objects. Display buffer "effectiveKeyBits". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 972 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 973 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next effective keysize. Increment buffer "effectiveKeyBits" by decimal value "1". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: - For an 80 bit effective keysize, try key byte length Note: from 1 to 128 Note: check that encryption equals decryption for 32 byte Note: input. Note: Generate new input data, key bytes and IV for each case. Baldwin Informational, Expires 12/25/1999 974 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keyData" to hex value "0102030405060708". Note: 50 hex == 80 decimal Set buffer "effectiveKeyBits" to hex value "50". Set buffer "keyByteLen" to hex value "1". Begin a loop of decimal value "128" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the effective number of key bits in the algorithm Baldwin Informational, Expires 12/25/1999 975 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: objects. Display buffer "effectiveKeyBits". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 976 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next key byte length. Increment buffer "keyByteLen" by decimal value "1". End the loop and display execution times. Baldwin Informational, Expires 12/25/1999 977 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: - For key byte length from 1 to 128 by 1, and Note: for effective key size from 1 to 1024 by 1 Note: check that encryption equals decryption for 32 byte Note: input. Note: Use same input block and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Note: Use same input block and IV for each case. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Loop over number of key bytes. Set buffer "keyByteLen" to hex value "1". Begin a loop of decimal value "128" iterations. Note: Generate random key bytes. Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 978 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Loop over effective key bits. Set buffer "effectiveKeyBits" to hex value "1". Begin a loop of decimal value "1024" iterations. Note: Set the effective number of key bits in the algorithm Note: objects. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 979 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the encryption and decryption objects. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Baldwin Informational, Expires 12/25/1999 980 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next effective keysize. Increment buffer "effectiveKeyBits" by decimal value "1". End the loop and display execution times. Note: Advance to next key byte length. Increment buffer "keyByteLen" by decimal value "1". Note: Destroy the key object. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: Cleanup This is the end of test case "TLRC2C05". This is the start of test case "TQRC2C05". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests of AI_RC2_CBC all allowed key sizes Note: Depends on: Note: - KI_Item Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "NULL_PTR". Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 981 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Setup data objects Create buffer "dataLen" of decimal value "2" bytes. Note: Hex 20 = 32 decimal. Set buffer "dataLen" to hex value "20". Create buffer "input" of contents of buffer "dataLen" bytes. Create buffer "output" of contents of buffer "dataLen" bytes. Create buffer "unput" of contents of buffer "dataLen" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "500" bytes. Create buffer "keyByteLen" of decimal value "2" bytes. Create buffer "effectiveKeyBits" of decimal value "2" bytes. Note: ---------------------------------------------------------- Note: ---------- Note: - For an 8 byte key, try effective key sizes from 1 to Note: 1024 bits Note: check that encryption equals decryption for 32 byte Note: input. Note: Generate new input data, key bytes and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Set buffer "effectiveKeyBits" to hex value "1". Set buffer "keyByteLen" to hex value "8". Begin a loop of decimal value "31" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Baldwin Informational, Expires 12/25/1999 982 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Display buffer "effectiveKeyBits". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the effective number of key bits in the algorithm Note: objects. Display buffer "effectiveKeyBits". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 983 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 984 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next effective keysize. Increment buffer "effectiveKeyBits" by decimal value "32". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: - For an 80 bit effective keysize, try key byte length Note: from 1 to 128 Note: check that encryption equals decryption for 32 byte Note: input. Note: Generate new input data, key bytes and IV for each case. Baldwin Informational, Expires 12/25/1999 985 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keyData" to hex value "0102030405060708". Note: 50 hex == 80 decimal Set buffer "effectiveKeyBits" to hex value "50". Set buffer "keyByteLen" to hex value "1". Begin a loop of decimal value "15" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the effective number of key bits in the algorithm Note: objects. Baldwin Informational, Expires 12/25/1999 986 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "effectiveKeyBits". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 987 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next key byte length. Increment buffer "keyByteLen" by decimal value "8". End the loop and display execution times. Baldwin Informational, Expires 12/25/1999 988 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: - For key byte length from 1 to 128 by 1, and Note: for effective key size from 1 to 1024 by 1 Note: check that encryption equals decryption for 32 byte Note: input. Note: Use same input block and IV for each case. Set buffer "keyData" to hex value "0102030405060708". Note: Use same input block and IV for each case. Set "_OutputLen" to contents of buffer "dataLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Note: Loop over number of key bytes. Set buffer "keyByteLen" to hex value "1". Begin a loop of decimal value "7" iterations. Note: Generate random key bytes. Set "_OutputLen" to contents of buffer "keyByteLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Note: Set the key object. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" Baldwin Informational, Expires 12/25/1999 989 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Loop over effective key bits. Set buffer "effectiveKeyBits" to hex value "1". Begin a loop of decimal value "15" iterations. Note: Set the effective number of key bits in the algorithm Note: objects. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from contents of buffer "effectiveKeyBits", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 990 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the encryption and decryption objects. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 991 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Advance to next effective keysize. Increment buffer "effectiveKeyBits" by decimal value "64". End the loop and display execution times. Note: Advance to next key byte length. Increment buffer "keyByteLen" by decimal value "16". Note: Destroy the key object. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: Cleanup This is the end of test case "TQRC2C05". This is the start of test case "TVDES100". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Tests AI_DES_CBC_BSAFE1 raw. Note: Test cases: Note: - The NIST test vectors for DES ECB. Note: Depends on: Note: - AI_DES_CBCBSAFE1 Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Baldwin Informational, Expires 12/25/1999 992 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_BSAFE1" initialized from "B_BSAFE1_RAW". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_BSAFE1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_BSAFE1" initialized from "B_BSAFE1_RAW". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_BSAFE1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 0 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "8CA64DE9C1B123A7". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 993 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 994 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 1 Set buffer "keytext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "7359B2163E4EDC58". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 995 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 2 Set buffer "keytext" to hex value "3000000000000000". Set buffer "plaintext" to hex value "1000000000000001". Set buffer "ciphertext" to hex value "958E6E627A05557B". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and Baldwin Informational, Expires 12/25/1999 996 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 997 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 3 Set buffer "keytext" to hex value "1111111111111111". Set buffer "plaintext" to hex value "1111111111111111". Set buffer "ciphertext" to hex value "F40379AB9E0EC533". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 998 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 4 Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "1111111111111111". Set buffer "ciphertext" to hex value "17668DFC7292532D". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and Baldwin Informational, Expires 12/25/1999 999 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 1000 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 5 Set buffer "keytext" to hex value "1111111111111111". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "8A5AE1F81AB8F2DD". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and Baldwin Informational, Expires 12/25/1999 1001 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 6 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "8CA64DE9C1B123A7". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1002 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1003 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 7 Set buffer "keytext" to hex value "FEDCBA9876543210". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "ED39D950FA74BCC4". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1004 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 8 Set buffer "keytext" to hex value "7CA110454A1A6E57". Set buffer "plaintext" to hex value "01A1D6D039776742". Set buffer "ciphertext" to hex value "690F5B0D9A26939B". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1005 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1006 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 9 Set buffer "keytext" to hex value "0131D9619DC1376E". Set buffer "plaintext" to hex value "5CD54CA83DEF57DA". Set buffer "ciphertext" to hex value "7A389D10354BD271". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1007 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 10 Set buffer "keytext" to hex value "07A1133E4A0B2686". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "ciphertext" to hex value "868EBB51CAB4599A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1008 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1009 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Test case 11 Set buffer "keytext" to hex value "3849674C2602319E". Set buffer "plaintext" to hex value "51454B582DDF440A". Set buffer "ciphertext" to hex value "7178876E01F19B2A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1010 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 12 Set buffer "keytext" to hex value "04B915BA43FEB5B6". Set buffer "plaintext" to hex value "42FD443059577FA2". Set buffer "ciphertext" to hex value "AF37FB421F8C4095". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1011 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1012 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Test case 13 Set buffer "keytext" to hex value "0113B970FD34F2CE". Set buffer "plaintext" to hex value "059B5E0851CF143A". Set buffer "ciphertext" to hex value "86A560F10EC6D85B". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1013 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 14 Set buffer "keytext" to hex value "0170F175468FB5E6". Set buffer "plaintext" to hex value "0756D8E0774761D2". Set buffer "ciphertext" to hex value "0CD3DA020021DC09". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 1014 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1015 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test case 15 Set buffer "keytext" to hex value "43297FAD38E373FE". Set buffer "plaintext" to hex value "762514B829BF486A". Set buffer "ciphertext" to hex value "EA676B2CB7DB2B7A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 1016 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 16 Set buffer "keytext" to hex value "07A7137045DA2A16". Set buffer "plaintext" to hex value "3BDD119049372802". Set buffer "ciphertext" to hex value "DFD64A815CAF1A0F". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1017 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 17 Baldwin Informational, Expires 12/25/1999 1018 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keytext" to hex value "04689104C2FD3B2F". Set buffer "plaintext" to hex value "26955F6835AF609A". Set buffer "ciphertext" to hex value "5C513C9C4886C088". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1019 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 18 Set buffer "keytext" to hex value "37D06BB516CB7546". Set buffer "plaintext" to hex value "164D5E404F275232". Set buffer "ciphertext" to hex value "0A2AEEAE3FF4AB77". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address Baldwin Informational, Expires 12/25/1999 1020 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 19 Baldwin Informational, Expires 12/25/1999 1021 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keytext" to hex value "1F08260D1AC2465E". Set buffer "plaintext" to hex value "6B056E18759F5CCA". Set buffer "ciphertext" to hex value "EF1BF03E5DFA575A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1022 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 20 Set buffer "keytext" to hex value "584023641ABA6176". Set buffer "plaintext" to hex value "004BD6EF09176062". Set buffer "ciphertext" to hex value "88BF0DB6D70DEE56". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of Baldwin Informational, Expires 12/25/1999 1023 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 21 Set buffer "keytext" to hex value "025816164629B007". Baldwin Informational, Expires 12/25/1999 1024 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "plaintext" to hex value "480D39006EE762F2". Set buffer "ciphertext" to hex value "A1F9915541020B56". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of Baldwin Informational, Expires 12/25/1999 1025 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 22 Set buffer "keytext" to hex value "49793EBC79B3258F". Set buffer "plaintext" to hex value "437540C8698F3CFA". Set buffer "ciphertext" to hex value "6FBF1CAFCFFD0556". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 1026 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 23 Set buffer "keytext" to hex value "4FB05E1515AB73A7". Set buffer "plaintext" to hex value "072D43A077075292". Baldwin Informational, Expires 12/25/1999 1027 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "ciphertext" to hex value "2F22E49BAB7CA1AC". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 1028 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 24 Set buffer "keytext" to hex value "49E95D6D4CA229BF". Set buffer "plaintext" to hex value "02FE55778117F12A". Set buffer "ciphertext" to hex value "5A6B612CC26CCE4A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1029 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 25 Set buffer "keytext" to hex value "018310DC409B26D6". Set buffer "plaintext" to hex value "1D9D5C5018F728C2". Set buffer "ciphertext" to hex value "5F4C038ED12B2E41". Baldwin Informational, Expires 12/25/1999 1030 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1031 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 26 Set buffer "keytext" to hex value "1C587F1C13924FEF". Set buffer "plaintext" to hex value "305532286D6F295A". Set buffer "ciphertext" to hex value "63FAC0D034D9F793". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1032 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 27 Set buffer "keytext" to hex value "0101010101010101". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "617B3A0CE8F07100". Set buffer "encryptedtext" to hex value "". Baldwin Informational, Expires 12/25/1999 1033 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1034 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 28 Set buffer "keytext" to hex value "1F1F1F1F0E0E0E0E". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "DB958605F8C8C606". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1035 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 29 Set buffer "keytext" to hex value "E0FEE0FEF1FEF1FE". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "EDBFD1C66C29CCC7". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Baldwin Informational, Expires 12/25/1999 1036 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1037 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 30 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "355550B2150E2451". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1038 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 31 Set buffer "keytext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "CAAAAF4DEAF1DBAE". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Baldwin Informational, Expires 12/25/1999 1039 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1040 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 32 Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "D5D44FF720683D0D". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1041 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 33 Set buffer "keytext" to hex value "FEDCBA9876543210". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "2A2BB008DF97C2F2". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Baldwin Informational, Expires 12/25/1999 1042 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1043 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVDES100". This is the start of test case "TVDES101". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DES_CBC_BSAFE1 pad. Note: Depends on: Note: - AI_DES_CBCBSAFE1 Note: - AI_DES_CBC_IV8 Note: Test cases: Note: - For 8 byte input, first block matches DES_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Note: - For inputs ranging from 0 to 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1044 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Start with the GlobalInit Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "6789ABCDEF012345". Set buffer "ivector" to hex value "0000000000000000". Set buffer "ciphertext1" to hex value "753016de2f239d93". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Note: ------------------------------------------------------- Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptNoPad". Call B_CreateAlgorithmObject passing "decryptNoPad". Baldwin Informational, Expires 12/25/1999 1045 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_BSAFE1" initialized from "B_BSAFE1_PAD". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_BSAFE1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_BSAFE1" initialized from "B_BSAFE1_PAD". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_BSAFE1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decryptNoPad" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptNoPad" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - For 8 byte input, first block matches DES_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1046 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "753016de2f239d9324f13c63a5c4b43f". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1047 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "6789abcdef0123450808080808080808". Set length of buffer "encryptedtext" to decimal value "8". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Set length of buffer "decryptedtext" to decimal value "8". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: Setup plaintext array Set buffer "plaintext" to hex value "010203040506070809101112131 41516". Note: ------------------------------------------------------- Note: - For input of length 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "16". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e63f14635b44dddd93dbc4565943176b63". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1048 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "010203040506070809101112131415160808080808080808". Note: ------------------------------------------------------- Note: - For input of length 15 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "15". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address Baldwin Informational, Expires 12/25/1999 1049 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e6ce9c520ae5c59bee". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next Baldwin Informational, Expires 12/25/1999 1050 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141501". Note: ------------------------------------------------------- Note: - For input of length 14 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "14". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e64c3143fa858d570a". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 1051 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213140202". Note: ------------------------------------------------------- Note: - For input of length 13 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "13". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1052 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e6028eb48443cafd5c". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 1053 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213030303". Note: ------------------------------------------------------- Note: - For input of length 12 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "12". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e6557cfd5b4e9b04fe". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 1054 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111204040404". Note: ------------------------------------------------------- Note: - For input of length 11 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "11". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value Baldwin Informational, Expires 12/25/1999 1055 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "e68f791bab16d4e68ae23a9ddbeb105e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910110505050505". Note: ------------------------------------------------------- Note: - For input of length 10 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Baldwin Informational, Expires 12/25/1999 1056 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "plaintext" to decimal value "10". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e66c6a5ddfe5281fbb". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1057 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910060606060606". Note: ------------------------------------------------------- Note: - For input of length 09 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "09". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e6a1d8bdd18e03ada1". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1058 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080907070707070707". Note: ------------------------------------------------------- Note: - For input of length 08 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "08". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1059 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e60e5940ae3e4adfe4". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1060 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080808080808080808". Note: ------------------------------------------------------- Note: - For input of length 07 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "07". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "df2458c7395177e0". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1061 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060701". Note: ------------------------------------------------------- Note: - For input of length 6 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "6". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1062 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "2e43c041bd6550b6". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060202". Note: ------------------------------------------------------- Note: - For input of length 5 bytes, check that Baldwin Informational, Expires 12/25/1999 1063 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "5". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "a5480dde17504ca1". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1064 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405030303". Note: ------------------------------------------------------- Note: - For input of length 4 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "4". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "efbaad6414727499". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1065 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030404040404". Note: ------------------------------------------------------- Note: - For input of length 3 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "3". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of Baldwin Informational, Expires 12/25/1999 1066 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "98c640c8aadf724e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1067 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030505050505". Note: ------------------------------------------------------- Note: - For input of length 2 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "2". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "473fdede878c9542". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1068 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102060606060606". Note: ------------------------------------------------------- Note: - For input of length 1 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "1". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and Baldwin Informational, Expires 12/25/1999 1069 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f2ab1c9e707dcc92". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value Baldwin Informational, Expires 12/25/1999 1070 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "0107070707070707". Note: ------------------------------------------------------- Note: - For input of length 0 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "0". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "086f9a1d74c94d4e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 1071 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0808080808080808". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDES101". This is the start of test case "TVDES102". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DES_CBC_BSAFE1 pad + checksum. Note: Depends on: Note: - AI_DES_CBCBSAFE1 Note: - AI_DES_CBC_IV8 Note: Test cases: Note: - For 8 byte input, first block matches DES_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Note: - For inputs ranging from 0 to 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Note: ------------------------------------------------------- Note: Start with the GlobalInit Baldwin Informational, Expires 12/25/1999 1072 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "6789ABCDEF012345". Set buffer "ivector" to hex value "0000000000000000". Set buffer "ciphertext1" to hex value "753016de2f239d93". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Note: ------------------------------------------------------- Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptNoPad". Call B_CreateAlgorithmObject passing "decryptNoPad". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1073 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_BSAFE1" initialized from "B_BSAFE1_PAD_CHECKSUM". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_BSAFE1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_BSAFE1" initialized from "B_BSAFE1_PAD_CHECKSUM". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_BSAFE1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decryptNoPad" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptNoPad" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - For 8 byte input, first block matches DES_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1074 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "753016de2f239d933cc9307c475e9e13". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1075 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "6789abcdef012345030303c29e83f1e0". Set length of buffer "encryptedtext" to decimal value "8". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Set length of buffer "decryptedtext" to decimal value "8". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: Setup plaintext array Set buffer "plaintext" to hex value "010203040506070809101112131 41516". Note: ------------------------------------------------------- Note: - For input of length 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "16". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e63f14635b44dddd935baedf6cb59b9b7a". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1076 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141516030303fc25672ffd". Note: ------------------------------------------------------- Note: - For input of length 15 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "15". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of Baldwin Informational, Expires 12/25/1999 1077 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e63da6882d8ad4b04e889f7364c41d2590". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1078 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141504040404fc376028fa". Note: ------------------------------------------------------- Note: - For input of length 14 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "14". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e6f5b704dc0c54d1809e3bb6125a10731d". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1079 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213140505050505ec36612948". Note: ------------------------------------------------------- Note: - For input of length 13 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "13". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and Baldwin Informational, Expires 12/25/1999 1080 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e630dd4864c3d1f24b2659abbcaf8c4e0f". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value Baldwin Informational, Expires 12/25/1999 1081 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "01020304050607080910111213060606060606ef3562321c". Note: ------------------------------------------------------- Note: - For input of length 12 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "12". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e621910aaf609e1897d5e1095b33fdfa36". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 1082 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111207070707070707ee346e581d". Note: ------------------------------------------------------- Note: - For input of length 11 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "11". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e6deb681133527f065007686eeb3dac45a". Baldwin Informational, Expires 12/25/1999 1083 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910110808080808080808e143655712". Note: ------------------------------------------------------- Note: - For input of length 10 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "10". Baldwin Informational, Expires 12/25/1999 1084 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e60b40d8a42a323b36". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1085 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060708091001512219f51e". Note: ------------------------------------------------------- Note: - For input of length 09 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "09". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e632685f3b1c5fef10". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1086 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060708090202512219e71d". Note: ------------------------------------------------------- Note: - For input of length 08 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "08". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1087 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e68f791bab16d4e6060ce6b7659e1587". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1088 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060708030303512213e61c". Note: ------------------------------------------------------- Note: - For input of length 07 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "07". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "16c1bfbad83789a006d367dac1c82582". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1089 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060704040404512e14e11b". Note: ------------------------------------------------------- Note: - For input of length 6 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "6". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1090 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "7153288ea2931b6a19cdd2612b9bec36". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060505050505532f15e05b". Note: ------------------------------------------------------- Note: - For input of length 5 bytes, check that Note: - Encrypt and Decrypt are inverses. Baldwin Informational, Expires 12/25/1999 1091 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "5". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "972daf48242e2231fa94ca92e0e3c065". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length Baldwin Informational, Expires 12/25/1999 1092 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060606060606502c16e3ab". Note: ------------------------------------------------------- Note: - For input of length 4 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "4". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "c231688e85a483c7a8c3c6d4734a9a68". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length Baldwin Informational, Expires 12/25/1999 1093 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030407070707070707512d43c5aa". Note: ------------------------------------------------------- Note: - For input of length 3 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "3". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 1094 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "46c6da43666c1b4b05daba108e995ee8". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 1095 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020308080808080808085e9489caa5". Note: ------------------------------------------------------- Note: - For input of length 2 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "2". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e99cadbea169c19d". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 1096 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102010000bcbfbc". Note: ------------------------------------------------------- Note: - For input of length 1 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "1". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1097 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "d9318f7f636be06b". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102020000bcbfbf". Baldwin Informational, Expires 12/25/1999 1098 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: - For input of length 0 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "0". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "d84d6726d810a206". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 1099 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0303030000bebebe". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDES102". This is the start of test case "TVDESB00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DES_CBCPadBER. Note: Assuming that DES CBC Pad is tested elsewhere, just test Note: the Note: BER encoding and decoding mechanism. Note: Depends on: Note: AI_DES_CBCPadIV8 Note: Test cases: Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: two different keys with 9 byte input. Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: two different IVs with 7 byte input. Note: - Test GetAlgorithmInfo on BER objects as BER AI and Note: regular AI. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1100 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Start with the GlobalInit Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext1" of decimal value "100" bytes. Create buffer "keytext2" of decimal value "100" bytes. Create buffer "algInfo" of decimal value "100" bytes. Create buffer "algInfo2" of decimal value "100" bytes. Create buffer "plaintext1" of decimal value "100" bytes. Create buffer "plaintext2" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ciphertext2" of decimal value "100" bytes. Create buffer "ivector1" of decimal value "100" bytes. Create buffer "ivector2" of decimal value "100" bytes. Create buffer "ivector3" of decimal value "100" bytes. Create buffer "encryptedtext1" of decimal value "100" bytes. Create buffer "encryptedtext2" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "plaintext1" to hex value "010203040506070809". Set buffer "plaintext2" to hex value "01020304050607". Set buffer "keytext1" to hex value "0123456789ABCDEF". Set buffer "keytext2" to hex value "AABBCCDDEEFF0001". Set buffer "ivector1" to hex value "00000000EFAB23EF". Set buffer "ivector2" to hex value "0001020408102040". Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoBER" and Baldwin Informational, Expires 12/25/1999 1101 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: first key with 9 byte input. Note: Get the BER information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_DES_CBCPadBER". Load buffer "algInfo" from info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301106052b0e030207040800000000efab23ef". Note: Set the encrypter and decrypter from the BER. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext1". Baldwin Informational, Expires 12/25/1999 1102 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of Baldwin Informational, Expires 12/25/1999 1103 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: second key with 9 byte input. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1104 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext2". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1105 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: first IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1106 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoBER" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the BER information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_DES_CBCPadBER". Load buffer "algInfo" from info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301106052b0e030207040800000000efab23ef". Note: Set the encrypter and decrypter from the BER. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 1107 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_DES_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 1108 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1109 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: second IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "ivector2". Baldwin Informational, Expires 12/25/1999 1110 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "encrypterNoBER" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the BER information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_DES_CBCPadBER". Load buffer "algInfo" from info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301106052b0e03020704080001020408102040". Note: Set the encrypter and decrypter from the BER. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" Baldwin Informational, Expires 12/25/1999 1111 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of Baldwin Informational, Expires 12/25/1999 1112 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: - Test GetAlgorithmInfo on BER objects as BER AI and Note: regular AI. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_DES_CBCPadBER". Load buffer "algInfo2" from info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1113 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Check equality of buffer "algInfo2" with contents of buffer "algInfo". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decrypter" and "AI_DES_CBCPadBER". Load buffer "algInfo2" from info structure for "AI_DES_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "algInfo2" with contents of buffer "algInfo". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_DES_CBCPadIV8". Load buffer "ivector3" from info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "ivector3" with contents of buffer "ivector2". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decrypter" and "AI_DES_CBCPadIV8". Load buffer "ivector3" from info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "ivector3" with contents of buffer "ivector2". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDESB00". This is the start of test case "TVDESC00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: NIST Test vectors for DES ECB mode. Note: Tests AI_DES_CBC_IV8 with an IV of all zeros. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1114 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Start with the GlobalInit Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 0 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "8CA64DE9C1B123A7". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 1115 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 1116 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 1 Set buffer "keytext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "7359B2163E4EDC58". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1117 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 2 Set buffer "keytext" to hex value "3000000000000000". Set buffer "plaintext" to hex value "1000000000000001". Set buffer "ciphertext" to hex value "958E6E627A05557B". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1118 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1119 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 3 Set buffer "keytext" to hex value "1111111111111111". Set buffer "plaintext" to hex value "1111111111111111". Set buffer "ciphertext" to hex value "F40379AB9E0EC533". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and Baldwin Informational, Expires 12/25/1999 1120 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 4 Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "1111111111111111". Set buffer "ciphertext" to hex value "17668DFC7292532D". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1121 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 1122 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 5 Set buffer "keytext" to hex value "1111111111111111". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "8A5AE1F81AB8F2DD". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1123 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 6 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "8CA64DE9C1B123A7". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1124 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1125 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 7 Set buffer "keytext" to hex value "FEDCBA9876543210". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "ED39D950FA74BCC4". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1126 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 8 Set buffer "keytext" to hex value "7CA110454A1A6E57". Set buffer "plaintext" to hex value "01A1D6D039776742". Set buffer "ciphertext" to hex value "690F5B0D9A26939B". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" Baldwin Informational, Expires 12/25/1999 1127 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1128 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 9 Set buffer "keytext" to hex value "0131D9619DC1376E". Set buffer "plaintext" to hex value "5CD54CA83DEF57DA". Set buffer "ciphertext" to hex value "7A389D10354BD271". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1129 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 10 Set buffer "keytext" to hex value "07A1133E4A0B2686". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "ciphertext" to hex value "868EBB51CAB4599A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Baldwin Informational, Expires 12/25/1999 1130 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1131 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 11 Set buffer "keytext" to hex value "3849674C2602319E". Set buffer "plaintext" to hex value "51454B582DDF440A". Set buffer "ciphertext" to hex value "7178876E01F19B2A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1132 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 12 Set buffer "keytext" to hex value "04B915BA43FEB5B6". Set buffer "plaintext" to hex value "42FD443059577FA2". Set buffer "ciphertext" to hex value "AF37FB421F8C4095". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and Baldwin Informational, Expires 12/25/1999 1133 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1134 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 13 Set buffer "keytext" to hex value "0113B970FD34F2CE". Set buffer "plaintext" to hex value "059B5E0851CF143A". Set buffer "ciphertext" to hex value "86A560F10EC6D85B". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1135 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 14 Set buffer "keytext" to hex value "0170F175468FB5E6". Set buffer "plaintext" to hex value "0756D8E0774761D2". Set buffer "ciphertext" to hex value "0CD3DA020021DC09". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 1136 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1137 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 15 Set buffer "keytext" to hex value "43297FAD38E373FE". Set buffer "plaintext" to hex value "762514B829BF486A". Set buffer "ciphertext" to hex value "EA676B2CB7DB2B7A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Baldwin Informational, Expires 12/25/1999 1138 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 16 Set buffer "keytext" to hex value "07A7137045DA2A16". Set buffer "plaintext" to hex value "3BDD119049372802". Set buffer "ciphertext" to hex value "DFD64A815CAF1A0F". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1139 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 1140 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 17 Set buffer "keytext" to hex value "04689104C2FD3B2F". Set buffer "plaintext" to hex value "26955F6835AF609A". Set buffer "ciphertext" to hex value "5C513C9C4886C088". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 1141 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 18 Set buffer "keytext" to hex value "37D06BB516CB7546". Set buffer "plaintext" to hex value "164D5E404F275232". Set buffer "ciphertext" to hex value "0A2AEEAE3FF4AB77". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1142 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 1143 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 19 Set buffer "keytext" to hex value "1F08260D1AC2465E". Set buffer "plaintext" to hex value "6B056E18759F5CCA". Set buffer "ciphertext" to hex value "EF1BF03E5DFA575A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 1144 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 20 Set buffer "keytext" to hex value "584023641ABA6176". Set buffer "plaintext" to hex value "004BD6EF09176062". Set buffer "ciphertext" to hex value "88BF0DB6D70DEE56". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1145 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 1146 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 21 Set buffer "keytext" to hex value "025816164629B007". Set buffer "plaintext" to hex value "480D39006EE762F2". Set buffer "ciphertext" to hex value "A1F9915541020B56". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 1147 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 22 Set buffer "keytext" to hex value "49793EBC79B3258F". Set buffer "plaintext" to hex value "437540C8698F3CFA". Set buffer "ciphertext" to hex value "6FBF1CAFCFFD0556". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and Baldwin Informational, Expires 12/25/1999 1148 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 1149 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 23 Set buffer "keytext" to hex value "4FB05E1515AB73A7". Set buffer "plaintext" to hex value "072D43A077075292". Set buffer "ciphertext" to hex value "2F22E49BAB7CA1AC". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and Baldwin Informational, Expires 12/25/1999 1150 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 24 Set buffer "keytext" to hex value "49E95D6D4CA229BF". Set buffer "plaintext" to hex value "02FE55778117F12A". Set buffer "ciphertext" to hex value "5A6B612CC26CCE4A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1151 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1152 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 25 Set buffer "keytext" to hex value "018310DC409B26D6". Set buffer "plaintext" to hex value "1D9D5C5018F728C2". Set buffer "ciphertext" to hex value "5F4C038ED12B2E41". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1153 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 26 Set buffer "keytext" to hex value "1C587F1C13924FEF". Set buffer "plaintext" to hex value "305532286D6F295A". Set buffer "ciphertext" to hex value "63FAC0D034D9F793". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1154 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1155 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 27 Set buffer "keytext" to hex value "0101010101010101". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "617B3A0CE8F07100". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1156 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 28 Set buffer "keytext" to hex value "1F1F1F1F0E0E0E0E". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "DB958605F8C8C606". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1157 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1158 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Test case 29 Set buffer "keytext" to hex value "E0FEE0FEF1FEF1FE". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "EDBFD1C66C29CCC7". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1159 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 30 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "355550B2150E2451". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1160 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1161 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Test case 31 Set buffer "keytext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "CAAAAF4DEAF1DBAE". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1162 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 32 Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "D5D44FF720683D0D". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 1163 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1164 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test case 33 Set buffer "keytext" to hex value "FEDCBA9876543210". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "2A2BB008DF97C2F2". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 1165 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVDESC00". This is the start of test case "TVDESP00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DES_CBCPadIV8. Note: Assuming that DES CBC is tested elsewhere, just test the Note: padding mechanism. Note: Depends on: Note: AI_DES_CBC_IV8 Note: Test cases: Note: - For 8 byte input, first block matches DES_CBC of input Baldwin Informational, Expires 12/25/1999 1166 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: and the second byte decrypts to eight bytes of 0x08. Note: - For inputs ranging from 0 to 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "6789ABCDEF012345". Set buffer "ivector" to hex value "00000000EFAB23EF". Set buffer "ciphertext1" to hex value "fc624960b90f7a7d". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Note: ------------------------------------------------------- Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1167 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptNoPad". Call B_CreateAlgorithmObject passing "decryptNoPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decryptNoPad" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptNoPad" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1168 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - For 8 byte input, first block matches DES_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "fc624960b90f7a7d2551005f74269110". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1169 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "6789abcdef0123450808080808080808". Set length of buffer "encryptedtext" to decimal value "8". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Set length of buffer "decryptedtext" to decimal value "8". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: Setup plaintext array Set buffer "plaintext" to hex value "010203040506070809101112131 41516". Note: ------------------------------------------------------- Note: - For input of length 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "16". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1170 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdfe7886e07ebd3b3df47d8b20e93909b58". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "010203040506070809101112131415160808080808080808". Note: ------------------------------------------------------- Note: - For input of length 15 bytes, check that Baldwin Informational, Expires 12/25/1999 1171 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "15". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdff52a136d17a87e8f". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1172 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141501". Note: ------------------------------------------------------- Note: - For input of length 14 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "14". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf9ff22b5301f5ba69". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1173 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213140202". Note: ------------------------------------------------------- Note: - For input of length 13 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "13". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of Baldwin Informational, Expires 12/25/1999 1174 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf7ac916277cc636ef". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1175 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213030303". Note: ------------------------------------------------------- Note: - For input of length 12 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "12". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdfe204db2a32a7b8c8". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1176 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111204040404". Note: ------------------------------------------------------- Note: - For input of length 11 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "11". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and Baldwin Informational, Expires 12/25/1999 1177 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf287f784d76357583". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value Baldwin Informational, Expires 12/25/1999 1178 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "01020304050607080910110505050505". Note: ------------------------------------------------------- Note: - For input of length 10 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "10". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf4c58ea5623cd0b5b". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 1179 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910060606060606". Note: ------------------------------------------------------- Note: - For input of length 09 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "09". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdfd784a16124df7747". Baldwin Informational, Expires 12/25/1999 1180 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080907070707070707". Note: ------------------------------------------------------- Note: - For input of length 08 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "08". Baldwin Informational, Expires 12/25/1999 1181 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf9a19483adb5c2975". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1182 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080808080808080808". Note: ------------------------------------------------------- Note: - For input of length 07 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "07". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "977c3a184fa1e78d". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1183 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060701". Note: ------------------------------------------------------- Note: - For input of length 6 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "6". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1184 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "d1aee6c6fae1828b". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1185 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060202". Note: ------------------------------------------------------- Note: - For input of length 5 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "5". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "a5ef9a711de975ca". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1186 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405030303". Note: ------------------------------------------------------- Note: - For input of length 4 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "4". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1187 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "a429c178f9a65553". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030404040404". Note: ------------------------------------------------------- Note: - For input of length 3 bytes, check that Note: - Encrypt and Decrypt are inverses. Baldwin Informational, Expires 12/25/1999 1188 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "3". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "b53a1c038d1b89cd". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length Baldwin Informational, Expires 12/25/1999 1189 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030505050505". Note: ------------------------------------------------------- Note: - For input of length 2 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "2". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "0d00d9d7ca3c98a4". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length Baldwin Informational, Expires 12/25/1999 1190 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102060606060606". Note: ------------------------------------------------------- Note: - For input of length 1 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "1". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 1191 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "c3f1ba84fb6e4664". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 1192 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0107070707070707". Note: ------------------------------------------------------- Note: - For input of length 0 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "0". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "d470869b58d76fad". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 1193 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0808080808080808". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDESP00". This is the start of test case "TVDESZ00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DES_CBCPadPEM. Note: Assuming that DES CBC Pad is tested elsewhere, just test Note: the Note: PEM encoding and decoding mechanism. Note: Depends on: Note: AI_DES_CBCPadIV8 Note: Test cases: Baldwin Informational, Expires 12/25/1999 1194 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Compare results of CBCPadIV8 and CBCPadPEM for Note: two different keys with 9 byte input. Note: - Compare results of CBCPadIV8 and CBCPadPEM for Note: two different IVs with 7 byte input. Note: - Test GetAlgorithmInfo on PEM objects as PEM AI and Note: regular AI. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext1" of decimal value "100" bytes. Create buffer "keytext2" of decimal value "100" bytes. Create buffer "algInfo" of decimal value "100" bytes. Create buffer "algInfo2" of decimal value "100" bytes. Create buffer "plaintext1" of decimal value "100" bytes. Create buffer "plaintext2" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ciphertext2" of decimal value "100" bytes. Create buffer "ivector1" of decimal value "100" bytes. Create buffer "ivector2" of decimal value "100" bytes. Create buffer "ivector3" of decimal value "100" bytes. Create buffer "encryptedtext1" of decimal value "100" bytes. Create buffer "encryptedtext2" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "plaintext1" to hex value "010203040506070809". Set buffer "plaintext2" to hex value "01020304050607". Set buffer "keytext1" to hex value "0123456789ABCDEF". Set buffer "keytext2" to hex value "AABBCCDDEEFF0001". Set buffer "ivector1" to hex value "00000000EFAB23EF". Set buffer "ivector2" to hex value "0001020408102040". Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoPEM". Baldwin Informational, Expires 12/25/1999 1195 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "encrypterNoPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoPEM" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadPEM for Note: first key with 9 byte input. Note: Get the PEM information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoPEM" and "AI_DES_CBCPadPEM". Load buffer "algInfo" from info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Note: DataEquals (algInfo, 4445532d4342432c303030303030303045464 Note: 1423233 Note: 4546) Create buffer "algInfoString" of decimal value "100" bytes. Set buffer "algInfoString" with string value "DES-CBC,00000000EFAB23EF". Check equality of buffer "algInfo" with contents of buffer "algInfoString". Note: Set the encrypter and decrypter from the PEM. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1196 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the PEM encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-PEM encrypter. Baldwin Informational, Expires 12/25/1999 1197 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encrypterNoPEM" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check PEM decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1198 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadPEM for Note: second key with 9 byte input. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext2". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the PEM encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1199 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-PEM encrypter. Call Call B_EncryptInit passing "encrypterNoPEM" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check PEM decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 1200 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadPEM for Note: first IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypterNoPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoPEM". Call B_CreateAlgorithmObject passing "encrypterNoPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoPEM" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the PEM information and check it against the expected Baldwin Informational, Expires 12/25/1999 1201 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: value. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoPEM" and "AI_DES_CBCPadPEM". Load buffer "algInfo" from info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Note: DataEquals (algInfo, 4445532d4342432c303030303030303045464 Note: 1423233 Note: 4546) Create buffer "algInfoString" of decimal value "100" bytes. Set buffer "algInfoString" with string value "DES-CBC,00000000EFAB23EF". Check equality of buffer "algInfo" with contents of buffer "algInfoString". Note: Set the encrypter and decrypter from the PEM. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1202 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the PEM encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-PEM encrypter. Call Call B_EncryptInit passing "encrypterNoPEM" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1203 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check PEM decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadPEM for Note: second IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1204 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypterNoPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoPEM". Call B_CreateAlgorithmObject passing "encrypterNoPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8" initialized from contents of buffer "ivector2". Call B_SetAlgorithmInfo passing "encrypterNoPEM" and "AI_DES_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the PEM information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoPEM" and "AI_DES_CBCPadPEM". Load buffer "algInfo" from info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Note: DataEquals (algInfo, 4445532d4342432c303030313032303430383 Note: 1303230 Note: 3430) Create buffer "algInfoString" of decimal value "100" bytes. Set buffer "algInfoString" with string value "DES-CBC,0001020408102040". Baldwin Informational, Expires 12/25/1999 1205 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "algInfo" with contents of buffer "algInfoString". Note: Set the encrypter and decrypter from the PEM. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the PEM encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of Baldwin Informational, Expires 12/25/1999 1206 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-PEM encrypter. Call Call B_EncryptInit passing "encrypterNoPEM" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check PEM decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1207 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: - Test GetAlgorithmInfo on PEM objects as PEM AI and Note: regular AI. Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_DES_CBCPadPEM". Load buffer "algInfo2" from info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "algInfo2" with contents of buffer "algInfo". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decrypter" and "AI_DES_CBCPadPEM". Load buffer "algInfo2" from info structure for "AI_DES_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "algInfo2" with contents of buffer "algInfo". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Baldwin Informational, Expires 12/25/1999 1208 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_DES_CBCPadIV8". Load buffer "ivector3" from info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "ivector3" with contents of buffer "ivector2". Set "_InfoPointer" to address of info structure for "AI_DES_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decrypter" and "AI_DES_CBCPadIV8". Load buffer "ivector3" from info structure for "AI_DES_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "ivector3" with contents of buffer "ivector2". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDESZ00". This is the start of test case "TVDS3B00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DES_EDE3_CBCPadBER. Note: Assuming that DES EDE CBC Pad is tested elsewhere, just Note: test the Note: BER encoding and decoding mechanism. Note: Depends on: Note: - AI_DES_EDE3_CBCPadIV8 Note: - KI_Item Note: Test cases: Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: two different keys with 9 byte input. Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: two different IVs with 7 byte input. Note: - Test GetAlgorithmInfo on BER objects as BER AI and Note: regular AI. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DES_EDE3_CBC_ENCRYPT", Baldwin Informational, Expires 12/25/1999 1209 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AM_DES_EDE3_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext1" of decimal value "100" bytes. Create buffer "keytext2" of decimal value "100" bytes. Create buffer "algInfo" of decimal value "100" bytes. Create buffer "algInfo2" of decimal value "100" bytes. Create buffer "plaintext1" of decimal value "100" bytes. Create buffer "plaintext2" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ciphertext2" of decimal value "100" bytes. Create buffer "ivector1" of decimal value "100" bytes. Create buffer "ivector2" of decimal value "100" bytes. Create buffer "ivector3" of decimal value "100" bytes. Create buffer "encryptedtext1" of decimal value "100" bytes. Create buffer "encryptedtext2" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "plaintext1" to hex value "010203040506070809". Set buffer "plaintext2" to hex value "01020304050607". Set buffer "keytext1" to hex value "0123456789ABCDEF010203040506 07080001020408102040". Set buffer "keytext2" to hex value "AABBCCDDEEFF0001000102040810 20400102030405060708". Set buffer "ivector1" to hex value "00000000EFAB23EF". Set buffer "ivector2" to hex value "0001020408102040". Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8" initialized from contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoBER" and Baldwin Informational, Expires 12/25/1999 1210 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_DES_EDE3_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: first key with 9 byte input. Note: Get the BER information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_DES_EDE3_CBCPadBER". Load buffer "algInfo" from info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301406082a864886f70d0307040800000000efab23ef". Note: Set the encrypter and decrypter from the BER. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_EDE3_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_EDE3_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext1". Baldwin Informational, Expires 12/25/1999 1211 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1212 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: second key with 9 byte input. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 1213 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext2". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1214 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 1215 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: first IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8" initialized from contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoBER" and "AI_DES_EDE3_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the BER information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_DES_EDE3_CBCPadBER". Baldwin Informational, Expires 12/25/1999 1216 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Load buffer "algInfo" from info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301406082a864886f70d0307040800000000efab23ef". Note: Set the encrypter and decrypter from the BER. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_EDE3_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_EDE3_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1217 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Baldwin Informational, Expires 12/25/1999 1218 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: second IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Baldwin Informational, Expires 12/25/1999 1219 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8" initialized from contents of buffer "ivector2". Call B_SetAlgorithmInfo passing "encrypterNoBER" and "AI_DES_EDE3_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the BER information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_DES_EDE3_CBCPadBER". Load buffer "algInfo" from info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301406082a864886f70d030704080001020408102040". Note: Set the encrypter and decrypter from the BER. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_EDE3_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER" initialized from contents of buffer "algInfo". Baldwin Informational, Expires 12/25/1999 1220 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_EDE3_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Baldwin Informational, Expires 12/25/1999 1221 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1222 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: - Test GetAlgorithmInfo on BER objects as BER AI and Note: regular AI. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_DES_EDE3_CBCPadBER". Load buffer "algInfo2" from info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "algInfo2" with contents of buffer "algInfo". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decrypter" and "AI_DES_EDE3_CBCPadBER". Load buffer "algInfo2" from info structure for "AI_DES_EDE3_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "algInfo2" with contents of buffer "algInfo". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_DES_EDE3_CBCPadIV8". Load buffer "ivector3" from info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "ivector3" with contents of buffer "ivector2". Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decrypter" and "AI_DES_EDE3_CBCPadIV8". Baldwin Informational, Expires 12/25/1999 1223 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Load buffer "ivector3" from info structure for "AI_DES_EDE3_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "ivector3" with contents of buffer "ivector2". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDS3B00". This is the start of test case "TVDS3C00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DES_EDE3_CBC_IV8. Note: Depends on: Note: - AI_DES_CBC_IV8 Note: Test cases: Note: - Check that if first and second keys are the same, the Note: result matches a single DES with the third key. Note: - Use non-zero keys and plaintext from the NIST test Note: vectors. Note: - Check that if second and third keys are the same, the Note: result matches a single DES with the third key. Note: - Use non-zero keys and plaintext from the NIST test Note: vectors. Note: - Check that EDE with three different keys matches the Note: result from three equivalent DES operations. Note: - Perform this ten times with different values from Note: a pseudo random number generator, IV = 0. Note: - Check that EDE decryption matches plaintext. Note: - Use 8 byte plaintext blocks to avoid chaining Note: differences. Note: - Check IV processing by comparing DES EDE with non-zero Note: IV to equivalent DES EDE with different plaintext Note: and a zero IV. Note: - Check chaining by comparing DES EDE on 24 byte Note: plaintext, Note: against three separate DES EDE operations on 8 byte Note: blocks. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DES_EDE3_CBC_ENCRYPT", "AM_DES_EDE3_CBC_DECRYPT", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 1224 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "AM_MD5_RANDOM", "NULL_PTR". Note: Setup data objects Create buffer "keytext1" of decimal value "100" bytes. Create buffer "keytext2" of decimal value "100" bytes. Create buffer "keytext3" of decimal value "100" bytes. Create buffer "keytextEDE" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "plaintext1" of decimal value "100" bytes. Create buffer "plaintext2" of decimal value "100" bytes. Create buffer "plaintext3" of decimal value "100" bytes. Create buffer "temp" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "encryptedtextEDE" of decimal value "100" bytes. Create buffer "decryptedtextEDE" of decimal value "100" bytes. Create buffer "encryptedtext1" of decimal value "100" bytes. Create buffer "decryptedtext2" of decimal value "100" bytes. Create buffer "encryptedtext2" of decimal value "100" bytes. Create buffer "encryptedtext3" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "seed" of decimal value "10" bytes. Note: ------------------------------------------------------- Note: Create key objects. Create key object "key1". Call B_CreateKeyObject passing "key1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key2". Call B_CreateKeyObject passing "key2". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key3". Call B_CreateKeyObject passing "key3". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "keyEDE". Call B_CreateKeyObject passing "keyEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1225 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypterEDE". Call B_CreateAlgorithmObject passing "encrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "encrypterEDE" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypterEDE". Call B_CreateAlgorithmObject passing "decrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "decrypterEDE" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterDES". Call B_CreateAlgorithmObject passing "encrypterDES". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "encrypterDES" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypterDES". Call B_CreateAlgorithmObject passing "decrypterDES". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "decrypterDES" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1226 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "randomAlgorithmEDE". Call B_CreateAlgorithmObject passing "randomAlgorithmEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithmEDE" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "randomAlgorithmDES". Call B_CreateAlgorithmObject passing "randomAlgorithmDES". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithmDES" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Initialize the random objects. Set buffer "seed" to hex value "a1b2c3d4e5f6". Call Call B_RandomInit passing "randomAlgorithmEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithmEDE" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithmDES" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithmDES" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1227 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: - Check that if first and second key are the same, the Note: result matches a single DES with the third key. Note: - Use non-zero keys and plaintext from the NIST test Note: vectors. Note: NIST Vector 7: Set buffer "keytext3" to hex value "FEDCBA9876543210". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "ED39D950FA74BCC4". Set buffer "keytextEDE" to hex value "7CA110454A1A6E577CA110454A 1A6E57FEDCBA9876543210". Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext3". Call B_SetKeyInfo passing "key3" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytextEDE". Call B_SetKeyInfo passing "keyEDE" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute the EDE Result Call Call B_EncryptInit passing "encrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterEDE" and address of next free byte in buffer "encryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextEDE" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextEDE" by "_OutputLen". Call B_EncryptFinal passing "encrypterEDE" and address of next free byte in buffer "encryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextEDE" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1228 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextEDE" by "_OutputLen". Finalize buffer "encryptedtextEDE". Display buffer "encryptedtextEDE". Check equality of buffer "encryptedtextEDE" with contents of buffer "ciphertext". Note: Make sure EDE decrypts OK Call Call B_DecryptInit passing "decrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypterEDE" and address of next free byte in buffer "decryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "decryptedtextEDE" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtextEDE" by "_OutputLen". Call B_DecryptFinal passing "decrypterEDE" and address of next free byte in buffer "decryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "decryptedtextEDE" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtextEDE" by "_OutputLen". Finalize buffer "decryptedtextEDE". Check equality of buffer "decryptedtextEDE" with contents of buffer "plaintext". Note: Compute equivalent DES and check for match. Call Call B_EncryptInit passing "encrypterDES" and "key3" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterDES" and address of next free byte in buffer "encryptedtext3" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext3" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1229 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext3" by "_OutputLen". Call B_EncryptFinal passing "encrypterDES" and address of next free byte in buffer "encryptedtext3" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext3" by "_OutputLen". Finalize buffer "encryptedtext3". Display buffer "encryptedtext3". Check equality of buffer "encryptedtext3" with contents of buffer "encryptedtextEDE". Note: Cleanup and prepare for next test. Call Call B_DestroyKeyObject passing "key3". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key3". Call B_CreateKeyObject passing "key3". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "keyEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "keyEDE". Call B_CreateKeyObject passing "keyEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check that if second and third keys are the same, the Note: result matches a single DES with the third key. Note: - Use non-zero keys and plaintext from the NIST test Note: vectors. Note: NIST Vector 8: Set buffer "keytext1" to hex value "7CA110454A1A6E57". Set buffer "plaintext" to hex value "01A1D6D039776742". Set buffer "ciphertext" to hex value "690F5B0D9A26939B". Set buffer "keytextEDE" to hex value "7CA110454A1A6E57FEDCBA9876 543210FEDCBA9876543210". Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext1". Baldwin Informational, Expires 12/25/1999 1230 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetKeyInfo passing "key1" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytextEDE". Call B_SetKeyInfo passing "keyEDE" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute the EDE Result Call Call B_EncryptInit passing "encrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterEDE" and address of next free byte in buffer "encryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextEDE" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextEDE" by "_OutputLen". Call B_EncryptFinal passing "encrypterEDE" and address of next free byte in buffer "encryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextEDE" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextEDE" by "_OutputLen". Finalize buffer "encryptedtextEDE". Display buffer "encryptedtextEDE". Check equality of buffer "encryptedtextEDE" with contents of buffer "ciphertext". Note: Make sure EDE decrypts OK Call Call B_DecryptInit passing "decrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1231 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypterEDE" and address of next free byte in buffer "decryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "decryptedtextEDE" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtextEDE" by "_OutputLen". Call B_DecryptFinal passing "decrypterEDE" and address of next free byte in buffer "decryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "decryptedtextEDE" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtextEDE" by "_OutputLen". Finalize buffer "decryptedtextEDE". Check equality of buffer "decryptedtextEDE" with contents of buffer "plaintext". Note: Compute equivalent DES and check for match. Call Call B_EncryptInit passing "encrypterDES" and "key1" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterDES" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypterDES" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Check equality of buffer "encryptedtext1" with contents of buffer "encryptedtextEDE". Baldwin Informational, Expires 12/25/1999 1232 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Cleanup and prepare for next test. Call Call B_DestroyKeyObject passing "key1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key1". Call B_CreateKeyObject passing "key1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "keyEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "keyEDE". Call B_CreateKeyObject passing "keyEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check that EDE with three different keys matches the Note: result from three equivalent DES operations. Note: - Perform this ten times with different values from Note: a pseudo random number generator, IV = 0. Note: - Check that EDE decryption matches plaintext. Note: Do ten random tests. Begin a loop of decimal value "10" iterations. Note: Load 24 bytes into EDE key. Set "_OutputLen" to decimal value "24". Call B_GenerateRandomBytes passing "randomAlgorithmEDE" and address of next free byte in "keytextEDE" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keytextEDE" by "_OutputLen". Finalize "keytextEDE". Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytextEDE". Call B_SetKeyInfo passing "keyEDE" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Load three 8 byte DES keys with matching values. Set "_OutputLen" to decimal value "8". Baldwin Informational, Expires 12/25/1999 1233 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GenerateRandomBytes passing "randomAlgorithmDES" and address of next free byte in "keytext1" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keytext1" by "_OutputLen". Finalize "keytext1". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "randomAlgorithmDES" and address of next free byte in "keytext2" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keytext2" by "_OutputLen". Finalize "keytext2". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "randomAlgorithmDES" and address of next free byte in "keytext3" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keytext3" by "_OutputLen". Finalize "keytext3". Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key1" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext2". Call B_SetKeyInfo passing "key2" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext3". Call B_SetKeyInfo passing "key3" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Load 8 bytes of plaintext, keeping generators in synch. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "randomAlgorithmDES" and address of next free byte in "plaintext" and "_OutputLen" and Baldwin Informational, Expires 12/25/1999 1234 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "plaintext" by "_OutputLen". Finalize "plaintext". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "randomAlgorithmEDE" and address of next free byte in "temp" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "temp" by "_OutputLen". Finalize "temp". Display buffer "plaintext". Note: Encrypt with three DES operations. Call Call B_EncryptInit passing "encrypterDES" and "key1" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterDES" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypterDES" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Call Call B_DecryptInit passing "decrypterDES" and "key2" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypterDES" and address of next free byte in buffer "decryptedtext2" and address of "_OutputLen" and length of free bytes in buffer Baldwin Informational, Expires 12/25/1999 1235 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "decryptedtext2" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext2" by "_OutputLen". Call B_DecryptFinal passing "decrypterDES" and address of next free byte in buffer "decryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext2" by "_OutputLen". Finalize buffer "decryptedtext2". Display buffer "decryptedtext2". Call Call B_EncryptInit passing "encrypterDES" and "key3" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterDES" and address of next free byte in buffer "encryptedtext3" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext3" and address of first initialized byte in buffer "decryptedtext2" and length of initialized bytes in buffer "decryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext3" by "_OutputLen". Call B_EncryptFinal passing "encrypterDES" and address of next free byte in buffer "encryptedtext3" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext3" by "_OutputLen". Finalize buffer "encryptedtext3". Display buffer "encryptedtext3". Note: Encrypt with EDE. Call Call B_EncryptInit passing "encrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1236 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypterEDE" and address of next free byte in buffer "encryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextEDE" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextEDE" by "_OutputLen". Call B_EncryptFinal passing "encrypterEDE" and address of next free byte in buffer "encryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextEDE" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextEDE" by "_OutputLen". Finalize buffer "encryptedtextEDE". Display buffer "encryptedtextEDE". Note: Compare EDE result against DES result. Check equality of buffer "encryptedtextEDE" with contents of buffer "encryptedtext3". Note: Make sure EDE decrypts OK Call Call B_DecryptInit passing "decrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypterEDE" and address of next free byte in buffer "decryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "decryptedtextEDE" and address of first initialized byte in buffer "encryptedtextEDE" and length of initialized bytes in buffer "encryptedtextEDE" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtextEDE" by "_OutputLen". Call B_DecryptFinal passing "decrypterEDE" and address of next free byte in buffer "decryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "decryptedtextEDE" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1237 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtextEDE" by "_OutputLen". Finalize buffer "decryptedtextEDE". Check equality of buffer "decryptedtextEDE" with contents of buffer "plaintext". Note: Cleanup and prepare for next iteration. Call Call B_DestroyKeyObject passing "key1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key1". Call B_CreateKeyObject passing "key1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key2". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key2". Call B_CreateKeyObject passing "key2". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key3". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key3". Call B_CreateKeyObject passing "key3". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "keyEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "keyEDE". Call B_CreateKeyObject passing "keyEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: End of loop. End the loop and display execution times. Note: ------------------------------------------------------- Note: - Check IV processing by comparing DES EDE with non-zero Note: IV to equivalent DES EDE with different plaintext Note: and a zero IV. Set buffer "plaintext" to hex value "01A1D6D039776742". Set buffer "ivector" to hex value "00A1D6D039776700". Baldwin Informational, Expires 12/25/1999 1238 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "plaintext2" to hex value "0100000000000042". Set buffer "keytextEDE" to hex value "7CA110454A1A6E57FEDCBA9876 543210FEDCBA9876543210". Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytextEDE". Call B_SetKeyInfo passing "keyEDE" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute the EDE Result when the IV is zero. Call Call B_EncryptInit passing "encrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterEDE" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_EncryptFinal passing "encrypterEDE" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Check equality of buffer "ciphertext" with hex value "690F5B0D9A26939B". Note: Setup new algorithm objects with non-zero IVs. Call Call B_DestroyAlgorithmObject passing "encrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypterEDE". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1239 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterEDE". Call B_CreateAlgorithmObject passing "encrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypterEDE" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypterEDE". Call B_CreateAlgorithmObject passing "decrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypterEDE" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute the EDE Result when the IV is non-zero. Call Call B_EncryptInit passing "encrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterEDE" and address of next free byte in buffer "encryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextEDE" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextEDE" by "_OutputLen". Call B_EncryptFinal passing "encrypterEDE" and address of next free byte in buffer "encryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextEDE" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1240 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextEDE" by "_OutputLen". Finalize buffer "encryptedtextEDE". Display buffer "encryptedtextEDE". Note: Compare against expected result. Check equality of buffer "encryptedtextEDE" with contents of buffer "ciphertext". Note: Make sure EDE decrypts OK with non-zero IV. Call Call B_DecryptInit passing "decrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypterEDE" and address of next free byte in buffer "decryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "decryptedtextEDE" and address of first initialized byte in buffer "encryptedtextEDE" and length of initialized bytes in buffer "encryptedtextEDE" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtextEDE" by "_OutputLen". Call B_DecryptFinal passing "decrypterEDE" and address of next free byte in buffer "decryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "decryptedtextEDE" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtextEDE" by "_OutputLen". Finalize buffer "decryptedtextEDE". Check equality of buffer "decryptedtextEDE" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: - Check chaining by comparing DES EDE on 24 byte Note: plaintext, Note: against three separate DES EDE operations on 8 byte Note: blocks. Set buffer "plaintext1" to hex value "7CA110454A1A6E57". Set buffer "plaintext2" to hex value "01A1D6D039776742". Set buffer "plaintext3" to hex value "690F5B0D9A26939B". Baldwin Informational, Expires 12/25/1999 1241 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "plaintext" to hex value "7CA110454A1A6E5701A1D6D0397 76742690F5B0D9A26939B". Set buffer "keytextEDE" to hex value "7CA110454A1A6E57FEDCBA9876 54321001A1D6D039776742". Call Call B_DestroyKeyObject passing "keyEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "keyEDE". Call B_CreateKeyObject passing "keyEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytextEDE". Call B_SetKeyInfo passing "keyEDE" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Return DES EDE objects to IV of zero. Call Call B_DestroyAlgorithmObject passing "encrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterEDE". Call B_CreateAlgorithmObject passing "encrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "encrypterEDE" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute EDE result. Call Call B_EncryptInit passing "encrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterEDE" and address of next Baldwin Informational, Expires 12/25/1999 1242 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextEDE" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextEDE" by "_OutputLen". Call B_EncryptFinal passing "encrypterEDE" and address of next free byte in buffer "encryptedtextEDE" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextEDE" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextEDE" by "_OutputLen". Finalize buffer "encryptedtextEDE". Display buffer "encryptedtextEDE". Note: Compute DES EDE on first block with IV of zero. Call B_EncryptUpdate passing "encrypterEDE" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypterEDE" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Create DES EDE encrypter with IV matching first encrypted Note: block. Call Call B_DestroyAlgorithmObject passing "encrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterEDE". Call B_CreateAlgorithmObject passing "encrypterEDE". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1243 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from contents of buffer "encryptedtext1". Call B_SetAlgorithmInfo passing "encrypterEDE" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute DES EDE on second block. Call Call B_EncryptInit passing "encrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterEDE" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterEDE" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Note: Create DES EDE encrypter with IV matching second Note: encrypted block. Call Call B_DestroyAlgorithmObject passing "encrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterEDE". Call B_CreateAlgorithmObject passing "encrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1244 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from contents of buffer "encryptedtext2". Call B_SetAlgorithmInfo passing "encrypterEDE" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute DES EDE on third block. Call Call B_EncryptInit passing "encrypterEDE" and "keyEDE" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterEDE" and address of next free byte in buffer "encryptedtext3" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext3" and address of first initialized byte in buffer "plaintext3" and length of initialized bytes in buffer "plaintext3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext3" by "_OutputLen". Call B_EncryptFinal passing "encrypterEDE" and address of next free byte in buffer "encryptedtext3" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext3" by "_OutputLen". Finalize buffer "encryptedtext3". Display buffer "encryptedtext3". Note: Compare results. Display buffer "encryptedtextEDE". Display buffer "encryptedtext1". Display buffer "encryptedtext2". Display buffer "encryptedtext3". Check equality of buffer "encryptedtextEDE" with hex value "03770ac578245790c371a968efef33019391dbfa3fc3585d". Note: Cleanup and prepare for next test. Call Call B_DestroyKeyObject passing "key1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key1". Baldwin Informational, Expires 12/25/1999 1245 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateKeyObject passing "key1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key2". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key2". Call B_CreateKeyObject passing "key2". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key3". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key3". Call B_CreateKeyObject passing "key3". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "keyEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "keyEDE". Call B_CreateKeyObject passing "keyEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Return DES EDE objects to IV of zero. Call Call B_DestroyAlgorithmObject passing "encrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterEDE". Call B_CreateAlgorithmObject passing "encrypterEDE". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "encrypterEDE" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1246 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Cleanup This is the end of test case "TVDS3C00". This is the start of test case "TVDS3P00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DES_EDE3_CBCPadIV8. Note: Assuming that DES CBC is tested elsewhere, just test the Note: padding mechanism. Note: Depends on: Note: - AI_DES_EDE3_CBC_IV8 Note: - KI_Item Note: Test cases: Note: - For 8 byte input, first block matches DES_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Note: - For inputs ranging from 0 to 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Note: History: Note: - Create 11/2/95 by rwb. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_DES_EDE3_CBC_ENCRYPT", "AM_DES_EDE3_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "keytext" to hex value "0123456789ABCDEF0123456789ABC DEF0123456789ABCDEF". Set buffer "plaintext" to hex value "6789ABCDEF012345". Set buffer "ivector" to hex value "00000000EFAB23EF". Set buffer "ciphertext1" to hex value "fc624960b90f7a7d". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Baldwin Informational, Expires 12/25/1999 1247 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptNoPad". Call B_CreateAlgorithmObject passing "decryptNoPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_EDE3_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBCPadIV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_EDE3_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1248 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decryptNoPad" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptNoPad" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - For 8 byte input, first block matches DES_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1249 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "fc624960b90f7a7d2551005f74269110". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "6789abcdef0123450808080808080808". Set length of buffer "encryptedtext" to decimal value "8". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Set length of buffer "decryptedtext" to decimal value "8". Check equality of buffer "decryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 1250 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "plaintext". Note: ------------------------------------------------------- Note: Setup plaintext array Set buffer "plaintext" to hex value "010203040506070809101112131 41516". Note: ------------------------------------------------------- Note: - For input of length 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "16". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdfe7886e07ebd3b3df47d8b20e93909b58". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1251 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "010203040506070809101112131415160808080808080808". Note: ------------------------------------------------------- Note: - For input of length 15 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "15". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1252 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdff52a136d17a87e8f". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141501". Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1253 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - For input of length 14 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "14". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf9ff22b5301f5ba69". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1254 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213140202". Note: ------------------------------------------------------- Note: - For input of length 13 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "13". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf7ac916277cc636ef". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1255 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213030303". Note: ------------------------------------------------------- Note: - For input of length 12 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "12". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address Baldwin Informational, Expires 12/25/1999 1256 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdfe204db2a32a7b8c8". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next Baldwin Informational, Expires 12/25/1999 1257 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111204040404". Note: ------------------------------------------------------- Note: - For input of length 11 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "11". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf287f784d76357583". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 1258 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910110505050505". Note: ------------------------------------------------------- Note: - For input of length 10 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "10". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1259 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdf4c58ea5623cd0b5b". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 1260 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with hex value "01020304050607080910060606060606". Note: ------------------------------------------------------- Note: - For input of length 09 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "09". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "67d89fdd4db55cdfd784a16124df7747". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 1261 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080907070707070707". Note: ------------------------------------------------------- Note: - For input of length 08 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "08". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value Baldwin Informational, Expires 12/25/1999 1262 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "67d89fdd4db55cdf9a19483adb5c2975". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080808080808080808". Note: ------------------------------------------------------- Note: - For input of length 07 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Baldwin Informational, Expires 12/25/1999 1263 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "plaintext" to decimal value "07". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "977c3a184fa1e78d". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1264 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060701". Note: ------------------------------------------------------- Note: - For input of length 6 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "6". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "d1aee6c6fae1828b". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1265 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060202". Note: ------------------------------------------------------- Note: - For input of length 5 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "5". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1266 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "a5ef9a711de975ca". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1267 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405030303". Note: ------------------------------------------------------- Note: - For input of length 4 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "4". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "a429c178f9a65553". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1268 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030404040404". Note: ------------------------------------------------------- Note: - For input of length 3 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "3". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1269 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "b53a1c038d1b89cd". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030505050505". Note: ------------------------------------------------------- Note: - For input of length 2 bytes, check that Baldwin Informational, Expires 12/25/1999 1270 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "2". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "0d00d9d7ca3c98a4". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1271 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102060606060606". Note: ------------------------------------------------------- Note: - For input of length 1 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "1". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "c3f1ba84fb6e4664". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1272 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0107070707070707". Note: ------------------------------------------------------- Note: - For input of length 0 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "0". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of Baldwin Informational, Expires 12/25/1999 1273 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "d470869b58d76fad". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1274 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0808080808080808". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDS3P00". This is the start of test case "TVDSX100". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DSX_CBC_BSAFE1 RAW. Note: Test a few vectors from the AI_DSX_CBC_IV8 suite. Note: Depends on: Note: - AI_DSX_CBC_BSAFE1 Note: Test cases: Note: - Test vector for input of length 8 and non-zero I&O Note: whitening. Note: - Test vector for input of length 16 and non-zero I&O Note: whitening. Note: - Test vector for input of length 24 and non-zero I&O Note: whitening. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DESX_CBC_ENCRYPT", "AM_DESX_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Baldwin Informational, Expires 12/25/1999 1275 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DESX_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DESX_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test vector for input of length 8 and non-zero I&O Note: whitening. Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "ciphertext" to hex value "0d471706f8f89d46". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1276 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1277 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test vector for input of length 16 and non-zero I&O Note: whitening. Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F6717207A1133E4A0 B2686". Set buffer "ciphertext" to hex value "0d471706f8f89d46ea5f3c3bb9 a8d600". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1278 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test vector for input of length 24 and non-zero I&O Note: whitening. Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F6717207A1133E4A0 Baldwin Informational, Expires 12/25/1999 1279 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 B26861001010101010110". Set buffer "ciphertext" to hex value "0d471706f8f89d46ea5f3c3bb9 a8d600b445c8d722d91e3e". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1280 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDSX100". This is the start of test case "TVDSX101". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DESX_CBC_BSAFE1 pad. Note: Depends on: Note: - AI_DESX_CBCBSAFE1 Note: - AI_DESX_CBC_IV8 Note: Test cases: Note: - For 8 byte input, first block matches DESX_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Note: - For inputs ranging from 0 to 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Baldwin Informational, Expires 12/25/1999 1281 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Padding bytes have the expected value. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DESX_CBC_ENCRYPT", "AM_DESX_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "ciphertext1" to hex value "0d471706f8f89d46". Set buffer "ivector" to hex value "0000000000000000". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Note: ------------------------------------------------------- Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects. Baldwin Informational, Expires 12/25/1999 1282 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptNoPad". Call B_CreateAlgorithmObject passing "decryptNoPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_BSAFE1" initialized from "B_BSAFE1_PAD". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DESX_CBC_BSAFE1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_BSAFE1" initialized from "B_BSAFE1_PAD". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DESX_CBC_BSAFE1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decryptNoPad" and "AI_DESX_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptNoPad" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1283 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - For 8 byte input, first block matches DESX_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "0d471706f8f89d464d1a007258539f4e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next Baldwin Informational, Expires 12/25/1999 1284 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0248D43806F671720808080808080808". Set length of buffer "encryptedtext" to decimal value "8". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Set length of buffer "decryptedtext" to decimal value "8". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: Setup plaintext array Set buffer "plaintext" to hex value "010203040506070809101112131 41516". Note: ------------------------------------------------------- Note: - For input of length 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "16". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1285 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42f58d04a7c82d2c0ebfe0986d529aa3fc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1286 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "010203040506070809101112131415160808080808080808". Note: ------------------------------------------------------- Note: - For input of length 15 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "15". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb4278fbaa5fdcea59ef". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1287 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141501". Note: ------------------------------------------------------- Note: - For input of length 14 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "14". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Baldwin Informational, Expires 12/25/1999 1288 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42eb9a0665761fe635". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213140202". Note: ------------------------------------------------------- Note: - For input of length 13 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Baldwin Informational, Expires 12/25/1999 1289 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "13". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb429819a65ef7d68172". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" Baldwin Informational, Expires 12/25/1999 1290 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213030303". Note: ------------------------------------------------------- Note: - For input of length 12 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "12". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42b173d53943062561". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" Baldwin Informational, Expires 12/25/1999 1291 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111204040404". Note: ------------------------------------------------------- Note: - For input of length 11 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "11". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 1292 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42a6bacd5952a8545e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 1293 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910110505050505". Note: ------------------------------------------------------- Note: - For input of length 10 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "10". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb421ae704b9a596a02a". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1294 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910060606060606". Note: ------------------------------------------------------- Note: - For input of length 09 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "09". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1295 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42678873de204738e7". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 1296 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with hex value "01020304050607080907070707070707". Note: ------------------------------------------------------- Note: - For input of length 08 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "08". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb420440c32cc313e99e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 1297 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080808080808080808". Note: ------------------------------------------------------- Note: - For input of length 07 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "07". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Baldwin Informational, Expires 12/25/1999 1298 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "8d190aa85805810a". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060701". Note: ------------------------------------------------------- Note: - For input of length 6 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Baldwin Informational, Expires 12/25/1999 1299 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "6". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "7e0b278857bae309". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length Baldwin Informational, Expires 12/25/1999 1300 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060202". Note: ------------------------------------------------------- Note: - For input of length 5 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "5". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "efb2c11df5851d38". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1301 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405030303". Note: ------------------------------------------------------- Note: - For input of length 4 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "4". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address Baldwin Informational, Expires 12/25/1999 1302 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "cac9a1f1e979e1ff". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next Baldwin Informational, Expires 12/25/1999 1303 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030404040404". Note: ------------------------------------------------------- Note: - For input of length 3 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "3". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "3baa090e6eeea244". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1304 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030505050505". Note: ------------------------------------------------------- Note: - For input of length 2 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "2". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1305 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "20a0cad833dcd868". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1306 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102060606060606". Note: ------------------------------------------------------- Note: - For input of length 1 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "1". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "bce4fde9fdc2990c". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1307 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0107070707070707". Note: ------------------------------------------------------- Note: - For input of length 0 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "0". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1308 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "70943a5611926ece". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0808080808080808". Note: ------------------------------------------------------- Note: Cleanup Baldwin Informational, Expires 12/25/1999 1309 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 This is the end of test case "TVDSX101". This is the start of test case "TVDSX102". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DESX_CBC_BSAFE1 pad + checksum. Note: Depends on: Note: - AI_DESX_CBCBSAFE1 Note: - AI_DESX_CBC_IV8 Note: Test cases: Note: - For 8 byte input, first block matches DESX_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Note: - For inputs ranging from 0 to 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DESX_CBC_ENCRYPT", "AM_DESX_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "keytext" to hex value "0123456789ABCDEF1001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "ciphertext1" to hex value "b01f1ad8987df2c2". Set buffer "ivector" to hex value "0000000000000000". Baldwin Informational, Expires 12/25/1999 1310 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Note: ------------------------------------------------------- Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptNoPad". Call B_CreateAlgorithmObject passing "decryptNoPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_BSAFE1" initialized from "B_BSAFE1_PAD_CHECKSUM". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DESX_CBC_BSAFE1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_BSAFE1" initialized from "B_BSAFE1_PAD_CHECKSUM". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DESX_CBC_BSAFE1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1311 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decryptNoPad" and "AI_DESX_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptNoPad" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - For 8 byte input, first block matches DESX_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "b01f1ad8987df2c2fce7b6f0cc0acf0f". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1312 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0248d43806f6717203030304af7c9589". Set length of buffer "encryptedtext" to decimal value "8". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Set length of buffer "decryptedtext" to decimal value "8". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: Setup plaintext array Baldwin Informational, Expires 12/25/1999 1313 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "plaintext" to hex value "010203040506070809101112131 41516". Note: ------------------------------------------------------- Note: - For input of length 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "16". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e5c6438cd732c3b6de1d5df8c49f18893efbc88a2a409e58". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 1314 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141516030303fc25672ffd". Note: ------------------------------------------------------- Note: - For input of length 15 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "15". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value Baldwin Informational, Expires 12/25/1999 1315 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "e5c6438cd732c3b6af23cb473c75fb888d955ce9ccefad53". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141504040404fc376028fa". Note: ------------------------------------------------------- Note: - For input of length 14 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Baldwin Informational, Expires 12/25/1999 1316 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "plaintext" to decimal value "14". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e5c6438cd732c3b643329df83d6b8a42a80b8d7c3fd1bdf4". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1317 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213140505050505ec36612948". Note: ------------------------------------------------------- Note: - For input of length 13 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "13". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e5c6438cd732c3b63266d544789e3cab3ebfa777f0d9117a". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1318 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213060606060606ef3562321c". Note: ------------------------------------------------------- Note: - For input of length 12 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "12". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1319 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e5c6438cd732c3b6f7a7ed00ed9a7701bffaf336afbc7a8a". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1320 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111207070707070707ee346e581d". Note: ------------------------------------------------------- Note: - For input of length 11 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "11". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e5c6438cd732c3b62ec6faa504af5b91146cf0a65747a008". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1321 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910110808080808080808e143655712". Note: ------------------------------------------------------- Note: - For input of length 10 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "10". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1322 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e5c6438cd732c3b63b7345be4dd95fcf". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060708091001512219f51e". Note: ------------------------------------------------------- Note: - For input of length 09 bytes, check that Baldwin Informational, Expires 12/25/1999 1323 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "09". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e5c6438cd732c3b605fb71cd83ecd610". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1324 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060708090202512219e71d". Note: ------------------------------------------------------- Note: - For input of length 08 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "08". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "e5c6438cd732c3b68afbedca94db484d". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1325 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060708030303512213e61c". Note: ------------------------------------------------------- Note: - For input of length 07 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "07". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of Baldwin Informational, Expires 12/25/1999 1326 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "867ccae506c294ffacfc081fb890def1". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1327 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060704040404512e14e11b". Note: ------------------------------------------------------- Note: - For input of length 6 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "6". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "5afb30a75bddaf767af367fb07ab6053". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1328 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060505050505532f15e05b". Note: ------------------------------------------------------- Note: - For input of length 5 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "5". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and Baldwin Informational, Expires 12/25/1999 1329 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "ba3aff470f847e2f2ff7539676657287". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value Baldwin Informational, Expires 12/25/1999 1330 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "0102030405060606060606502c16e3ab". Note: ------------------------------------------------------- Note: - For input of length 4 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "4". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "6293c419f47ea3022b7fb631d06bc59e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 1331 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030407070707070707512d43c5aa". Note: ------------------------------------------------------- Note: - For input of length 3 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "3". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "d2fa5a2ad772b02c27a1eee0d756c455". Baldwin Informational, Expires 12/25/1999 1332 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020308080808080808085e9489caa5". Note: ------------------------------------------------------- Note: - For input of length 2 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "2". Baldwin Informational, Expires 12/25/1999 1333 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "8a5e5269d55b077d". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1334 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102010000bcbfbc". Note: ------------------------------------------------------- Note: - For input of length 1 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "1". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "8869e1371316c578". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1335 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102020000bcbfbf". Note: ------------------------------------------------------- Note: - For input of length 0 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "0". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1336 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "89fd65220d02a618". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1337 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0303030000bebebe". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDSX102". This is the start of test case "TVDSXB00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DESX_CBCPadBER. Note: Assuming that DESX CBC Pad is tested elsewhere, just test Note: the Note: BER encoding and decoding mechanism. Note: Depends on: Note: - AI_DESX_CBCPadBER Note: - AI_DESX_CBCPadIV8 Note: Test cases: Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: two different keys with 9 byte input. Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: two different IVs with 7 byte input. Note: - Test GetAlgorithmInfo on BER objects as BER AI and Note: regular AI. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DESX_CBC_ENCRYPT", "AM_DESX_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext1" of decimal value "100" bytes. Baldwin Informational, Expires 12/25/1999 1338 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "keytext2" of decimal value "100" bytes. Create buffer "algInfo" of decimal value "100" bytes. Create buffer "algInfo2" of decimal value "100" bytes. Create buffer "plaintext1" of decimal value "100" bytes. Create buffer "plaintext2" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ciphertext2" of decimal value "100" bytes. Create buffer "ivector1" of decimal value "100" bytes. Create buffer "ivector2" of decimal value "100" bytes. Create buffer "ivector3" of decimal value "100" bytes. Create buffer "encryptedtext1" of decimal value "100" bytes. Create buffer "encryptedtext2" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "plaintext1" to hex value "010203040506070809". Set buffer "plaintext2" to hex value "01020304050607". Set buffer "keytext1" to hex value "0123456789ABCDEF00000000EFAB 23EF0001020408102040". Set buffer "keytext2" to hex value "AABBCCDDEEFF0001000102040810 204000000000EFAB23EF". Set buffer "ivector1" to hex value "0000EFAB23EF1020". Set buffer "ivector2" to hex value "0810204000010204". Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8" initialized from contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoBER" and "AI_DESX_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1339 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: first key with 9 byte input. Note: Get the BER information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_DESX_CBCPadBER". Load buffer "algInfo" from info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301406082a864886f70d030604080000efab23ef1020". Note: Set the encrypter and decrypter from the BER. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DESX_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DESX_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1340 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1341 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: second key with 9 byte input. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext2". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 1342 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1343 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: first IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Baldwin Informational, Expires 12/25/1999 1344 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8" initialized from contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoBER" and "AI_DESX_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the BER information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_DESX_CBCPadBER". Load buffer "algInfo" from info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301406082a864886f70d030604080000efab23ef1020". Note: Set the encrypter and decrypter from the BER. Baldwin Informational, Expires 12/25/1999 1345 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DESX_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DESX_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of Baldwin Informational, Expires 12/25/1999 1346 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1347 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: - Compare results of CBCPadIV8 and CBCPadBER for Note: second IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1348 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8" initialized from contents of buffer "ivector2". Call B_SetAlgorithmInfo passing "encrypterNoBER" and "AI_DESX_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the BER information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_DESX_CBCPadBER". Load buffer "algInfo" from info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301406082a864886f70d030604080810204000010204". Note: Set the encrypter and decrypter from the BER. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DESX_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DESX_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 1349 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Baldwin Informational, Expires 12/25/1999 1350 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1351 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: - Test GetAlgorithmInfo on BER objects as BER AI and Note: regular AI. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_DESX_CBCPadBER". Load buffer "algInfo2" from info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "algInfo2" with contents of buffer "algInfo". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decrypter" and "AI_DESX_CBCPadBER". Load buffer "algInfo2" from info structure for "AI_DESX_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "algInfo2" with contents of buffer "algInfo". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_DESX_CBCPadIV8". Load buffer "ivector3" from info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "ivector3" with contents of buffer "ivector2". Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decrypter" and "AI_DESX_CBCPadIV8". Load buffer "ivector3" from info structure for "AI_DESX_CBCPadIV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "ivector3" with contents of buffer "ivector2". Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1352 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Cleanup This is the end of test case "TVDSXB00". This is the start of test case "TVDSXC00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DSX_CBC_IV8. Note: Assuming that DESX CBC is tested elsewhere, just test the Note: input and output whitening mechanism. Note: Depends on: Note: - AI_DES_CBC_IV8 Note: Test cases: Note: - Check single block matching DES and DESX keys for zero Note: IV. Note: - Check single block DESX result against DES for non-zero Note: input whitening. Note: - Check single block DESX result against DES for non-zero Note: output whitening. Note: - Check single block DESX result against DES for non-zero Note: input and output whitening (not equal to each other). Note: - Test vector for input of length 16 and non-zero I&O Note: whitening. Note: - Test vector for input of length 24 and non-zero I&O Note: whitening. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DESX_CBC_ENCRYPT", "AM_DESX_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "keytextDES" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "plaintextDES" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "ciphertextDES" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "encryptedtextDES" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Baldwin Informational, Expires 12/25/1999 1353 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterDES". Call B_CreateAlgorithmObject passing "encrypterDES". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DESX_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "encrypterDES" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8" initialized from "0000000000000000". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DESX_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check single block matching DES and DESX keys for zero Note: IV. Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "keytext" to hex value "07A1133E4A0B26860000000000000 0000000000000000000". Set buffer "ciphertext" to hex value "868EBB51CAB4599A". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Baldwin Informational, Expires 12/25/1999 1354 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of Baldwin Informational, Expires 12/25/1999 1355 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check single block DESX result against DES for non-zero Note: input whitening. Set buffer "keytextDES" to hex value "07A1133E4A0B2686". Set buffer "keytext" to hex value "07A1133E4A0B26860100000010F08 E400000000000000000". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "plaintextDES" to hex value "0348D4381606FF32". Note: Compute result using plain DES Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytextDES". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypterDES" and "key" and Baldwin Informational, Expires 12/25/1999 1356 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and address of first initialized byte in buffer "plaintextDES" and length of initialized bytes in buffer "plaintextDES" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextDES" by "_OutputLen". Call B_EncryptFinal passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextDES" by "_OutputLen". Finalize buffer "encryptedtextDES". Display buffer "encryptedtextDES". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1357 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "encryptedtextDES". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check single block DESX result against DES for non-zero Note: output whitening. Baldwin Informational, Expires 12/25/1999 1358 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keytextDES" to hex value "07A1133E4A0B2686". Set buffer "keytext" to hex value "07A1133E4A0B26860000000000000 0000100000010F08E40". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "plaintextDES" to hex value "0248D43806F67172". Set buffer "ciphertextDES" to hex value "868ebb51cab4599a". Set buffer "ciphertextDES" to hex value "878ebb51da44d7da". Note: Compute result using plain DES Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytextDES". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypterDES" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and address of first initialized byte in buffer "plaintextDES" and length of initialized bytes in buffer "plaintextDES" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextDES" by "_OutputLen". Call B_EncryptFinal passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextDES" by "_OutputLen". Finalize buffer "encryptedtextDES". Baldwin Informational, Expires 12/25/1999 1359 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "encryptedtextDES". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertextDES". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1360 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check single block DESX result against DES for non-zero Note: input and output whitening (not equal to each other). Set buffer "keytextDES" to hex value "07A1133E4A0B2686". Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "plaintextDES" to hex value "1249D53907F77062". Set buffer "ciphertextDES" to hex value "0d461502f0e8bd06". Set buffer "ciphertextDES" to hex value "0d471706f8f89d46". Note: Compute result using plain DES Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytextDES". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1361 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encrypterDES" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and address of first initialized byte in buffer "plaintextDES" and length of initialized bytes in buffer "plaintextDES" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextDES" by "_OutputLen". Call B_EncryptFinal passing "encrypterDES" and address of next free byte in buffer "encryptedtextDES" and address of "_OutputLen" and length of free bytes in buffer "encryptedtextDES" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtextDES" by "_OutputLen". Finalize buffer "encryptedtextDES". Display buffer "encryptedtextDES". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1362 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertextDES". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 1363 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test vector for input of length 16 and non-zero I&O Note: whitening. Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F6717207A1133E4A0 B2686". Set buffer "ciphertext" to hex value "0d471706f8f89d46ea5f3c3bb9 a8d600". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1364 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Test vector for input of length 24 and non-zero I&O Note: whitening. Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F6717207A1133E4A0 B26861001010101010110". Set buffer "ciphertext" to hex value "0d471706f8f89d46ea5f3c3bb9 a8d600b445c8d722d91e3e". Create key object "key". Call B_CreateKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 1365 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length Baldwin Informational, Expires 12/25/1999 1366 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDSXC00". This is the start of test case "TVDSXP00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_DESX_CBCPadIV8. Note: Assuming that DESX CBC is tested elsewhere, just test the Note: padding mechanism. Note: Depends on: Note: AI_DESX_CBC_IV8 Note: Test cases: Note: - For 8 byte input, first block matches DESX_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Note: - For inputs ranging from 0 to 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Baldwin Informational, Expires 12/25/1999 1367 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "AM_DESX_CBC_ENCRYPT", "AM_DESX_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "keytext" to hex value "07A1133E4A0B26861001010101010 1100001020408102040". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "ivector" to hex value "0000000000000000". Set buffer "ciphertext1" to hex value "0d471706f8f89d46". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Note: ------------------------------------------------------- Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1368 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptNoPad". Call B_CreateAlgorithmObject passing "decryptNoPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DESX_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBCPadIV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DESX_CBCPadIV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DESX_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decryptNoPad" and "AI_DESX_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptNoPad" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1369 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - For 8 byte input, first block matches DESX_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "0d471706f8f89d464d1a007258539f4e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" Baldwin Informational, Expires 12/25/1999 1370 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0248D43806F671720808080808080808". Set length of buffer "encryptedtext" to decimal value "8". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Set length of buffer "decryptedtext" to decimal value "8". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: Setup plaintext array Set buffer "plaintext" to hex value "010203040506070809101112131 41516". Note: ------------------------------------------------------- Note: - For input of length 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "16". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1371 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42f58d04a7c82d2c0ebfe0986d529aa3fc". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "010203040506070809101112131415160808080808080808". Baldwin Informational, Expires 12/25/1999 1372 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: - For input of length 15 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "15". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb4278fbaa5fdcea59ef". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next Baldwin Informational, Expires 12/25/1999 1373 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141501". Note: ------------------------------------------------------- Note: - For input of length 14 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "14". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42eb9a0665761fe635". Call B_DecryptUpdate passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 1374 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213140202". Note: ------------------------------------------------------- Note: - For input of length 13 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "13". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1375 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb429819a65ef7d68172". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1376 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213030303". Note: ------------------------------------------------------- Note: - For input of length 12 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "12". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42b173d53943062561". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1377 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111204040404". Note: ------------------------------------------------------- Note: - For input of length 11 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "11". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 1378 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42a6bacd5952a8545e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 1379 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910110505050505". Note: ------------------------------------------------------- Note: - For input of length 10 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "10". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb421ae704b9a596a02a". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 1380 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910060606060606". Note: ------------------------------------------------------- Note: - For input of length 09 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "09". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Baldwin Informational, Expires 12/25/1999 1381 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "encryptedtext" with hex value "f960bce55663bb42678873de204738e7". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080907070707070707". Note: ------------------------------------------------------- Note: - For input of length 08 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Baldwin Informational, Expires 12/25/1999 1382 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set length of buffer "plaintext" to decimal value "08". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "f960bce55663bb420440c32cc313e99e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1383 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080808080808080808". Note: ------------------------------------------------------- Note: - For input of length 07 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "07". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "8d190aa85805810a". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1384 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060701". Note: ------------------------------------------------------- Note: - For input of length 6 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "6". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1385 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "7e0b278857bae309". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1386 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060202". Note: ------------------------------------------------------- Note: - For input of length 5 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "5". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "efb2c11df5851d38". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1387 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405030303". Note: ------------------------------------------------------- Note: - For input of length 4 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "4". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1388 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "cac9a1f1e979e1ff". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030404040404". Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1389 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - For input of length 3 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "3". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "3baa090e6eeea244". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1390 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030505050505". Note: ------------------------------------------------------- Note: - For input of length 2 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "2". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "20a0cad833dcd868". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1391 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102060606060606". Note: ------------------------------------------------------- Note: - For input of length 1 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "1". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address Baldwin Informational, Expires 12/25/1999 1392 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "bce4fde9fdc2990c". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next Baldwin Informational, Expires 12/25/1999 1393 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0107070707070707". Note: ------------------------------------------------------- Note: - For input of length 0 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "0". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "70943a5611926ece". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 1394 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0808080808080808". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVDSXP00". This is the start of test case "TVRC2B00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_RC2_CBCPadBER. Note: Assuming that DES EDE CBC Pad is tested elsewhere, just Note: test the Note: BER encoding and decoding mechanism. Note: Depends on: Note: - AI_RC2_CBCPad Baldwin Informational, Expires 12/25/1999 1395 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - KI_Item Note: Test cases: Note: - Compare results of CBCPad and CBCPadBER for Note: two different keys with 9 byte input. Note: - Compare results of CBCPad and CBCPadBER for Note: two different IVs with 7 byte input. Note: Not tested: Note: - Test GetAlgorithmInfo on BER objects as BER AI and Note: regular AI. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext1" of decimal value "100" bytes. Create buffer "keytext2" of decimal value "100" bytes. Create buffer "algInfo" of decimal value "100" bytes. Create buffer "algInfo2" of decimal value "100" bytes. Create buffer "plaintext1" of decimal value "100" bytes. Create buffer "plaintext2" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ciphertext2" of decimal value "100" bytes. Create buffer "ivector1" of decimal value "100" bytes. Create buffer "ivector2" of decimal value "100" bytes. Create buffer "ivector3" of decimal value "100" bytes. Create buffer "encryptedtext1" of decimal value "100" bytes. Create buffer "encryptedtext2" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "plaintext1" to hex value "010203040506070809". Set buffer "plaintext2" to hex value "01020304050607". Set buffer "keytext1" to hex value "0123456789ABCDEF". Set buffer "keytext2" to hex value "AABBCCDDEEFF0001000102040810 2040". Set buffer "ivector1" to hex value "00000000EFAB23EF". Set buffer "ivector2" to hex value "0001020408102040". Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1396 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "64", contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoBER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Compare results of CBCPad and CBCPadBER for Note: first key with 9 byte input. Note: Get the BER information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_RC2_CBCPadBER". Load buffer "algInfo" from info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301906082a864886f70d0302300d020178040800000000efab23ef". Note: Set the encrypter and decrypter from the BER. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER" initialized from contents of buffer Baldwin Informational, Expires 12/25/1999 1397 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and Baldwin Informational, Expires 12/25/1999 1398 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 1399 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPad and CBCPadBER for Note: second key with 9 byte input. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext2". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Baldwin Informational, Expires 12/25/1999 1400 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1401 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPad and CBCPadBER for Note: first IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "64", contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoBER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the BER information and check it against the expected Note: value. Baldwin Informational, Expires 12/25/1999 1402 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_RC2_CBCPadBER". Load buffer "algInfo" from info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301906082a864886f70d0302300d020178040800000000efab23ef". Note: Set the encrypter and decrypter from the BER. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Baldwin Informational, Expires 12/25/1999 1403 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Baldwin Informational, Expires 12/25/1999 1404 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: - Compare results of CBCPad and CBCPadBER for Note: second IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1405 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoBER". Call B_CreateAlgorithmObject passing "encrypterNoBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "64", contents of buffer "ivector2". Call B_SetAlgorithmInfo passing "encrypterNoBER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the BER information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoBER" and "AI_RC2_CBCPadBER". Load buffer "algInfo" from info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Check equality of buffer "algInfo" with hex value "301906082a864886f70d0302300d02017804080001020408102040". Note: Set the encrypter and decrypter from the BER. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBCPadBER" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 1406 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the BER encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-BER encrypter. Baldwin Informational, Expires 12/25/1999 1407 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encrypterNoBER" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoBER" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check BER decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1408 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVRC2B00". This is the start of test case "TVRC2B01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Compare 3.0 with 2.x of BER encoding of RC2 up to 255 Note: effective Note: key bits. Note: ------------------------------------------------------- Note: Start with the GlobalInit Note: GlobalInit (AM_RC2_CBC_ENCRYPT, AM_RC2_CBC_DECRYPT, Note: NULL_PTR) Create algorithm object "rc2BER". Call B_CreateAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: We're looking at the effective key bits portion of the Note: encoding, so we don't care if the iv is the same every Note: time. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "20", "0000000000000000". Call B_SetAlgorithmInfo passing "rc2BER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301906082a864886f70d0302300d02017d04080000000000000000". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "rc2BER" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1409 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Create algorithm object "rc2BER". Call B_CreateAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "40", "0000000000000000". Call B_SetAlgorithmInfo passing "rc2BER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301a06082a864886f70d0302300e020200a004080000000000000000". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "rc2BER" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Create algorithm object "rc2BER". Call B_CreateAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "56", "0000000000000000". Call B_SetAlgorithmInfo passing "rc2BER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info Baldwin Informational, Expires 12/25/1999 1410 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 structure for "AI_RC2_CBCPadBER" initialized from "301906082a864886f70d0302300d02013404080000000000000000". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "rc2BER" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Create algorithm object "rc2BER". Call B_CreateAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "64", "0000000000000000". Call B_SetAlgorithmInfo passing "rc2BER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301906082a864886f70d0302300d02017804080000000000000000". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "rc2BER" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Create algorithm object "rc2BER". Call B_CreateAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1411 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "80", "0000000000000000". Call B_SetAlgorithmInfo passing "rc2BER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301906082a864886f70d0302300d02014804080000000000000000". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "rc2BER" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Create algorithm object "rc2BER". Call B_CreateAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "128", "0000000000000000". Call B_SetAlgorithmInfo passing "rc2BER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301906082a864886f70d0302300d02013a04080000000000000000". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "rc2BER" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc2BER". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1412 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Create algorithm object "rc2BER". Call B_CreateAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "172", "0000000000000000". Call B_SetAlgorithmInfo passing "rc2BER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301906082a864886f70d0302300d02016304080000000000000000". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "rc2BER" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Create algorithm object "rc2BER". Call B_CreateAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "205", "0000000000000000". Call B_SetAlgorithmInfo passing "rc2BER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301a06082a864886f70d0302300e020200f904080000000000000000". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Baldwin Informational, Expires 12/25/1999 1413 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetAlgorithmInfo passing "_InfoPointer" and "rc2BER" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Create algorithm object "rc2BER". Call B_CreateAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "255", "0000000000000000". Call B_SetAlgorithmInfo passing "rc2BER" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC2_CBCPadBER" initialized from "301a06082a864886f70d0302300e020200ab04080000000000000000". Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "rc2BER" and "AI_RC2_CBCPadBER". Check equality of info structure for "AI_RC2_CBCPadBER" with expected info structure for "AI_RC2_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "rc2BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- This is the end of test case "TVRC2B01". This is the start of test case "TVRC2C00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Baldwin Informational, Expires 12/25/1999 1414 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test vectors for RC2 ECB mode. Note: Same inputs as DES NIST test vectors, so only test 64 bit Note: keys. Note: Tests AI_RC2_CBC with an IV of all zeros. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", "0000000000000000". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", "0000000000000000". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1415 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Test case 0 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "ebb773f993278eff". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1416 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 1 Set buffer "keytext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "278b27e42e2f0d49". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 1417 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1418 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Test case 2 Set buffer "keytext" to hex value "3000000000000000". Set buffer "plaintext" to hex value "1000000000000001". Set buffer "ciphertext" to hex value "30649edf9be7d2c2". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1419 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 3 Set buffer "keytext" to hex value "1111111111111111". Set buffer "plaintext" to hex value "1111111111111111". Set buffer "ciphertext" to hex value "08ba6ffa24cd2448". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1420 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1421 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Test case 4 Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "1111111111111111". Set buffer "ciphertext" to hex value "83919a5cbdda91e8". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1422 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 5 Set buffer "keytext" to hex value "1111111111111111". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "715d05dcbad0a52d". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1423 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1424 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 6 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "ebb773f993278eff". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1425 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 7 Set buffer "keytext" to hex value "FEDCBA9876543210". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "aff61f28adb8f992". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1426 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1427 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 8 Set buffer "keytext" to hex value "7CA110454A1A6E57". Set buffer "plaintext" to hex value "01A1D6D039776742". Set buffer "ciphertext" to hex value "e6c72bd91a8317da". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and Baldwin Informational, Expires 12/25/1999 1428 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 9 Set buffer "keytext" to hex value "0131D9619DC1376E". Set buffer "plaintext" to hex value "5CD54CA83DEF57DA". Set buffer "ciphertext" to hex value "5dec877636c097f4". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1429 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 1430 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 10 Set buffer "keytext" to hex value "07A1133E4A0B2686". Set buffer "plaintext" to hex value "0248D43806F67172". Set buffer "ciphertext" to hex value "f6a678d160b219e1". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 1431 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 11 Set buffer "keytext" to hex value "3849674C2602319E". Set buffer "plaintext" to hex value "51454B582DDF440A". Set buffer "ciphertext" to hex value "f10947aada21cc24". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and Baldwin Informational, Expires 12/25/1999 1432 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 1433 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 12 Set buffer "keytext" to hex value "04B915BA43FEB5B6". Set buffer "plaintext" to hex value "42FD443059577FA2". Set buffer "ciphertext" to hex value "2f999b72bfe16fa7". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 1434 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 13 Set buffer "keytext" to hex value "0113B970FD34F2CE". Set buffer "plaintext" to hex value "059B5E0851CF143A". Set buffer "ciphertext" to hex value "35783a7937fc0786". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1435 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 1436 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 14 Set buffer "keytext" to hex value "0170F175468FB5E6". Set buffer "plaintext" to hex value "0756D8E0774761D2". Set buffer "ciphertext" to hex value "4be2541e1f1e9ae9". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of Baldwin Informational, Expires 12/25/1999 1437 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 15 Set buffer "keytext" to hex value "43297FAD38E373FE". Set buffer "plaintext" to hex value "762514B829BF486A". Set buffer "ciphertext" to hex value "0d827ab91cbe6b81". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1438 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Baldwin Informational, Expires 12/25/1999 1439 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 16 Set buffer "keytext" to hex value "07A7137045DA2A16". Set buffer "plaintext" to hex value "3BDD119049372802". Set buffer "ciphertext" to hex value "0e4d330b57b01f64". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Baldwin Informational, Expires 12/25/1999 1440 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 17 Set buffer "keytext" to hex value "04689104C2FD3B2F". Set buffer "plaintext" to hex value "26955F6835AF609A". Set buffer "ciphertext" to hex value "0f89859336a2bb56". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1441 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1442 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 18 Set buffer "keytext" to hex value "37D06BB516CB7546". Set buffer "plaintext" to hex value "164D5E404F275232". Set buffer "ciphertext" to hex value "cc22a66f79417445". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Baldwin Informational, Expires 12/25/1999 1443 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 19 Set buffer "keytext" to hex value "1F08260D1AC2465E". Set buffer "plaintext" to hex value "6B056E18759F5CCA". Set buffer "ciphertext" to hex value "9a9fa77a5ce073a0". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 1444 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1445 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 20 Set buffer "keytext" to hex value "584023641ABA6176". Set buffer "plaintext" to hex value "004BD6EF09176062". Set buffer "ciphertext" to hex value "d896266223671934". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1446 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 21 Set buffer "keytext" to hex value "025816164629B007". Set buffer "plaintext" to hex value "480D39006EE762F2". Set buffer "ciphertext" to hex value "4df89cf7ee3d5b40". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and Baldwin Informational, Expires 12/25/1999 1447 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1448 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 22 Set buffer "keytext" to hex value "49793EBC79B3258F". Set buffer "plaintext" to hex value "437540C8698F3CFA". Set buffer "ciphertext" to hex value "141f405ca84c25c4". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1449 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 23 Set buffer "keytext" to hex value "4FB05E1515AB73A7". Set buffer "plaintext" to hex value "072D43A077075292". Set buffer "ciphertext" to hex value "3f0558b19b018711". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Baldwin Informational, Expires 12/25/1999 1450 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1451 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 24 Set buffer "keytext" to hex value "49E95D6D4CA229BF". Set buffer "plaintext" to hex value "02FE55778117F12A". Set buffer "ciphertext" to hex value "585fe24017619ccf". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1452 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 25 Set buffer "keytext" to hex value "018310DC409B26D6". Set buffer "plaintext" to hex value "1D9D5C5018F728C2". Set buffer "ciphertext" to hex value "7963042382f61893". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" Baldwin Informational, Expires 12/25/1999 1453 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1454 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 26 Set buffer "keytext" to hex value "1C587F1C13924FEF". Set buffer "plaintext" to hex value "305532286D6F295A". Set buffer "ciphertext" to hex value "b3073bcae8912b3b". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1455 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 27 Set buffer "keytext" to hex value "0101010101010101". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "927b508ff3609651". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1456 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 1457 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 28 Set buffer "keytext" to hex value "1F1F1F1F0E0E0E0E". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "d8e4684dce864c3b". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1458 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 29 Set buffer "keytext" to hex value "E0FEE0FEF1FEF1FE". Set buffer "plaintext" to hex value "0123456789ABCDEF". Set buffer "ciphertext" to hex value "af317f8db5f2b33c". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1459 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1460 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 30 Set buffer "keytext" to hex value "0000000000000000". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "0770c3eb6dc04678". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and Baldwin Informational, Expires 12/25/1999 1461 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 31 Set buffer "keytext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "a3a112654f81c5cd". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1462 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next Baldwin Informational, Expires 12/25/1999 1463 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 32 Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "a9f36e0f75c4d4e7". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1464 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Test case 33 Set buffer "keytext" to hex value "FEDCBA9876543210". Set buffer "plaintext" to hex value "FFFFFFFFFFFFFFFF". Set buffer "ciphertext" to hex value "285155ee09767f79". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 1465 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1466 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVRC2C00". This is the start of test case "TVRC2C01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for RC2 ECB mode. Note: Tests AI_RC2_CBC with an IV of all zeros. Note: Test various length keys and effective key sizes. Note: Specifically: Note: Effective bits Key Length in Bytes Note: 64 1 Note: 64 7 Note: 64 16 Note: 64 64 Note: 64 127 Note: 64 128 Note: 128 1 Note: 128 16 Note: 128 33 Note: 129 33 Note: 1 65 Note: 9 128 Note: 1024 63 Baldwin Informational, Expires 12/25/1999 1467 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Error cases: Note: 64 129 Note: 64 258 Note: 64 0 Note: 0 8 Note: 1025 63 Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "AM_MD5_RANDOM", "NULL_PTR". Note: Setup data objects Create buffer "plaintext" of decimal value "8" bytes. Create buffer "ivector" of decimal value "8" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ivector" to hex value "0000000000000000". Note: ------------------------------------------------------- Note: Fill in keytext object with enough random bytes. Create buffer "seed" of decimal value "6" bytes. Set buffer "seed" to hex value "a1b2c3d4e5f6". Create algorithm object "randomAlgorithm". Call B_CreateAlgorithmObject passing "randomAlgorithm". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomAlgorithm" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomAlgorithm" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomAlgorithm" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1468 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "keytext" of decimal value "300" bytes. Set "_OutputLen" to decimal value "300". Call B_GenerateRandomBytes passing "randomAlgorithm" and address of next free byte in "keytext" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keytext" by "_OutputLen". Finalize "keytext". Note: ------------------------------------------------------- Note: Setup algorithm objects for 64 bit effective key size. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "64", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 64 1 Set length of buffer "keytext" to decimal value "1". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Baldwin Informational, Expires 12/25/1999 1469 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "ciphertext" to hex value "61a8a244adacccf0". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of Baldwin Informational, Expires 12/25/1999 1470 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 64 7 Set length of buffer "keytext" to decimal value "7". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "6ccf4308974c267f". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address Baldwin Informational, Expires 12/25/1999 1471 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Baldwin Informational, Expires 12/25/1999 1472 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: 64 16 Set length of buffer "keytext" to decimal value "16". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "1a807d272bbe5db1". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1473 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 64 64 Set length of buffer "keytext" to decimal value "64". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "903beb7f347fddca". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1474 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1475 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 64 127 Set length of buffer "keytext" to decimal value "127". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "7a202f88dc198621". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 1476 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 64 128 Set length of buffer "keytext" to decimal value "128". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "f8d0c90220a6405c". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1477 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1478 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Error case Note: Effective bits Key Length in Bytes Note: 64 129 Set length of buffer "keytext" to decimal value "129". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "0000000000000000". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Error case Note: Effective bits Key Length in Bytes Baldwin Informational, Expires 12/25/1999 1479 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: 64 258 Set length of buffer "keytext" to decimal value "258". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "0000000000000000". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Error case Note: Effective bits Key Length in Bytes Note: 64 0 Set length of buffer "keytext" to decimal value "0". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "0000000000000000". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 1480 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_NOT_SUPPORTED". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup the algorithm objects Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects for 128 bit effective key size. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1481 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "128", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 128 1 Set length of buffer "keytext" to decimal value "1". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "2f6950c598c7b1c1". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1482 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 128 16 Set length of buffer "keytext" to decimal value "16". Display buffer "keytext". Baldwin Informational, Expires 12/25/1999 1483 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "2269552ab0f85ca6". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address Baldwin Informational, Expires 12/25/1999 1484 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 128 33 Set length of buffer "keytext" to decimal value "33". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "32c04f5a42466924". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1485 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1486 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Cleanup the algorithm objects Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects for 129 bit effective key size. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "129", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "129", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 129 33 Set length of buffer "keytext" to decimal value "33". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "5b78d3a43dfff1f1". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Baldwin Informational, Expires 12/25/1999 1487 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1488 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup the algorithm objects Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects for 1 bit effective key size. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "1", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "1", contents of buffer "ivector". Baldwin Informational, Expires 12/25/1999 1489 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 1 65 Set length of buffer "keytext" to decimal value "65". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "219911478faf0e26". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Baldwin Informational, Expires 12/25/1999 1490 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup the algorithm objects Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects for 9 bit effective key size. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Baldwin Informational, Expires 12/25/1999 1491 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "9", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "9", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 9 128 Set length of buffer "keytext" to decimal value "128". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "f326151f8ce0465f". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1492 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1493 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Cleanup the algorithm objects Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects for 1024 bit effective key size. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "1024", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "1024", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Effective bits Key Length in Bytes Note: 1024 63 Set length of buffer "keytext" to decimal value "63". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "ea250575208004a2". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Baldwin Informational, Expires 12/25/1999 1494 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "ciphertext" and length of initialized bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1495 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup the algorithm objects Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects for 1025 bit effective key size. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_INFO". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "1025", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1496 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to "BE_ALGORITHM_INFO". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "1025", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Error case Note: Effective bits Key Length in Bytes Note: 1025 63 Set length of buffer "keytext" to decimal value "63". Display buffer "keytext". Set buffer "plaintext" to hex value "0000000000000000". Set buffer "ciphertext" to hex value "ea250575208004a2". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: NextExpectedError (BE_NOT_SUPPORTED) Note: EncryptInit (encrypter, key) Note: NextExpectedError (BE_NOT_SUPPORTED) Note: DecryptInit (decrypter, key) Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup the algorithm objects Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1497 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVRC2C01". This is the start of test case "TVRC2P00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_RC2_CBCPad. Note: Assuming that RC2 CBC is tested elsewhere, just test the Note: padding mechanism. Note: Depends on: Note: - AI_RC2_CBC Note: - KI_Item Note: Test cases: Note: - For 8 byte input, first block matches DES_CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Note: - For inputs ranging from 0 to 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Note: History: Note: - Create 11/2/95 by rwb. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "keytext" to hex value "0123456789ABCDEF". Set buffer "plaintext" to hex value "6789ABCDEF012345". Set buffer "ivector" to hex value "00000000EFAB23EF". Set buffer "ciphertext1" to hex value "8ab9812a157efa87". Set buffer "encryptedtext" to hex value "". Set buffer "decryptedtext" to hex value "". Baldwin Informational, Expires 12/25/1999 1498 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptNoPad". Call B_CreateAlgorithmObject passing "decryptNoPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "64", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "64", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 1499 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_RC2_CBC" initialized from "64", contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decryptNoPad" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptNoPad" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - For 8 byte input, first block matches CBC of input Note: and the second byte decrypts to eight bytes of 0x08. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "8ab9812a157efa8791cf42833556fb07". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1500 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "6789abcdef0123450808080808080808". Set length of buffer "encryptedtext" to decimal value "8". Check equality of buffer "encryptedtext" with contents of buffer "ciphertext1". Set length of buffer "decryptedtext" to decimal value "8". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Note: ------------------------------------------------------- Note: Setup plaintext array Set buffer "plaintext" to hex value "010203040506070809101112131 Baldwin Informational, Expires 12/25/1999 1501 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 41516". Note: ------------------------------------------------------- Note: - For input of length 16 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "16". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "2def62e545a755deabb588a36af7e2a11f65064b843373d0". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 1502 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "010203040506070809101112131415160808080808080808". Note: ------------------------------------------------------- Note: - For input of length 15 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "15". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "2def62e545a755de377b2c5382276ec1". Baldwin Informational, Expires 12/25/1999 1503 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213141501". Note: ------------------------------------------------------- Note: - For input of length 14 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "14". Baldwin Informational, Expires 12/25/1999 1504 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "2def62e545a755de558b258c5e98416a". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1505 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213140202". Note: ------------------------------------------------------- Note: - For input of length 13 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "13". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "2def62e545a755de61202489ee7ba71d". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1506 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111213030303". Note: ------------------------------------------------------- Note: - For input of length 12 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "12". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1507 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "2def62e545a755dee88e29056ae9da70". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1508 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910111204040404". Note: ------------------------------------------------------- Note: - For input of length 11 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "11". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "2def62e545a755de3c07d96f3a786265". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1509 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910110505050505". Note: ------------------------------------------------------- Note: - For input of length 10 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "10". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1510 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "2def62e545a755deb44c5090b8835c81". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080910060606060606". Note: ------------------------------------------------------- Note: - For input of length 09 bytes, check that Note: - Encrypt and Decrypt are inverses. Baldwin Informational, Expires 12/25/1999 1511 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "09". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "2def62e545a755decc05ef7692f2c516". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length Baldwin Informational, Expires 12/25/1999 1512 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080907070707070707". Note: ------------------------------------------------------- Note: - For input of length 08 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "08". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "2def62e545a755dec6d72bd46db0b596". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length Baldwin Informational, Expires 12/25/1999 1513 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "01020304050607080808080808080808". Note: ------------------------------------------------------- Note: - For input of length 07 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "07". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 1514 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "bc833ce2076e664d". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 1515 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060701". Note: ------------------------------------------------------- Note: - For input of length 6 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "6". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "3a6906738cccc62f". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and Baldwin Informational, Expires 12/25/1999 1516 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405060202". Note: ------------------------------------------------------- Note: - For input of length 5 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "5". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1517 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "8c7cdfd20a4a6e28". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030405030303". Baldwin Informational, Expires 12/25/1999 1518 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: - For input of length 4 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "4". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "7bc7d4549a008837". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Baldwin Informational, Expires 12/25/1999 1519 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030404040404". Note: ------------------------------------------------------- Note: - For input of length 3 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "3". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "eb777b0cdb21b583". Baldwin Informational, Expires 12/25/1999 1520 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102030505050505". Note: ------------------------------------------------------- Note: - For input of length 2 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "2". Call B_EncryptUpdate passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 1521 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "ad39a96dcdfa9702". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1522 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0102060606060606". Note: ------------------------------------------------------- Note: - For input of length 1 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "1". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "7c57ff01ccb66c58". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1523 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0107070707070707". Note: ------------------------------------------------------- Note: - For input of length 0 bytes, check that Note: - Encrypt and Decrypt are inverses. Note: - Cipher text is the expected value. Note: - Padding bytes have the expected value. Set length of buffer "plaintext" to decimal value "0". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and address of first initialized byte in buffer "plaintext" and length of initialized bytes in buffer "plaintext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1524 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext" by "_OutputLen". Finalize buffer "encryptedtext". Display buffer "encryptedtext". Check equality of buffer "encryptedtext" with hex value "2f9c162c976d4d2e". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext". Call B_DecryptUpdate passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext" and length of initialized bytes in buffer "encryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decryptNoPad" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1525 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "decryptedtext". Display buffer "decryptedtext". Check equality of buffer "decryptedtext" with hex value "0808080808080808". Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVRC2P00". This is the start of test case "TVRC2Z00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for AI_RC2_CBCPadPEM. Note: Assuming that CBC Pad is tested elsewhere, just test the Note: PEM encoding and decoding mechanism. Note: Depends on: Note: - AI_RC2_CBCPad Note: - KI_8Byte Note: Test cases: Note: - Compare results of CBCPad and CBCPadPEM for Note: two different keys with 9 byte input. Note: - Compare results of CBCPad and CBCPadPEM for Note: two different IVs with 7 byte input. Note: Not tested: Note: - Test GetAlgorithmInfo on PEM objects as PEM AI and Note: regular AI. Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "NULL_PTR". Note: Setup data objects Create buffer "keytext1" of decimal value "100" bytes. Create buffer "keytext2" of decimal value "100" bytes. Create buffer "algInfo" of decimal value "100" bytes. Create buffer "algInfo2" of decimal value "100" bytes. Create buffer "plaintext1" of decimal value "100" bytes. Create buffer "plaintext2" of decimal value "100" bytes. Create buffer "ciphertext1" of decimal value "100" bytes. Create buffer "ciphertext2" of decimal value "100" bytes. Baldwin Informational, Expires 12/25/1999 1526 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "ivector1" of decimal value "100" bytes. Create buffer "ivector2" of decimal value "100" bytes. Create buffer "ivector3" of decimal value "100" bytes. Create buffer "encryptedtext1" of decimal value "100" bytes. Create buffer "encryptedtext2" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Set buffer "plaintext1" to hex value "010203040506070809". Set buffer "plaintext2" to hex value "01020304050607". Set buffer "keytext1" to hex value "0123456789ABCDEF". Set buffer "keytext2" to hex value "AABBCCDDEEFF0001". Set buffer "ivector1" to hex value "00000000EFAB23EF". Set buffer "ivector2" to hex value "0001020408102040". Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoPEM". Call B_CreateAlgorithmObject passing "encrypterNoPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "64", contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoPEM" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Compare results of CBCPad and CBCPadPEM for Note: first key with 9 byte input. Note: Get the PEM information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and Baldwin Informational, Expires 12/25/1999 1527 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "encrypterNoPEM" and "AI_RC2_CBCPadPEM". Load buffer "algInfo" from info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Note: DataEquals (algInfo, 5243322d4342432c4d4130434158674543414 Note: 1414141 Note: 447671795076) Create buffer "algInfoString" of decimal value "100" bytes. Set buffer "algInfoString" with string value "RC2-CBC,MA0CAXgECAAAAADvqyPv". Check equality of buffer "algInfo" with contents of buffer "algInfoString". Note: Set the encrypter and decrypter from the PEM. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1528 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Run the PEM encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-PEM encrypter. Call Call B_EncryptInit passing "encrypterNoPEM" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1529 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check PEM decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPad and CBCPadPEM for Note: second key with 9 byte input. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext2". Call B_SetKeyInfo passing "key" and "KI_8Byte" and Baldwin Informational, Expires 12/25/1999 1530 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the PEM encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-PEM encrypter. Call Call B_EncryptInit passing "encrypterNoPEM" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext1" and length of initialized bytes in buffer "plaintext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer Baldwin Informational, Expires 12/25/1999 1531 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check PEM decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext1". Note: ------------------------------------------------------- Note: - Compare results of CBCPad and CBCPadPEM for Note: first IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1532 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "encrypterNoPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoPEM". Call B_CreateAlgorithmObject passing "encrypterNoPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "64", contents of buffer "ivector1". Call B_SetAlgorithmInfo passing "encrypterNoPEM" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the PEM information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoPEM" and "AI_RC2_CBCPadPEM". Load buffer "algInfo" from info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Note: DataEquals (algInfo, 5243322d4342432c4d4130434158674543414 Note: 1414141 Note: 447671795076) Create buffer "algInfoString" of decimal value "100" bytes. Set buffer "algInfoString" with string value "RC2-CBC,MA0CAXgECAAAAADvqyPv". Check equality of buffer "algInfo" with contents of buffer "algInfoString". Baldwin Informational, Expires 12/25/1999 1533 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Set the encrypter and decrypter from the PEM. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the PEM encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1534 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-PEM encrypter. Call Call B_EncryptInit passing "encrypterNoPEM" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check PEM decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1535 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Note: ------------------------------------------------------- Note: - Compare results of CBCPad and CBCPadPEM for Note: second IV with 7 byte input. Note: Setup algorithm objects. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypterNoPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypterNoPEM". Call B_CreateAlgorithmObject passing "encrypterNoPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1536 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPad" initialized from "64", contents of buffer "ivector2". Call B_SetAlgorithmInfo passing "encrypterNoPEM" and "AI_RC2_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Get the PEM information and check it against the expected Note: value. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypterNoPEM" and "AI_RC2_CBCPadPEM". Load buffer "algInfo" from info structure for "AI_RC2_CBCPadPEM". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "algInfo". Note: DataEquals (algInfo, 5243322d4342432c4d4130434158674543414 Note: 1424167 Note: 514945434241) Create buffer "algInfoString" of decimal value "100" bytes. Set buffer "algInfoString" with string value "RC2-CBC,MA0CAXgECAABAgQIECBA". Check equality of buffer "algInfo" with contents of buffer "algInfoString". Note: Set the encrypter and decrypter from the PEM. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBCPadPEM" initialized from contents of buffer "algInfo". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBCPadPEM" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1537 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Setup Key object Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keytext1". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Run the PEM encrypter. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "encryptedtext1" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext1" by "_OutputLen". Finalize buffer "encryptedtext1". Display buffer "encryptedtext1". Note: Check result against non-PEM encrypter. Call Call B_EncryptInit passing "encrypterNoPEM" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1538 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and address of first initialized byte in buffer "plaintext2" and length of initialized bytes in buffer "plaintext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Call B_EncryptFinal passing "encrypterNoPEM" and address of next free byte in buffer "encryptedtext2" and address of "_OutputLen" and length of free bytes in buffer "encryptedtext2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "encryptedtext2" by "_OutputLen". Finalize buffer "encryptedtext2". Display buffer "encryptedtext2". Check equality of buffer "encryptedtext2" with contents of buffer "encryptedtext1". Note: Check PEM decrypter Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and address of first initialized byte in buffer "encryptedtext1" and length of initialized bytes in buffer "encryptedtext1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "decryptedtext" and address of "_OutputLen" and length of free bytes in buffer "decryptedtext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "decryptedtext" by "_OutputLen". Finalize buffer "decryptedtext". Check equality of buffer "decryptedtext" with contents of buffer "plaintext2". Baldwin Informational, Expires 12/25/1999 1539 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TVRC2Z00". This is the start of test case "TEDESC00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Error tests of AI_DES_CBC_IV8 Note: Test cases Note: - Check for NO error: BE_INPUT_LEN if input length is Note: zero. Note: - Check for error: BE_INPUT_LEN from EncryptFinal for Note: input lengths of 0, 7, 9. Note: - Check for error: BE_INPUT_LEN from DecryptFinal for Note: input lengths of 0, 7, 9. Note: - Check for BE_OUTPUT_LEN error from En/DecryptUpdate. Note: - Check for NO error: BE_OUTPUT_LEN for En/DecryptFinal Note: - Check for error: BE_ALGORITHM_ALREADY_SET Note: - Check for error: BE_ALGORITHM_NOT_INITIALIZED Note: - Check for error: BE_ALGORITHM_NOT_SET Note: - Check for error: BE_WRONG_KEY_INFO (0, 7 and 9 byte Note: keys) Note: - Check for error: BE_WRONG_KEY_INFO (public key) Note: - Check for error: BE_METHOD_NOT_IN_CHOOSER Note: - Check for error: BE_KEY_NOT_SET Note: - Check for error: BE_KEY_ALREADY_SET Note: - Check for error: BE_KEY_OBJ and BE_ALGORITHM_NOT_INITIAL Note: IZED Note: - Check for error: BE_WRONG_ALGORITHM_INFO Note: Not testable: Note: - Check for error: BE_DATA Note: - Check for error: BE_KEY_LEN Note: - Check for error: BE_NOT_INITIALIZED Note: - Check for error: BE_INPUT_COUNT Note: - Check for error: BE_OUTPUT_COUNT Note: To do: Note: - Add tests using the CreateNull operations Note: - Add out of memory error testing, should only effect Note: Init. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 1540 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Setup data objects Create buffer "keytext" of decimal value "100" bytes. Create buffer "plaintext" of decimal value "100" bytes. Create buffer "input" of decimal value "100" bytes. Create buffer "output" of decimal value "100" bytes. Create buffer "ciphertext" of decimal value "100" bytes. Create buffer "ivector" of decimal value "100" bytes. Create buffer "encryptedtext" of decimal value "100" bytes. Create buffer "decryptedtext" of decimal value "100" bytes. Create buffer "onebytelong" of decimal value "1" bytes. Note: ------------------------------------------------------- Note: Setup algorithm objects. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "ivector" to hex value "0001101001101011". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from "0102030405060708". Call B_SetKeyInfo passing "key" and "KI_8Byte" and Baldwin Informational, Expires 12/25/1999 1541 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check for no BE_INPUT_LEN error if input length is Note: zero. Set buffer "input" to hex value "". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Check equality of buffer "ciphertext" with hex value "". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 1542 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Check equality of buffer "ciphertext" with hex value "". Note: ------------------------------------------------------- Note: - Check for BE_INPUT_LEN error from En/DecryptFinal for Note: input lengths of 1, 7, 9. Note: Input length is 1 Set buffer "input" to hex value "01". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1543 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Note: Input length is 7 Set buffer "input" to hex value "01020304050607". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Baldwin Informational, Expires 12/25/1999 1544 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Input length is 9 Set buffer "input" to hex value "010203040506070809". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Display buffer "ciphertext". Note: ------------------------------------------------------- Note: Check for error: BE_OUTPUT_LEN for En/DecryptUpdate Set buffer "input" to hex value "112233445566778899". Call Call B_EncryptInit passing "encrypter" and "key" and Baldwin Informational, Expires 12/25/1999 1545 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_OUTPUT_LEN". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_OUTPUT_LEN". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Note: ------------------------------------------------------- Note: Check for NO error: BE_OUTPUT_LEN for En/DecryptFinal Note: Since CBC mode w/o padding does not hang onto bytes, Note: there is never any output for En/DecryptFinal. Note: Before BSafe 2.5 this could produce an error because Note: the CBC routines would always buffer 8 bytes. Set buffer "input" to hex value "1122334455667788112233445566778 8". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1546 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Call B_DecryptFinal passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Note: ------------------------------------------------------- Note: - Check for error: BE_ALGORITHM_ALREADY_SET Set "_ExpectedStatus" to "BE_ALGORITHM_ALREADY_SET". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check for error: BE_ALGORITHM_NOT_INITIALIZED Call Call B_DestroyAlgorithmObject passing "encrypter". Baldwin Informational, Expires 12/25/1999 1547 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Baldwin Informational, Expires 12/25/1999 1548 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Note: ------------------------------------------------------- Note: - Check for error: BE_ALGORITHM_NOT_SET Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_DES_CBC_IV8". Display info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call Call B_EncryptInit passing "encrypter" and "key" and Baldwin Informational, Expires 12/25/1999 1549 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_SET". Call B_DecryptFinal passing "encrypter" and address of next free byte in buffer "onebytelong" and address of "_OutputLen" and length of free bytes in buffer "onebytelong" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "onebytelong" by "_OutputLen". Finalize buffer "onebytelong". Baldwin Informational, Expires 12/25/1999 1550 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ------------------------------------------------------- Note: - Check for error: BE_WRONG_KEY_INFO (0, 7 and 9 byte Note: keys) Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized fromDES_CBC_IV8". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Baldwin Informational, Expires 12/25/1999 1551 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "11223344556677". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "112233445566778899". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1552 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Check for error: BE_WRONG_KEY_INFO Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "11", "22". Call B_SetKeyInfo passing "key" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1553 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check for error: BE_METHOD_NOT_IN_CHOOSER Set "_Chooser" to "AM_MD2", "NULL_PTR". Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from "0102030405060708". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_METHOD_NOT_IN_CHOOSER". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_METHOD_NOT_IN_CHOOSER". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now, reset the Chooser to Default Chooser values. Set "_Chooser" to DEMO_ALGORITHM_CHOOSER. Note: ------------------------------------------------------- Note: - Check for error: BE_KEY_NOT_SET Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1554 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_NOT_SET". Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_NOT_SET". Call Call B_DecryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check for error: BE_KEY_ALREADY_SET Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DES8" initialized from "0102030405060708". Call B_SetKeyInfo passing "key" and "KI_DES8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1555 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to "BE_KEY_ALREADY_SET". Set "_InfoPointer" to address of info structure for "KI_DES8" initialized from "0102030405060708". Call B_SetKeyInfo passing "key" and "KI_DES8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: - Check for error: BE_KEY_OBJ and BE_ALGORITHM_NOT_INITIAL Note: IZED Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_OBJ". Call Call B_EncryptInit passing "encrypter" and "decrypter" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_EncryptUpdate passing "encrypter" and address of next Baldwin Informational, Expires 12/25/1999 1556 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Set "_ExpectedStatus" to "BE_KEY_OBJ". Call Call B_DecryptInit passing "decrypter" and "encrypter" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Set "_ExpectedStatus" to "BE_ALGORITHM_NOT_INITIALIZED". Call B_DecryptFinal passing "encrypter" and address of next free byte in buffer "ciphertext" and address of "_OutputLen" and length of free bytes in buffer "ciphertext" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "ciphertext" by "_OutputLen". Finalize buffer "ciphertext". Note: ------------------------------------------------------- Note: - Check can get correct IV info Note: - Check for error: BE_WRONG_ALGORITHM_INFO Call Call B_DestroyAlgorithmObject passing "encrypter". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1557 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "ivector" to hex value "aabbccdd11223344". Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from contents of buffer "ivector". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_DES_CBC_IV8". Load buffer "output" from info structure for "AI_DES_CBC_IV8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Check equality of buffer "output" with contents of buffer "ivector". Set "_ExpectedStatus" to "BE_WRONG_ALGORITHM_INFO". Set "_InfoPointer" to address of info structure for "AI_RC2_CBC". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encrypter" and "AI_RC2_CBC". Load buffer "output" from info structure for "AI_RC2_CBC". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Cleanup This is the end of test case "TEDESC00". This is the start of test case "TVHMAC". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Generate 24 byte key and use it to perform HMAC and test Note: it against Note: test vector generated by running SET based code Create buffer "keytext" of decimal value "24" bytes. Set buffer "keytext" to hex value "0123456789ABCDEF1324354757687 Baldwin Informational, Expires 12/25/1999 1558 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 98A9BACBDCEDF112233". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate an HMAC code. Create algorithm object "HMAC_Digester". Call B_CreateAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_HMAC" initialized from "AI_SHA1", "NULL_PTR". Call B_SetAlgorithmInfo passing "HMAC_Digester" and "AI_HMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "dataToDigest" of decimal value "32" bytes. Create buffer "HMACdigest" of decimal value "64" bytes. Set buffer "dataToDigest" to hex value "000000000000000000000000 0000000000000000000000000000000000000000". Note: Use the private key to sign. Call Call B_DigestInit passing "HMAC_Digester" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "HMAC_Digester" and address of first initialized byte in buffer "dataToDigest" and length of initialized bytes in buffer "dataToDigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1559 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "HMAC_Digester" and address of next free byte in buffer "HMACdigest" and address of "_OutputLen" and length of free bytes in buffer "HMACdigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "HMACdigest" by "_OutputLen". Finalize buffer "HMACdigest". Check equality of buffer "HMACdigest" with hex value "e7068e5ef979b0bc871917375ec1b241771ea5c4". Display buffer "HMACdigest". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ----------------- Note: Generate 24 byte key and use it to perform HMAC and test Note: it against Note: test vector generated by running SET based code Create buffer "keytext" of decimal value "24" bytes. Set buffer "keytext" to hex value "0123456789ABCDEF1324354757687 98A9BACBDCEDF112233". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1560 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Generate an HMAC code. Create algorithm object "HMAC_Digester". Call B_CreateAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_HMAC" initialized from "AI_SHA1", "NULL_PTR". Call B_SetAlgorithmInfo passing "HMAC_Digester" and "AI_HMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "dataToDigest" of decimal value "32" bytes. Create buffer "HMACdigest" of decimal value "64" bytes. Set buffer "dataToDigest" to hex value "0123456789ABCDEF13243547 5768798A9BACBDCEDF112233". Note: Use the private key to sign. Call Call B_DigestInit passing "HMAC_Digester" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "HMAC_Digester" and address of first initialized byte in buffer "dataToDigest" and length of initialized bytes in buffer "dataToDigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "HMAC_Digester" and address of next free byte in buffer "HMACdigest" and address of "_OutputLen" and length of free bytes in buffer "HMACdigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "HMACdigest" by "_OutputLen". Finalize buffer "HMACdigest". Check equality of buffer "HMACdigest" with hex value "9858a7b8978c760324b603b13a3685b38bf4d21a". Baldwin Informational, Expires 12/25/1999 1561 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: -------------------- Note: Generate 20 byte key and use it to perform HMAC and test Note: it against Note: an IBM test vector. Create buffer "keytext" of decimal value "24" bytes. Set buffer "keytext" to hex value "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 b0b0b0b0b0b". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate an HMAC code. Create algorithm object "HMAC_Digester". Call B_CreateAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_HMAC" initialized from "AI_SHA1", "NULL_PTR". Call B_SetAlgorithmInfo passing "HMAC_Digester" and "AI_HMAC" Baldwin Informational, Expires 12/25/1999 1562 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "dataToDigest" of decimal value "32" bytes. Create buffer "HMACdigest" of decimal value "64" bytes. Set buffer "dataToDigest" to hex value "4869205468657265". Note: Use the private key to sign. Call Call B_DigestInit passing "HMAC_Digester" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "HMAC_Digester" and address of first initialized byte in buffer "dataToDigest" and length of initialized bytes in buffer "dataToDigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "HMAC_Digester" and address of next free byte in buffer "HMACdigest" and address of "_OutputLen" and length of free bytes in buffer "HMACdigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "HMACdigest" by "_OutputLen". Finalize buffer "HMACdigest". Display buffer "HMACdigest". Check equality of buffer "HMACdigest" with hex value "b617318655057264e28bc0b6fb378c8ef146be00". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1563 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: -------------------- Note: Generate 20 byte key and use it to perform HMAC and test Note: it against Note: an IBM test vector. Create buffer "keytext" of decimal value "24" bytes. Set buffer "keytext" with string value "Jefe". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate an HMAC code. Create algorithm object "HMAC_Digester". Call B_CreateAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_HMAC" initialized from "AI_SHA1", "NULL_PTR". Call B_SetAlgorithmInfo passing "HMAC_Digester" and "AI_HMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "dataToDigest" of decimal value "32" bytes. Create buffer "HMACdigest" of decimal value "64" bytes. Set buffer "dataToDigest" with string value "what do ya want for nothing?". Note: Use the private key to sign. Call Call B_DigestInit passing "HMAC_Digester" and "key" and Baldwin Informational, Expires 12/25/1999 1564 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "HMAC_Digester" and address of first initialized byte in buffer "dataToDigest" and length of initialized bytes in buffer "dataToDigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "HMAC_Digester" and address of next free byte in buffer "HMACdigest" and address of "_OutputLen" and length of free bytes in buffer "HMACdigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "HMACdigest" by "_OutputLen". Finalize buffer "HMACdigest". Display buffer "HMACdigest". Check equality of buffer "HMACdigest" with hex value "effcdf6ae5eb2fa2d27416d5f184df9c259a7c79". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: -------------------- Note: Generate 20 byte key and use it to perform HMAC and test Note: it against Note: an IBM test vector. Create buffer "keytext" of decimal value "24" bytes. Set buffer "keytext" to hex value "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAA". Create key object "key". Baldwin Informational, Expires 12/25/1999 1565 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate an HMAC code. Create algorithm object "HMAC_Digester". Call B_CreateAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_HMAC" initialized from "AI_SHA1", "NULL_PTR". Call B_SetAlgorithmInfo passing "HMAC_Digester" and "AI_HMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "dataToDigest" of decimal value "64" bytes. Create buffer "HMACdigest" of decimal value "64" bytes. Set buffer "dataToDigest" to hex value "DDDDDDDDDDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD DDDDDDDDDDDD". Note: Use the private key to sign. Call Call B_DigestInit passing "HMAC_Digester" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "HMAC_Digester" and address of first initialized byte in buffer "dataToDigest" and length of initialized bytes in buffer "dataToDigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "HMAC_Digester" and address of next Baldwin Informational, Expires 12/25/1999 1566 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "HMACdigest" and address of "_OutputLen" and length of free bytes in buffer "HMACdigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "HMACdigest" by "_OutputLen". Finalize buffer "HMACdigest". Display buffer "HMACdigest". Check equality of buffer "HMACdigest" with hex value "125d7342b9ac11cd91a39af48aa17b4f63f175d3". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVHMAC". This is the start of test case "TVDSA00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Note: AI_DSA, KI_DSAPublic Note: Start with the GlobalInit Set "_Chooser" to "AM_DSA_VERIFY", "NULL_PTR". Note: Set up public key Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 1567 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "KI_DSAPublic" initialized from "##yb32fbec03175791df08c3f861c81 df7de7e0cba7f1c4f7269bb12d6c628784fb742e66ed315754dfe38b5984e94d 372537f655cb3ea4767c878cbd2d783ee662", "##pd411a4a0e393f6aab0f08 b14d18458665b3e4dbdce2544543fe365cf71c8622412db6e7dd02bbe13d88c5 8d7263e90236af17ac8a9fe5f249cc81f427fc543f7", "##qb20db0b101df0c6624fc1392ba55f77d577481e5", "##gb3085510021f999049a9e7cd3872ce9958186b5007e7adaf25248b58a3dc 4f71781d21f2df89b71747bd54b323bbecc443ec1d3e020dadabbf7822578255 c104". Call B_SetKeyInfo passing "publicKey" and "KI_DSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set up signature Create buffer "signature" of decimal value "40" bytes. Set buffer "signature" to hex value "9b77f7054c81531c4e46a4692fb fe0f77f7ebff295b4f6081f8f890e4b5a199ef10ffe21f52b2d68". Note: Set up message digest Create buffer "digest" of decimal value "20" bytes. Set buffer "digest" to hex value "0164b8a914cd2a5e74c4f7ff082c4d 97f1edf880". Note: Verify Signature Create algorithm object "dsaVerify". Call B_CreateAlgorithmObject passing "dsaVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaVerify" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "dsaVerify" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaVerify" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerify" and address of first initialized byte in buffer "signature" and length of Baldwin Informational, Expires 12/25/1999 1568 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVDSA00". This is the start of test case "TVDSA01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector test for Note: AI_DSAParamGen, AI_DSAKeyGen, Note: AI_DSAWithSHA1, AI_DSA, Note: based on the revised FIPS 186 DSA example. Note: This script uses the AI_DummyRandom to provide unaltered Note: seed data to Note: the DSA parameter generation, key generation and Note: signature generation Note: functions. Note: Set up global objects Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DummyRandom" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_DummyRandom" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "26" bytes. Set buffer "seed" to hex value "d5014e4b60ef2ba8b6211b4062ba3224 e0427dd3". Set "_Chooser" to "AM_DUMMY_RANDOM", "AM_DSA_PARAM_GEN", "AM_DSA_KEY_GEN", "AM_SHA", "AM_DSA_VERIFY", "AM_DSA_SIGN", "NULL_PTR". Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1569 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "message" of decimal value "512" bytes. Set buffer "message" with string value "abc". Create buffer "signature" of decimal value "128" bytes. Create algorithm object "dsaRawSign". Call B_CreateAlgorithmObject passing "dsaRawSign". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawSign" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawVerify". Call B_CreateAlgorithmObject passing "dsaRawVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawVerify" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "sha1Digest". Call B_CreateAlgorithmObject passing "sha1Digest". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "sha1Digest" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1570 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: Generate DSA parameters Create algorithm object "dsaParamGen". Call B_CreateAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaKeyGen". Call B_CreateAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAParamGen" initialized from "512". Call B_SetAlgorithmInfo passing "dsaParamGen" and "AI_DSAParamGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_Chooser" to "BTM_DSA_PARAM_GEN", "NULL_PTR". Call Call B_GenerateInit passing "dsaParamGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateParameters passing "dsaParamGen" and "dsaKeyGen" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DSA keypair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_Chooser" to "AM_DSA_KEY_GEN", "NULL_PTR". Call Call B_GenerateInit passing "dsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1571 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "xkey" of decimal value "25" bytes. Set buffer "xkey" to hex value "bd029bbe7f51960bcf9edb2b61f06f0f eb5a38b6". Call B_RandomUpdate passing "random" and address of first initialized byte in "xkey" and length of initialized bytes in "xkey" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "dsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_DSAPublic". Display info structure for "KI_DSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPrivate". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_DSAPrivate". Display info structure for "KI_DSAPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Sign the message Note: Digest the message Call Call B_DigestInit passing "sha1Digest" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digest" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digest" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Baldwin Informational, Expires 12/25/1999 1572 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "message". Display buffer "digest". Note: Do a "raw" signature Call Call B_SignInit passing "dsaRawSign" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSign" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "kkey" of decimal value "25" bytes. Set buffer "kkey" to hex value "687a66d90648f993867e121f4ddf9ddb 01205584". Call B_RandomUpdate passing "random" and address of first initialized byte in "kkey" and length of initialized bytes in "kkey" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSign" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Display buffer "signature". Check equality of buffer "signature" with hex value "8BAC1AB66410435CB7181F95B16AB97C92B341C041E2345F1F56DF2458F426D 155B4BA2DB6DCD8C8". Note: Verify the "raw" signature Call Call B_VerifyInit passing "dsaRawVerify" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaRawVerify" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerify" and address of first Baldwin Informational, Expires 12/25/1999 1573 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Clean up loop objects Call Call B_DestroyAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVDSA01". This is the start of test case "TVMD200". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: RFC 1319 vectors test for MD2 digest algorithm Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_MD2", "NULL_PTR". Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Initialization Baldwin Informational, Expires 12/25/1999 1574 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_MD2" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD2" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Reference test case 1 Note: MD2 ("") = 8350e5a3e24c153df2275c9f80692773 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8350e5a3e24c153df2275c9f80692773". Note: ------------------------------------------------------- Note: Reference test case 2 Note: MD2 ("a") = 32ec01ec4a6dac72c0ab96fb34c0b5d1 Set buffer "input" to hex value "61". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "32ec01ec4a6dac72c0ab96fb34c0b5d1". Note: ------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1575 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Reference test case 3 Note: MD2 ("abc") = da853b0d3f88d99b30283a69e6ded6bb Set buffer "input" to hex value "616263". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "da853b0d3f88d99b30283a69e6ded6bb". Note: ------------------------------------------------------- Note: Reference test case 4 Note: MD2 ("message digest") = ab4f496bfb2a530b219ff33031fe06b0 Set buffer "input" to hex value "6d65737361676520646967657374". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ab4f496bfb2a530b219ff33031fe06b0". Note: ------------------------------------------------------- Note: Reference test case 5 Note: MD2 ("abcdefghijklmnopqrstuvwxyz") = 4e8ddff3650292ab5a410 Note: 8c3aa47940b Set buffer "input" to hex value "6162636465666768696a6b6c6d6e6f7 07172737475767778797a". Baldwin Informational, Expires 12/25/1999 1576 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4e8ddff3650292ab5a4108c3aa47940b". Note: ------------------------------------------------------- Note: Reference test case 6 Note: MD2 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz Note: 0123456789") = Note: da33def2a42df13975352846c30338cd Set buffer "input" to hex value "4142434445464748494a4b4c4d4e4f5 05152535455565758595a6162636465666768696a6b6c6d6e6f7071727374757 67778797a30313233343536373839". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "da33def2a42df13975352846c30338cd". Note: ------------------------------------------------------- Note: Reference test case 7 Note: MD2 ("1234567890123456789012345678901234567890123456789012 Note: 34567890123456 Note: 78901234567890") = d5976f79d83d3a0dc9806c3c66f3efd8 Set buffer "input" to hex value "3132333435363738393031323334353 6373839303132333435363738393031323334353637383930313233343536373 Baldwin Informational, Expires 12/25/1999 1577 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 8393031323334353637383930313233343536373839303132333435363738393 0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d5976f79d83d3a0dc9806c3c66f3efd8". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVMD200". This is the start of test case "TVMD500". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: RFC 1321 vectors test for MD5 digest algorithm Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_MD5", "NULL_PTR". Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1578 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Initialization Set "_InfoPointer" to address of info structure for "AI_MD5" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD5" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Reference test case 1 Note: MD5 ("") = d41d8cd98f00b204e9800998ecf8427e Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d41d8cd98f00b204e9800998ecf8427e". Note: ------------------------------------------------------- Note: Reference test case 2 Note: MD5 ("a") = 0cc175b9c0f1b6a831c399e269772661 Set buffer "input" to hex value "61". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 1579 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "0cc175b9c0f1b6a831c399e269772661". Note: ------------------------------------------------------- Note: Reference test case 3 Note: MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72 Set buffer "input" to hex value "616263". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "900150983cd24fb0d6963f7d28e17f72". Note: ------------------------------------------------------- Note: Reference test case 4 Note: MD5 ("message digest") = f96b697d7cb7938d525a2f31aaf161d0 Note: nn Set buffer "input" to hex value "6d65737361676520646967657374". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f96b697d7cb7938d525a2f31aaf161d0". Note: ------------------------------------------------------- Note: Reference test case 5 Note: MD5 ("abcdefghijklmnopqrstuvwxyz") = c3fcd3d76192e4007dfb4 Note: 96cca67e13b Baldwin Informational, Expires 12/25/1999 1580 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "6162636465666768696a6b6c6d6e6f7 07172737475767778797a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c3fcd3d76192e4007dfb496cca67e13b". Note: ------------------------------------------------------- Note: Reference test case 6 Note: MD5 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz Note: 0123456789") = Note: d174ab98d277d9f5a5611c2c9f419d9f Set buffer "input" to hex value "4142434445464748494a4b4c4d4e4f5 05152535455565758595a6162636465666768696a6b6c6d6e6f7071727374757 67778797a30313233343536373839". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d174ab98d277d9f5a5611c2c9f419d9f". Note: ------------------------------------------------------- Note: Reference test case 7 Note: MD5 ("1234567890123456789012345678901234567890123456789012 Note: 34567890123456 Note: 78901234567890") = 57edf4a22be3c955ac49da2e2107b67a Baldwin Informational, Expires 12/25/1999 1581 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "3132333435363738393031323334353 6373839303132333435363738393031323334353637383930313233343536373 8393031323334353637383930313233343536373839303132333435363738393 0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "57edf4a22be3c955ac49da2e2107b67a". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVMD500". This is the start of test case "TVPKCS". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, raw RSA encryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_DECRYPT", "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Note: Test 01-1 Note: Input the value 1 to raw RSA, the result should be 1. Baldwin Informational, Expires 12/25/1999 1582 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Use an arbitrary public key, this one contains a 512-bit Note: modulus. Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "ab383940542cac9ac03740d04904ed5 10e95720251c2ad9da7ebba29aed4497953fadf016cbc69464c831bd93b59420 4990f632475a0be6f924d9da240daf849", "010001". Call B_SetKeyInfo passing "encryptKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use an arbitrary private key, this one happens to be the Note: partner Note: to the above public key. Create key object "decryptKey". Call B_CreateKeyObject passing "decryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "ab383940542cac9ac03740d04 904ed510e95720251c2ad9da7ebba29aed4497953fadf016cbc69464c831bd93 b594204990f632475a0be6f924d9da240daf849", "010001", "4ad2e7321596f0573068f50a10def656d5e8b94a0a30e96e5c53c7a72f9fd5f b589b1e5be86eae02aa152367aa209e82764cade195dee325662fb0ab1ce5a00 1", "d1eb51bd09267ee7128ceb5c3218d1600b49678f783c58c5b00170ee1ac f6ee1", "d0ce21834173f6843206a8a6ad132b65278628ef0e8cca4f20c0199 5fe6c3e69", "1a499cb7ce808a9dc73dec6f643aa565a0a4359acad4cbcd1dc 8606b00e27f21", "a793d77794ef31785501dd16afaec3d4120d6d0ab6ddad7 c25e7a66127e8cd89", "0bdb907f33c51f5b4da486da77d4b31dbcc3ae0bac9 1f3384acf10b15e5ad186". Call B_SetKeyInfo passing "decryptKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Since the key is 512 bits, the input must be 64 bytes Note: long. We want Note: the value to be 1, so we need 63 leading 0 bytes. The Note: output buffer Note: must also be 64 bytes long. Create buffer "input" of decimal value "64" bytes. Baldwin Informational, Expires 12/25/1999 1583 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "0000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000001". Create buffer "output" of decimal value "64" bytes. Note: Use the public key, encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: Use the private key, decrypt. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1584 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: Try it with blinding. Set "_Chooser" to "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Call Call B_DestroyAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1585 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVPKCS". This is the start of test case "TVRC400". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: RC4 vectors test Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RC4_ENCRYPT", "AM_RC4_DECRYPT", "NULL_PTR". Create algorithm object "encryptionAlg". Call B_CreateAlgorithmObject passing "encryptionAlg". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1586 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionAlg". Call B_CreateAlgorithmObject passing "decryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "inputData" of decimal value "100" bytes. Create buffer "cypherText" of decimal value "100" bytes. Create buffer "plainText" of decimal value "100" bytes. Create buffer "expectedResult" of decimal value "100" bytes. Create key object "rc4Key". Call B_CreateKeyObject passing "rc4Key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "key" of decimal value "8" bytes. Note: Initialize, set up expected and input data Set buffer "key" to hex value "fedcba9876543210". Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "key". Call B_SetKeyInfo passing "rc4Key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptionAlg" and "AI_RC4" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptionAlg" and "AI_RC4" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "expectedResult" to hex value "dae10fb4e886c6671003cb 322806393d". Set buffer "inputData" to hex value "0123456789abcdeffedcba98765 43210". Note: Encryption Call Call B_EncryptInit passing "encryptionAlg" and "rc4Key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1587 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionAlg" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "expectedResult" with contents of buffer "cypherText". Note: Decryption Call Call B_DecryptInit passing "decryptionAlg" and "rc4Key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionAlg" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Baldwin Informational, Expires 12/25/1999 1588 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "plainText" with contents of buffer "inputData". This is the end of test case "TVRC400". This is the start of test case "TVRSA01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, raw RSA encryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_DECRYPT", "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Note: Test 01-1 Note: Input the value 1 to raw RSA, the result should be 1. Note: Use an arbitrary public key, this one contains a 512-bit Note: modulus. Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "ab383940542cac9ac03740d04904ed5 10e95720251c2ad9da7ebba29aed4497953fadf016cbc69464c831bd93b59420 4990f632475a0be6f924d9da240daf849", "010001". Call B_SetKeyInfo passing "encryptKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use an arbitrary private key, this one happens to be the Note: partner Note: to the above public key. Create key object "decryptKey". Call B_CreateKeyObject passing "decryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1589 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "ab383940542cac9ac03740d04 904ed510e95720251c2ad9da7ebba29aed4497953fadf016cbc69464c831bd93 b594204990f632475a0be6f924d9da240daf849", "010001", "4ad2e7321596f0573068f50a10def656d5e8b94a0a30e96e5c53c7a72f9fd5f b589b1e5be86eae02aa152367aa209e82764cade195dee325662fb0ab1ce5a00 1", "d1eb51bd09267ee7128ceb5c3218d1600b49678f783c58c5b00170ee1ac f6ee1", "d0ce21834173f6843206a8a6ad132b65278628ef0e8cca4f20c0199 5fe6c3e69", "1a499cb7ce808a9dc73dec6f643aa565a0a4359acad4cbcd1dc 8606b00e27f21", "a793d77794ef31785501dd16afaec3d4120d6d0ab6ddad7 c25e7a66127e8cd89", "0bdb907f33c51f5b4da486da77d4b31dbcc3ae0bac9 1f3384acf10b15e5ad186". Call B_SetKeyInfo passing "decryptKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Since the key is 512 bits, the input must be 64 bytes Note: long. We want Note: the value to be 1, so we need 63 leading 0 bytes. The Note: output buffer Note: must also be 64 bytes long. Create buffer "input" of decimal value "64" bytes. Set buffer "input" to hex value "0000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000001". Create buffer "output" of decimal value "64" bytes. Note: Use the public key, encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of Baldwin Informational, Expires 12/25/1999 1590 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: Use the private key, decrypt. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1591 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: Try it with blinding. Set "_Chooser" to "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Call Call B_DestroyAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 1592 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-2 Note: Input the value 0 to raw RSA, the result should be 0. Note: Use an arbitrary public key, this one contains a 1024-bit Note: modulus. Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "c7a25a3b2d4673c98974b4e857ea887 9c736bdb79cae168910c1899cd567688a0c274d1fef14abf20df13fb8e662dba 5064ec909095bc9e6bbb65bd1c2afb874649a0670e5697ba35e764d190c2e56c 494d34008fbab121d22289f3aeb40edc908f08815e3ce6e574e374d79005bf19 cea8f2d17f94c3815d20ce02ac5276ee3", "010001". Call B_SetKeyInfo passing "encryptKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use an arbitrary private key, this one happens to be the Note: partner Note: to the public key above. Create key object "decryptKey". Call B_CreateKeyObject passing "decryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "c7a25a3b2d4673c98974b4e85 7ea8879c736bdb79cae168910c1899cd567688a0c274d1fef14abf20df13fb8e 662dba5064ec909095bc9e6bbb65bd1c2afb874649a0670e5697ba35e764d190 c2e56c494d34008fbab121d22289f3aeb40edc908f08815e3ce6e574e374d790 05bf19cea8f2d17f94c3815d20ce02ac5276ee3", "010001", "aa156c82d6841bca2d4e3d8366c3ef1ab1dbb5af65d1fc6932d9718129603cf 4c07e0b7b959a2b14c3443362390728d3649863374bbde43aacdb2547857368d 65ebf1fa6f2fcfc9f5387ee263099a19d9eff75b609289e44d5685d4e7fdc610 a8e0f212bfd140fee17e05bb94116d771feb784b3d26f1bddf5e8f3d11250af2 1", "f7a438cc372b3f350d69267cf5ca2e3e34a018c2f269547d8aede5033ca be78f344a174751fd390a6c162a1dc21d6baf232ec6721729f2004c4252596cf Baldwin Informational, Expires 12/25/1999 1593 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 a5d37", "ce5f513ccb465355de9481a30b392dcaaff3f889b20a69ce3ab848f 55c7b4eeda26dd945b5e4006196e3d01b3c1dcd9d2165d9b6693ecca2b0fc4d0 89c1431b5", "baf3db7d305911cab7691e894ff5669bc796e59aa6ef25bdf15 84f7ff619c122b75307e7ebd9c36a3ed72ccc72734b8c587f4389763b505b313 7107c3a6d7859", "7913af23cdd71ab97c77007fd9ebd813dc9b74abc48b1b7 c65330d8af69159c34dd2c8f07f409f80a1f852764814ec374e0ae56a81e0d84 a732ff33a23e82d29", "3548dd2fdadad2e733bb32efd274e803b11924a497f c3d596db3f74b8a8079ddf553746ad396c770e938d080a676224f71fa43b33ba 15e5ee8ec5dd1a0760f30". Call B_SetKeyInfo passing "decryptKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Since the key is 1024 bits, the input must be 128 bytes Note: long. We want Note: the value to be 0, so we need 128 0 bytes. The output Note: buffer must also Note: be 128 bytes long. Create buffer "input" of decimal value "128" bytes. Set buffer "input" to hex value "0000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000". Create buffer "output" of decimal value "128" bytes. Note: Use the public key, encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 1594 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: Use the private key, decrypt. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1595 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: Try it with blinding. Set "_Chooser" to "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Call Call B_DestroyAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 1596 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-3 Note: Using raw RSA, encrypt (modulus - 1). If the exponent is Note: odd, the Note: result should be (modulus - 1). Create key object "decryptKey". Call B_CreateKeyObject passing "decryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use an arbitrary public key, this one is 2005 bits. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "131d1695cdbdcd673ff66789a23f6ae b5ab7072164295954f8c297e4df1a4635077dd62bc24afac73f1143689233da2 af8b561e5d1b23d0a4dc1cbf83b45c4a063280aecdf1e35778361bc571cb03cb 92ff50d4ad84b23d3b67054b51166f53b5f72d6d4955ee8e8ea0d558ab5ade56 971649ae1cdb70d4abdcdffca3f19d738b2b6ecf3e37d375d575aa58b2b244bc c4aab6478d99ce1d83d8627ec790793622b3e8831c02287a5f078c5f2443eded a64a016b2c534fad6ad388c4beb66da3c806de105415e49dd3c9c4c0ba96c47c 54c790bb2d4c1244e68f01fe16daf2a82c9e3165e9737aee9c7e1fc5a36fd657 a2a198d80f6eb57e0ff4f41", "010001". Call B_SetKeyInfo passing "encryptKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use an arbitrary private key, this one happens to be the Note: partner Note: of the public key above. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "131d1695cdbdcd673ff66789a 23f6aeb5ab7072164295954f8c297e4df1a4635077dd62bc24afac73f1143689 233da2af8b561e5d1b23d0a4dc1cbf83b45c4a063280aecdf1e35778361bc571 cb03cb92ff50d4ad84b23d3b67054b51166f53b5f72d6d4955ee8e8ea0d558ab 5ade56971649ae1cdb70d4abdcdffca3f19d738b2b6ecf3e37d375d575aa58b2 b244bcc4aab6478d99ce1d83d8627ec790793622b3e8831c02287a5f078c5f24 Baldwin Informational, Expires 12/25/1999 1597 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 43ededa64a016b2c534fad6ad388c4beb66da3c806de105415e49dd3c9c4c0ba 96c47c54c790bb2d4c1244e68f01fe16daf2a82c9e3165e9737aee9c7e1fc5a3 6fd657a2a198d80f6eb57e0ff4f41", "010001", "03182879e42f203be0fd1 15214f45368faecbab8cb306e87f525fbd54fd13f2082affaa666f42099753a6 4415fba094dffa9cdc999235402810828ef6d1924761ad776bd5679db8a17b91 0f6c16c3ec8745d25e3c214981e4460f735c1357bea3acfaabc0bdaabb6597e0 3254bb8757596a804f31d8ccf1814966f1cdd0ce08202a588793bb9240836c08 e72e2071ed3d7760fa138597b9d4167d41723fea2b78eae9c80a666be105c498 ca1ad773b216a1a37fb19e0e7ee62d4a167fd02176e6fd8ea48e7da2eb97155a 6fec2c4a9be536d26c20fc3a7172552e4205375ca2df9ae8940e1045a2859d7b 383e68008db7d4da91c58bd6a63988d61", "0622e956f5c274b86e8af2de2b0 a64108cc1abf1212d72e54c84c67b9b1caa30cd1318760ab3bd615b4337f37d4 b475bfcda5366c87bdb4ff7aa5d72aa47b1778cea8e3db0f28e158ad0e13c57d 18a891b633f1b49e1a8373530c70f1af6a62dc979041d51def46a1fc6a99e6a3 f2b7f0c444546bf70214513427f741b05", "031d6414af17520b32f7db2e6b1 3c248eb009eeb5320cb5f22f4873cb4555b784c18f7659fa77f59d298a89c78c 75d9924cee61f950eac5e514c0d115e57fcc9fcab9406d1ba103cb0856532d05 148935325fbf52a7a99aed450b14693d5d0a9494d9c1d2312a852e58c29186e9 5f5addb9f74eb9fd5cf3800a3cf35300d", "0117eb7861667b21fa20ac52465 d1da38d515d7024375307e4f0abe58ea836f3673785de52dde05b1ec6058c4fc 1403ff5f87970113d70c0f922d4700043b22dd9605a6447c990e3e9ce7ab423f 9e4b3b5bba39d1b3728a05dcc094c79c385ad16ff876a2a128e7ef29695d6f29 bbb06728b1fc5118bcb81e182b1ef6079", "028eabefab7d9b17a4c6088748d 4952be6fdc07c76e8b2f0ae3353a14c71d442a53fce46fa58bbdf545f8ff7bfd 5f78bd7c3a2fe8513e20321fe2db077e407a112b91034b5166d64568d7ef3c44 32832050f6798f742675139f1f24a7ef00a7c22b9fc9593892af7bc8d61e4344 f1cc19c5283dd3c827fba7c1401f8aa35", "023bdb8b62e43aa8abe7a5dbbde d93dd0b30091f7730813efb95335c7687252a82d22fe209e3b913ecd50586e54 903833badd203be02fef7f8c34b815aa4d81cc1a2967b191726d03d4c78512f2 d4f3e791a1cc64f5b22174aa743e7e8bc5d4c8c25c04584c96305975b0f9fee5 c76e32a1c08e00ff9767a242b5217fcb8". Call B_SetKeyInfo passing "decryptKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Since the key is 2005 bits, the input and output buffers Note: must be Note: 251 bytes. Create buffer "input" of decimal value "251" bytes. Create buffer "output" of decimal value "251" bytes. Set buffer "input" to hex value "131d1695cdbdcd673ff66789a23f6ae b5ab7072164295954f8c297e4df1a4635077dd62bc24afac73f1143689233da2 af8b561e5d1b23d0a4dc1cbf83b45c4a063280aecdf1e35778361bc571cb03cb 92ff50d4ad84b23d3b67054b51166f53b5f72d6d4955ee8e8ea0d558ab5ade56 971649ae1cdb70d4abdcdffca3f19d738b2b6ecf3e37d375d575aa58b2b244bc c4aab6478d99ce1d83d8627ec790793622b3e8831c02287a5f078c5f2443eded a64a016b2c534fad6ad388c4beb66da3c806de105415e49dd3c9c4c0ba96c47c 54c790bb2d4c1244e68f01fe16daf2a82c9e3165e9737aee9c7e1fc5a36fd657 a2a198d80f6eb57e0ff4f40". Baldwin Informational, Expires 12/25/1999 1598 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Encrypt using the public key. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "input" with contents of buffer "output". Note: Decrypt using the private key. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1599 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "input" with contents of buffer "output". Note: Try it with blinding. Set "_Chooser" to "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Call Call B_DestroyAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1600 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVRSA01". This is the start of test case "TVRSA02". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, raw RSA encryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_DECRYPT", "NULL_PTR". Note: Test 02-1 Note: The public exponent is 3, so when processing (modulus - Note: 2), the result Note: should be (modulus - 8) Note: Use the following 1205-bit public key. Baldwin Informational, Expires 12/25/1999 1601 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "1d78c9b879941eca4fbbbc53f73e1f3 02a66b928fb2a1e2372f6ae483af192fdf10645117cea909dc5f56b284c38420 f8585c10a657dbf4428dfc0f99da89264993a0b48ded9278c3bb3592cbfd83a4 12e99661ef88632539157d011d192b62610750de7b94749355fb68e7613d63b7 7e7d5f3fe31f39f193f1beb2b766b1a846176e41511d97fe7801ffb5a3b71d0a 9a0b86ab37eb84f", "03". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the input to be (modulus - 2) Create buffer "input" of decimal value "151" bytes. Set buffer "input" to hex value "1d78c9b879941eca4fbbbc53f73e1f3 02a66b928fb2a1e2372f6ae483af192fdf10645117cea909dc5f56b284c38420 f8585c10a657dbf4428dfc0f99da89264993a0b48ded9278c3bb3592cbfd83a4 12e99661ef88632539157d011d192b62610750de7b94749355fb68e7613d63b7 7e7d5f3fe31f39f193f1beb2b766b1a846176e41511d97fe7801ffb5a3b71d0a 9a0b86ab37eb84d". Note: The output buffer must be the same size. Create buffer "output" of decimal value "151" bytes. Note: Use the public key, encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and Baldwin Informational, Expires 12/25/1999 1602 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "1d78c9b879941eca4fbbbc53f73e1f302a66b928fb2a1e2372f6ae483af192f df10645117cea909dc5f56b284c38420f8585c10a657dbf4428dfc0f99da8926 4993a0b48ded9278c3bb3592cbfd83a412e99661ef88632539157d011d192b62 610750de7b94749355fb68e7613d63b77e7d5f3fe31f39f193f1beb2b766b1a8 46176e41511d97fe7801ffb5a3b71d0a9a0b86ab37eb847". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-2 Note: The public exponent is 3, so when processing (modulus - Note: 3), the result Note: should be (modulus - 27) Note: Use the following 1457-bit public key. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "17da2b694769d3cdfb772603a91564b c9f6749305008ac0fa351dd4b0e45fc2905b502fba093a74c0e273a420ce143e c3b440157edb90ccd4ef6329ca17767235a0782ec4abb1aa0143b26dab74db3f 3dd1c8ab938bfdae9686ad7eb78863785b221db5fbe356da5dee4f1dfdcfdbce d12260b3aceef162f18f0b104151f3b6db78860ee27fc76b46f3920a9cde537f aeb253fff580cb4ccc3a5788521ac8b5a11fa5a511c3b2aa73837888a7f140c6 733cc4acb", "03". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 1603 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the input to be (modulus - 3) Create buffer "input" of decimal value "180" bytes. Set buffer "input" to hex value "17da2b694769d3cdfb772603a91564b c9f6749305008ac0fa351dd4b0e45fc2905b502fba093a74c0e273a420ce143e c3b440157edb90ccd4ef6329ca17767235a0782ec4abb1aa0143b26dab74db3f 3dd1c8ab938bfdae9686ad7eb78863785b221db5fbe356da5dee4f1dfdcfdbce d12260b3aceef162f18f0b104151f3b6db78860ee27fc76b46f3920a9cde537f aeb253fff580cb4ccc3a5788521ac8b5a11fa5a511c3b2aa73837888a7f140c6 733cc4ac8". Note: The output buffer must be the same size. Create buffer "output" of decimal value "180" bytes. Note: Use the public key, decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1604 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "17da2b694769d3cdfb772603a91564bc9f6749305008ac0fa351dd4b0e45fc2 905b502fba093a74c0e273a420ce143ec3b440157edb90ccd4ef6329ca177672 35a0782ec4abb1aa0143b26dab74db3f3dd1c8ab938bfdae9686ad7eb7886378 5b221db5fbe356da5dee4f1dfdcfdbced12260b3aceef162f18f0b104151f3b6 db78860ee27fc76b46f3920a9cde537faeb253fff580cb4ccc3a5788521ac8b5 a11fa5a511c3b2aa73837888a7f140c6733cc4ab0". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-3 Note: The public exponent is 3, so when processing (modulus - Note: 4), the result Note: should be (modulus - 64) Note: Use the following 1960-bit public key. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "e2d3f75db3efd064a3c8ab7b139c673 71db1a87ee4d4026077e05659c63ff9e29bbfea33a3ca415af781ccf71264df6 cc0687e5e8aafe7bb2a527710cdc93949b964d84309f43e130cce12d6a2da65a 35cf31630b96f45c20948faa6ecb9377c98d0d517cce44da6cb63252405b6d4e 4ada297156aa367798bb6b560c7c334e67948c3fed9fc39f38c0c620870b112d 8e5c69238f837b3e3bb7ddeb32ce202e75207bb2880167d9aecbccc4abdb58d0 bb9df9c0ae44a7eb9476b2ec25ce0e91cbef9a20aaa9291031737e8ba4fa6bb4 48eaab60c2eddfc7b0373f0c19eebf80ec7c7ccf46223b91ab121b75a296e3c7 27baa504817", "03". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the input to be (modulus - 4) Create buffer "input" of decimal value "245" bytes. Set buffer "input" to hex value "e2d3f75db3efd064a3c8ab7b139c673 71db1a87ee4d4026077e05659c63ff9e29bbfea33a3ca415af781ccf71264df6 cc0687e5e8aafe7bb2a527710cdc93949b964d84309f43e130cce12d6a2da65a Baldwin Informational, Expires 12/25/1999 1605 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 35cf31630b96f45c20948faa6ecb9377c98d0d517cce44da6cb63252405b6d4e 4ada297156aa367798bb6b560c7c334e67948c3fed9fc39f38c0c620870b112d 8e5c69238f837b3e3bb7ddeb32ce202e75207bb2880167d9aecbccc4abdb58d0 bb9df9c0ae44a7eb9476b2ec25ce0e91cbef9a20aaa9291031737e8ba4fa6bb4 48eaab60c2eddfc7b0373f0c19eebf80ec7c7ccf46223b91ab121b75a296e3c7 27baa504813". Note: The output buffer must be the same size. Create buffer "output" of decimal value "245" bytes. Note: Use the public key, encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "e2d3f75db3efd064a3c8ab7b139c67371db1a87ee4d4026077e05659c63ff9e 29bbfea33a3ca415af781ccf71264df6cc0687e5e8aafe7bb2a527710cdc9394 9b964d84309f43e130cce12d6a2da65a35cf31630b96f45c20948faa6ecb9377 c98d0d517cce44da6cb63252405b6d4e4ada297156aa367798bb6b560c7c334e Baldwin Informational, Expires 12/25/1999 1606 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 67948c3fed9fc39f38c0c620870b112d8e5c69238f837b3e3bb7ddeb32ce202e 75207bb2880167d9aecbccc4abdb58d0bb9df9c0ae44a7eb9476b2ec25ce0e91 cbef9a20aaa9291031737e8ba4fa6bb448eaab60c2eddfc7b0373f0c19eebf80 ec7c7ccf46223b91ab121b75a296e3c727baa5047d7". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVRSA02". This is the start of test case "TVRSA04". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, raw RSA encryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_DECRYPT", "NULL_PTR". Set "_Chooser" to "AM_RSA_CRT_ENCRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Set "_Chooser" to "AM_RSA_CRT_ENCRYPT_BLIND", "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Note: Test 04-1 Note: Input the value given to raw RSA, check the result Note: against the result Note: produced by BSAFE 2.1.2 Note: Use an the following 2048-bit keypair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "c0cc3539068e3cbc4e99835fc09a094 f71d0706707b81ffc5d6e0ba5f32d87677f5d06bc32fd9a55c3b9edf31a03e76 aa7b3b3f524765ebb90ec4b66f4f6cda9df6222f5f6698504e969cfe9d3c89e1 4dc1dbdd1f93258898324e2cc9f87338d1b7f171e05a55a7ed0b458708001bfb 93935794692e5e4435255c5b404185da48bd6d3a799e53629a335e848c1bb850 Baldwin Informational, Expires 12/25/1999 1607 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 90f72cf3429e260d6f8365501f06d73a7a39c19bff86976ca3bfd1592daa231c 20875a4763cf55c80826c2d6dd36c838fe4cfe9ada6d7caa2197cace3e8a732c 3c29e82841c3223e2b289edb61a1c747a62c0b110e576551c226d72ec79e49f1 8c25498bef1207da877c71327ab1c43e3", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "c0cc3539068e3cbc4e99835fc 09a094f71d0706707b81ffc5d6e0ba5f32d87677f5d06bc32fd9a55c3b9edf31 a03e76aa7b3b3f524765ebb90ec4b66f4f6cda9df6222f5f6698504e969cfe9d 3c89e14dc1dbdd1f93258898324e2cc9f87338d1b7f171e05a55a7ed0b458708 001bfb93935794692e5e4435255c5b404185da48bd6d3a799e53629a335e848c 1bb85090f72cf3429e260d6f8365501f06d73a7a39c19bff86976ca3bfd1592d aa231c20875a4763cf55c80826c2d6dd36c838fe4cfe9ada6d7caa2197cace3e 8a732c3c29e82841c3223e2b289edb61a1c747a62c0b110e576551c226d72ec7 9e49f18c25498bef1207da877c71327ab1c43e3", "010001", "604da0c83b5e11387e8a6ff5045fed06a1f35c321ac8fe3130fa27175dc1004 1d27cc5407cb7f0bfa664d956f547bdf0a8943aefd8a6c7eb2918df112e8b996 fa10584311844dd0cf70ac3b028f9acfcfe765cbae59f205a90077cc2796d2f7 2eca92f02f00f08850ffb05b22c3eb365f20da3e67cba18ab0815900bbb7ff04 5c1e6d1c1807448da932c078553a4a3be178da5870c6c080c99f1b4c9ebbd45b e327aea071ac600621631d58ae790ba081a97272ff952e2a596683c08e3c7109 9216873344472fda426ddc1f89cde49fde22442271a77c2facf8cdb66cb5a660 54e0cdc7d9c6ff61470c6b82ab63d2d8e238ced4dea060f2496452828ea3e7f0 1", "f6d4f01e0b05f25b000df4fc72350859d4b342f04a46e0fb8c5b39c1368 8583d174b72f88da15ea8b081485c2fd8b57ebd0ce980bd49d56df1f940c719a 671c881dd21e0fe362c4189df13bbd188d1596c0e56f2edacba92ab4dbee5afc 28df519aec273943ea316f686b56d7fa1d9f53d20ed4389326461514a3efd348 aea1f", "c7f5791e4fa3e2588d95594316e46563f155b7a5541274a75ada3d9 20d2b8a0f450c9cc0df8b128ff9ef92ae8e8b297cf09382190787c631660cae3 4ddaf234b5feedd98ac5406cc618e43a5f8e9065b3a84e0279ae2c5c1feaab48 a8b5fc53d8eff14d1ec835fe7d6db28b6eb6f48adc58da042eb26f528d414bd4 8994b35bd", "9c2d519d00c68b794ec885f9715de2e1cbf67ce5436a2392a65 5566ecd4d69df85acc49b462a1395d2d08a736206d197d690a3f24452c24ba5a e5b715ee674da346931b585c3cb2ed0c8a858cf94ad39d2682455e352c65e652 b751d299f8568cf0e47950ff8ae02aa8bc3a1fbfef1c4fd1fa760731fc269dd2 088487805696b", "61e1beed608cd7d30353b5834ae478e16894ce36072695a 60aaa44738730e5ff3d8cc3fb0232a0de8bb983b32121ec2835d7ef5a733e3a7 d99f7e11b0ddd9ac85de89edf0a9483536ef9e6118bfbfdd99096d4e76e414e0 efdabf07ed565073770155bcabb1d40484bfbb23d8098541a845724b93d452fc 351b5e9466d8bcc7d", "08c5cbb887a95adf9fef92abf5663fbbe2ab71944e4 91693dca6e3711e38b5175cb020951ca746c6568da44f003e568556987424277 18ec063a914e74f40e176e58af7ec384548417cb3834ae243527fb9c0e27c970 267d565f66762d095278c9fb160747ca2fc5b08de221b4fe5826cc93d1a6758c Baldwin Informational, Expires 12/25/1999 1608 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 7b221ce9742ebafc31687". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt and decrypt the following data. Create buffer "input" of decimal value "256" bytes. Set buffer "input" to hex value "1e0b05f25b000df4fc72350859d4b34 2f04a46e0fb8c5b39c13688583d174b72f88da15ea8b081485c2fd8b57ebd0ce 980bd49d56df1f940c719a671c881dd21e0fe362c4189df13bbd188d1596c0e5 6f2edacba92ab4dbee5afc28df519aec273943ea316f686b56d7fa1d9f53d20e d4389326461514a3efd348aea1fc7f52d791e4fa3e2588d95594316e46563f15 5b7a5541274a75ada3d920d2b8a0f450c9cc0df8b128ff9ef92ae8e8b297cf09 382190787c631660cae34ddaf234b5feedd98ac5406cc618e43a5f8e9065b3a8 4e0279ae2c5c1feaab48a8b5fc53d8eff14d1ec835fe7d6db28b6eb6f48adc58 da042eb26f528d414bd48994b35bd5002". Create buffer "output" of decimal value "256" bytes. Note: Public key encryption. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1609 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "97aba15deedbd8c57fbb704fea3f386173d60b529e963917909f27e1d633136 dfbae851e12f32a05fe745c323eb5b63fb6a2008f9f7228c9e763ebeb645a160 fcb4c40a8418b2a8720c5d2aa9ec9bf70f010369f641aebb0a83edafb1cf60c2 2555de43d4ad8daaab0b60b897dacdc7e981131e84fecb451557966d09992ece e12c0f16a30f2b4def1f3d57158999728e94a5387bf075e54dcdd74a5f4f60e1 dae9cc7690435b57f458b0cef10367d228cd73ac5fd1d9513280adb6aecfda6f 4d76271fbca02565476d563f7bf046ee106d3dd5d8f03f458a34d986d718be44 8e315d4bc4a32f5acfa676f814dff48be0ad21a9d52b705d60575589fcf76460 0". Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Private key encryption. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1610 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "2b6ff7d190637708ffb64a11d3247c5bd820c017cc2f60404f0d45bf9c2c01b 527150f446d6a372a68f9a637692f3c56cab658acd8d795cb9f967742ef882bd aedc65980bc1327aa42d2e9c5191260faaa13f057aa9fcac8bc808ad9580bb1f 78bc4f449de21769d774776cce52eb3757a3fb0494caacd18329a777aecdb235 77b49a2eb3487d00b4be7881bceb86ca57eeddf0ad4f770e9a838222d659543d 8dda9b4db601f598f4ee4bab64b73e99c6403f77b09e4420660db808c8572e66 44763eeac268e318db18a61ac7faba4b6b3fc129133b60cb59a13fde8379934f de70c09bbd17573abac2e94169e8e60ec15af67a068c36e9d0c3590be436f179 e". Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try it with blinding Set "_Chooser" to "AM_RSA_CRT_ENCRYPT_BLIND", "NULL_PTR". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1611 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "2b6ff7d190637708ffb64a11d3247c5bd820c017cc2f60404f0d45bf9c2c01b 527150f446d6a372a68f9a637692f3c56cab658acd8d795cb9f967742ef882bd aedc65980bc1327aa42d2e9c5191260faaa13f057aa9fcac8bc808ad9580bb1f 78bc4f449de21769d774776cce52eb3757a3fb0494caacd18329a777aecdb235 77b49a2eb3487d00b4be7881bceb86ca57eeddf0ad4f770e9a838222d659543d 8dda9b4db601f598f4ee4bab64b73e99c6403f77b09e4420660db808c8572e66 44763eeac268e318db18a61ac7faba4b6b3fc129133b60cb59a13fde8379934f de70c09bbd17573abac2e94169e8e60ec15af67a068c36e9d0c3590be436f179 e". Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_DECRYPT", "AM_RSA_CRT_ENCRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Note: Public key decryption. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1612 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "output". Check equality of buffer "output" with hex value "97aba15deedbd8c57fbb704fea3f386173d60b529e963917909f27e1d633136 dfbae851e12f32a05fe745c323eb5b63fb6a2008f9f7228c9e763ebeb645a160 fcb4c40a8418b2a8720c5d2aa9ec9bf70f010369f641aebb0a83edafb1cf60c2 2555de43d4ad8daaab0b60b897dacdc7e981131e84fecb451557966d09992ece e12c0f16a30f2b4def1f3d57158999728e94a5387bf075e54dcdd74a5f4f60e1 dae9cc7690435b57f458b0cef10367d228cd73ac5fd1d9513280adb6aecfda6f 4d76271fbca02565476d563f7bf046ee106d3dd5d8f03f458a34d986d718be44 8e315d4bc4a32f5acfa676f814dff48be0ad21a9d52b705d60575589fcf76460 0". Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Private key decryption. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Baldwin Informational, Expires 12/25/1999 1613 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "output" with hex value "2b6ff7d190637708ffb64a11d3247c5bd820c017cc2f60404f0d45bf9c2c01b 527150f446d6a372a68f9a637692f3c56cab658acd8d795cb9f967742ef882bd aedc65980bc1327aa42d2e9c5191260faaa13f057aa9fcac8bc808ad9580bb1f 78bc4f449de21769d774776cce52eb3757a3fb0494caacd18329a777aecdb235 77b49a2eb3487d00b4be7881bceb86ca57eeddf0ad4f770e9a838222d659543d 8dda9b4db601f598f4ee4bab64b73e99c6403f77b09e4420660db808c8572e66 44763eeac268e318db18a61ac7faba4b6b3fc129133b60cb59a13fde8379934f de70c09bbd17573abac2e94169e8e60ec15af67a068c36e9d0c3590be436f179 e". Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try it with blinding. Set "_Chooser" to "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Baldwin Informational, Expires 12/25/1999 1614 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "output" with hex value "2b6ff7d190637708ffb64a11d3247c5bd820c017cc2f60404f0d45bf9c2c01b 527150f446d6a372a68f9a637692f3c56cab658acd8d795cb9f967742ef882bd aedc65980bc1327aa42d2e9c5191260faaa13f057aa9fcac8bc808ad9580bb1f 78bc4f449de21769d774776cce52eb3757a3fb0494caacd18329a777aecdb235 77b49a2eb3487d00b4be7881bceb86ca57eeddf0ad4f770e9a838222d659543d 8dda9b4db601f598f4ee4bab64b73e99c6403f77b09e4420660db808c8572e66 44763eeac268e318db18a61ac7faba4b6b3fc129133b60cb59a13fde8379934f de70c09bbd17573abac2e94169e8e60ec15af67a068c36e9d0c3590be436f179 e". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVRSA04". This is the start of test case "TVRSA05". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, raw RSA encryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_DECRYPT", "NULL_PTR". Set "_Chooser" to "AM_RSA_CRT_ENCRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Set "_Chooser" to "AM_RSA_CRT_ENCRYPT_BLIND", "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Note: Test 05-1 Note: Input the value given to raw RSA, check the result Note: against the result Note: produced by BSAFE 2.1.2 Note: Use an the following 900-bit keypair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 1615 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "KI_RSAPublic" initialized from "0c8812d50872f6007f6fecb9b22b1dd edc866e5d136f3f0c01b963b784bc83f740be47a84f30938d65f9e71262ed39c b8dd4a63d707bc3346af56e618cc9e155c0f604e45f80a4abfdad604f7e982d2 ba60b9134b67e77ed95ab64412d6608841b30d15df14e5a62be8fd8bf17101bb 93f", "03". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "0c8812d50872f6007f6fecb9b 22b1ddedc866e5d136f3f0c01b963b784bc83f740be47a84f30938d65f9e7126 2ed39cb8dd4a63d707bc3346af56e618cc9e155c0f604e45f80a4abfdad604f7 e982d2ba60b9134b67e77ed95ab64412d6608841b30d15df14e5a62be8fd8bf1 7101bb93f", "03", "085ab738b04ca40054f5487bcc1cbe9493044993624a2 a080126427a587dad4f807eda7034cb0d08eea69a0c41f37bdd09386ed3a0528 222ed3a30fea4a2b247c38d73cad06ab7e65f5e0d337f493ec29d611c8a5ec9b ba8f16c106d59c96b5213a71797abb12c7a216196f1ed128c8cab", "03eccd819be7e894d2cf80047982960a1e3a9c16fbb1dbd4aaece9b1a72a63c e27ddbce86ed4e456f3fb4ddf9af987238ef08207e5b785c681", "03315761f9eded5548d2572fad5dfac85065b06b43f873330f0cfcb381257aa 203ab8eb4b7e3033209bae01ad4cb1087fd8cf44c4dbcc31fbf", "029dde5667eff06337350002fbac6406bed1bd64a7cbe7e31c9df1211a1c428 96fe9289af48ded8f4d5233ea675104c25f4b015a992503d9ab", "0220e4ebfbf3f38e308c3a1fc8e951dae043caf22d504cccb4b353225618fc6 c02725f23254202215bd1eabc8ddcb5affe5df832de7dd76a7f", "03c43240c52fbead71422d46f3cdc021e1e070acac2622dc5afdd5ea3e4d9a7 7cf2523aff6207ff6089eecff206c0cb75009c0695e90d84b39". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt and decrypt the following data. Create buffer "input" of decimal value "113" bytes. Set buffer "input" to hex value "01604f7e982d2ba60b9134b67e77ed9 5ab64412d6608841b30d15df14e5a62be06bed1bd64a7cbe7e31c9df1211a1c4 2896fe9289af48ded8f4d5233ea675104e86ed4e456f3fb4ddf9af987238ef08 207e5b785c68103315761f9eded55487d6a7f03c43240c52fbead71422d46f3c d14". Create buffer "output" of decimal value "113" bytes. Note: Public key encryption. Baldwin Informational, Expires 12/25/1999 1616 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "06aa76b28b6132c6da9700c88090c52df9fe440ef777ffaed1531211fb43f70 287a3bb078fc2525908cb992b1fd93dae426a482d1b97b136063e3e1a3e20c62 5e0a19b8f400e2512b72bbbaebaaa6c114b3418935c4be7612735e52cf242edc b19ae49c7c886741bf5f581ab4fa2fa1854". Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Private key encryption. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 1617 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "048ad5451a18eff7a81da9b976507268d8c7cbb2890447aee3b079c6371fde5 ea0769ccbbd9e63b7092185244462135c94028a611253fe30cdfacfd77d45423 4feca918188c7e8dbd3af7639bbdf3dbd17526bb510754e151262775c7758047 18071b7ddf56bf040dfa0cd88b52841e9d1". Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try it with blinding. Set "_Chooser" to "AM_RSA_CRT_ENCRYPT_BLIND", "NULL_PTR". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1618 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "048ad5451a18eff7a81da9b976507268d8c7cbb2890447aee3b079c6371fde5 ea0769ccbbd9e63b7092185244462135c94028a611253fe30cdfacfd77d45423 4feca918188c7e8dbd3af7639bbdf3dbd17526bb510754e151262775c7758047 18071b7ddf56bf040dfa0cd88b52841e9d1". Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_DECRYPT", "AM_RSA_CRT_ENCRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Note: Public key decryption. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and Baldwin Informational, Expires 12/25/1999 1619 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "06aa76b28b6132c6da9700c88090c52df9fe440ef777ffaed1531211fb43f70 287a3bb078fc2525908cb992b1fd93dae426a482d1b97b136063e3e1a3e20c62 5e0a19b8f400e2512b72bbbaebaaa6c114b3418935c4be7612735e52cf242edc b19ae49c7c886741bf5f581ab4fa2fa1854". Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Private key decryption. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1620 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "048ad5451a18eff7a81da9b976507268d8c7cbb2890447aee3b079c6371fde5 ea0769ccbbd9e63b7092185244462135c94028a611253fe30cdfacfd77d45423 4feca918188c7e8dbd3af7639bbdf3dbd17526bb510754e151262775c7758047 18071b7ddf56bf040dfa0cd88b52841e9d1". Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try it with blinding. Set "_Chooser" to "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1621 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "048ad5451a18eff7a81da9b976507268d8c7cbb2890447aee3b079c6371fde5 ea0769ccbbd9e63b7092185244462135c94028a611253fe30cdfacfd77d45423 4feca918188c7e8dbd3af7639bbdf3dbd17526bb510754e151262775c7758047 18071b7ddf56bf040dfa0cd88b52841e9d1". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVRSA05". This is the start of test case "TVSET01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, RSA SET OAEP Note: Tests are performed with a 1024 bit modulus. Note: Test Cases: Note: - Encrypt a block of zeros with private key. Note: - Decrypt the preceeding result. Note: - Encrypt a block of zeros with public key. Note: - Decrypt the preceeding result. Note: - Encrypt a block of all different bytes with private Note: key. Note: - Decrypt the preceeding result. Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_DECRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_ENCRYPT", "NULL_PTR". Set "_Chooser" to "AM_MD2", "AM_MD5", "AM_SHA", "NULL_PTR". Note: Create an arbitrary public/private keypair. Note: This one contains a 1024-bit modulus. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Baldwin Informational, Expires 12/25/1999 1622 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "c7a25a3b2d4673c98974b4e857ea887 9c736bdb79cae168910c1899cd567688a0c274d1fef14abf20df13fb8e662dba 5064ec909095bc9e6bbb65bd1c2afb874649a0670e5697ba35e764d190c2e56c 494d34008fbab121d22289f3aeb40edc908f08815e3ce6e574e374d79005bf19 cea8f2d17f94c3815d20ce02ac5276ee3", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Fetch the BER encoded form to make test vectors Note: for other vendors. Create buffer "publicKeyBER" of decimal value "1000" bytes. Set "_InfoPointer" to address of info structure for "KI_RSAPublicBER". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublicBER". Load buffer "publicKeyBER" from info structure for "KI_RSAPublicBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "publicKeyBER". Check equality of buffer "publicKeyBER" with hex value "30819f300d06092a864886f70d010101050003818d0030818902818100c7a25 a3b2d4673c98974b4e857ea8879c736bdb79cae168910c1899cd567688a0c274 d1fef14abf20df13fb8e662dba5064ec909095bc9e6bbb65bd1c2afb874649a0 670e5697ba35e764d190c2e56c494d34008fbab121d22289f3aeb40edc908f08 815e3ce6e574e374d79005bf19cea8f2d17f94c3815d20ce02ac5276ee302030 10001". Note: Matching private key. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "c7a25a3b2d4673c98974b4e85 7ea8879c736bdb79cae168910c1899cd567688a0c274d1fef14abf20df13fb8e 662dba5064ec909095bc9e6bbb65bd1c2afb874649a0670e5697ba35e764d190 c2e56c494d34008fbab121d22289f3aeb40edc908f08815e3ce6e574e374d790 05bf19cea8f2d17f94c3815d20ce02ac5276ee3", "010001", "aa156c82d6841bca2d4e3d8366c3ef1ab1dbb5af65d1fc6932d9718129603cf 4c07e0b7b959a2b14c3443362390728d3649863374bbde43aacdb2547857368d 65ebf1fa6f2fcfc9f5387ee263099a19d9eff75b609289e44d5685d4e7fdc610 Baldwin Informational, Expires 12/25/1999 1623 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 a8e0f212bfd140fee17e05bb94116d771feb784b3d26f1bddf5e8f3d11250af2 1", "f7a438cc372b3f350d69267cf5ca2e3e34a018c2f269547d8aede5033ca be78f344a174751fd390a6c162a1dc21d6baf232ec6721729f2004c4252596cf a5d37", "ce5f513ccb465355de9481a30b392dcaaff3f889b20a69ce3ab848f 55c7b4eeda26dd945b5e4006196e3d01b3c1dcd9d2165d9b6693ecca2b0fc4d0 89c1431b5", "baf3db7d305911cab7691e894ff5669bc796e59aa6ef25bdf15 84f7ff619c122b75307e7ebd9c36a3ed72ccc72734b8c587f4389763b505b313 7107c3a6d7859", "7913af23cdd71ab97c77007fd9ebd813dc9b74abc48b1b7 c65330d8af69159c34dd2c8f07f409f80a1f852764814ec374e0ae56a81e0d84 a732ff33a23e82d29", "3548dd2fdadad2e733bb32efd274e803b11924a497f c3d596db3f74b8a8079ddf553746ad396c770e938d080a676224f71fa43b33ba 15e5ee8ec5dd1a0760f30". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Fetch the BER encoded form to make test vectors Note: for other vendors. Create buffer "privateKeyBER" of decimal value "1000" bytes. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivateBER". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_PKCS_RSAPrivateBER". Load buffer "privateKeyBER" from info structure for "KI_PKCS_RSAPrivateBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "privateKeyBER". Check equality of buffer "privateKeyBER" with hex value "30820277020100300d06092a864886f70d0101010500048202613082025d020 10002818100c7a25a3b2d4673c98974b4e857ea8879c736bdb79cae168910c18 99cd567688a0c274d1fef14abf20df13fb8e662dba5064ec909095bc9e6bbb65 bd1c2afb874649a0670e5697ba35e764d190c2e56c494d34008fbab121d22289 f3aeb40edc908f08815e3ce6e574e374d79005bf19cea8f2d17f94c3815d20ce 02ac5276ee3020301000102818100aa156c82d6841bca2d4e3d8366c3ef1ab1d bb5af65d1fc6932d9718129603cf4c07e0b7b959a2b14c3443362390728d3649 863374bbde43aacdb2547857368d65ebf1fa6f2fcfc9f5387ee263099a19d9ef f75b609289e44d5685d4e7fdc610a8e0f212bfd140fee17e05bb94116d771feb 784b3d26f1bddf5e8f3d11250af21024100f7a438cc372b3f350d69267cf5ca2 e3e34a018c2f269547d8aede5033cabe78f344a174751fd390a6c162a1dc21d6 baf232ec6721729f2004c4252596cfa5d37024100ce5f513ccb465355de9481a 30b392dcaaff3f889b20a69ce3ab848f55c7b4eeda26dd945b5e4006196e3d01 b3c1dcd9d2165d9b6693ecca2b0fc4d089c1431b5024100baf3db7d305911cab 7691e894ff5669bc796e59aa6ef25bdf1584f7ff619c122b75307e7ebd9c36a3 ed72ccc72734b8c587f4389763b505b3137107c3a6d785902407913af23cdd71 ab97c77007fd9ebd813dc9b74abc48b1b7c65330d8af69159c34dd2c8f07f409 f80a1f852764814ec374e0ae56a81e0d84a732ff33a23e82d2902403548dd2fd adad2e733bb32efd274e803b11924a497fc3d596db3f74b8a8079ddf553746ad 396c770e938d080a676224f71fa43b33ba15e5ee8ec5dd1a0760f30". Baldwin Informational, Expires 12/25/1999 1624 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create Data objects Create buffer "input" of decimal value "128" bytes. Create buffer "output" of decimal value "128" bytes. Create buffer "expected" of decimal value "128" bytes. Create buffer "seed" of decimal value "20" bytes. Create buffer "esalt" of decimal value "20" bytes. Note: Create algorithm objects Create algorithm object "encryptPrivate". Call B_CreateAlgorithmObject passing "encryptPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptPrivate". Call B_CreateAlgorithmObject passing "decryptPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encryptPublic". Call B_CreateAlgorithmObject passing "encryptPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptPublic". Call B_CreateAlgorithmObject passing "decryptPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "randomShadow". Call B_CreateAlgorithmObject passing "randomShadow". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptPrivate" and "AI_SET_OAEP_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptPrivate" and "AI_SET_OAEP_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1625 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptPublic" and "AI_SET_OAEP_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptPublic" and "AI_SET_OAEP_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomShadow" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Initialize the random object Set buffer "seed" to hex value "00". Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomShadow" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomShadow" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1626 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: - Encrypt a block of zeros with private key. Note: For 1024 bit key (128 bytes) need 128 - 25 = 103 byte Note: input Note: The first byte of these 103 is the BC value, the Note: remaining Note: 102 are the ADB value. The block type (BT) and the Note: verification zero bytes are added by the algorithm Note: object. Set buffer "input" to hex value "0000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000". Set buffer "expected" to hex value "94b7a76d5a109d81707eba675c36 fedfff2659fb5430c2675f596d739582f4d779d0ca1966aa681bb3247d2b356e 9ca0056ea6ad0ce921759fcb2383dcff8868fa4b07ebbb40a27e179d5ca4b914 4d0d4da08a57dcd37018f04963b7882bb36fa0c7ee92f93cdea11258749419a4 d810b6ec6fe1cedcfbdf33beaa0965ff607f". Note: Compute the esalt that will be used by this operation. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomShadow" and address of next free byte in "esalt" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "esalt" by "_OutputLen". Finalize "esalt". Display buffer "esalt". Check equality of buffer "esalt" with hex value "7e4696ef25d5faececd853ce5e2a233b". Call Call B_EncryptInit passing "encryptPrivate" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1627 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expected". Note: ---------------------------------------------------------- Note: ---------- Note: - Decrypt the preceeding result. Set buffer "expected" to contents of buffer "input". Set buffer "input" to contents of buffer "output". Call Call B_DecryptInit passing "decryptPublic" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptPublic" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptPublic" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expected". Note: ---------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 1628 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------- Note: - Encrypt a block of zeros with public key. Note: For 1024 bit key (128 bytes) need 128 - 25 = 103 byte Note: input Set buffer "input" to hex value "0000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000". Set buffer "expected" to hex value "69985bf271717c87584cc151d522 0e89eb540872aca31927a530ad2730b8935f45174dd1b58166176257da7acf5e 8e81825c9e9b42e18f4ee57ebab9a66f0ed0d7835c2c9c8dba91028938f0b825 fba99fe91e231ac05791a0ee7e257d660eaebf3b05864d8925d8a36e465d93f5 168f88a927c8289eab3df7aac6b4561b1572". Note: Compute the esalt that will be used by this operation. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomShadow" and address of next free byte in "esalt" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "esalt" by "_OutputLen". Finalize "esalt". Display buffer "esalt". Check equality of buffer "esalt" with hex value "4199f0b098088175afead2025d92087b". Call Call B_EncryptInit passing "encryptPublic" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptPublic" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptPublic" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1629 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expected". Note: ---------------------------------------------------------- Note: ---------- Note: - Decrypt the preceeding result. Set buffer "expected" to contents of buffer "input". Set buffer "input" to contents of buffer "output". Call Call B_DecryptInit passing "decryptPrivate" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expected". Note: ---------------------------------------------------------- Note: ---------- Note: - Encrypt a block of all different bytes with private Note: key. Note: For 1024 bit key (128 bytes) need 128 - 25 = 103 byte Note: input Set buffer "input" to hex value "0001020304050607080910111213141 5161718192021222324252627282930313233343536373839404142434445464 Baldwin Informational, Expires 12/25/1999 1630 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 7484950515253545556575859606162636465666768697071727374757677787 98081828384858687888990919293949596979899A0A1A2". Set buffer "expected" to hex value "410bb9fe1357bfe6ffc314ec72f3 f38141a607884e67dbd1cb92ace320d0dfb279c0bc98d51ba0399a3cf60c42fc 4f59d3f64aa7b047912abded4d0a136604e0f56684ea6b271501e743de89a2a0 1d77ff22d6f6c683110f7748b905396a86b16bd40337c9fa61f28cb8157e6474 ac4b762084b264d36a834334016fe1818294". Note: Compute the esalt that will be used by this operation. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomShadow" and address of next free byte in "esalt" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "esalt" by "_OutputLen". Finalize "esalt". Display buffer "esalt". Check equality of buffer "esalt" with hex value "86dcbe444b69e8d0b13e4771c573e5cd". Call Call B_EncryptInit passing "encryptPrivate" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expected". Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 1631 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: - Decrypt the preceeding result. Set buffer "expected" to contents of buffer "input". Set buffer "input" to contents of buffer "output". Call Call B_DecryptInit passing "decryptPublic" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptPublic" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptPublic" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expected". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVSET01". This is the start of test case "TVSET02". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, RSA SET OAEP Note: Tests are performed with a 1024 bit modulus. Note: Test Cases: Note: - Encrypt a block of zeros with private key and compare Note: the result to explicit use of SHA1 and raw RSA. Baldwin Informational, Expires 12/25/1999 1632 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_DECRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_ENCRYPT", "NULL_PTR". Set "_Chooser" to "AM_MD2", "AM_MD5", "AM_SHA", "NULL_PTR". Note: Create an arbitrary public/private keypair. Note: This one contains a 1024-bit modulus. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "c7a25a3b2d4673c98974b4e857ea887 9c736bdb79cae168910c1899cd567688a0c274d1fef14abf20df13fb8e662dba 5064ec909095bc9e6bbb65bd1c2afb874649a0670e5697ba35e764d190c2e56c 494d34008fbab121d22289f3aeb40edc908f08815e3ce6e574e374d79005bf19 cea8f2d17f94c3815d20ce02ac5276ee3", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Fetch the BER encoded form to make test vectors Note: for other vendors. Create buffer "publicKeyBER" of decimal value "1000" bytes. Set "_InfoPointer" to address of info structure for "KI_RSAPublicBER". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublicBER". Load buffer "publicKeyBER" from info structure for "KI_RSAPublicBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "publicKeyBER". Check equality of buffer "publicKeyBER" with hex value "30819f300d06092a864886f70d010101050003818d0030818902818100c7a25 a3b2d4673c98974b4e857ea8879c736bdb79cae168910c1899cd567688a0c274 d1fef14abf20df13fb8e662dba5064ec909095bc9e6bbb65bd1c2afb874649a0 670e5697ba35e764d190c2e56c494d34008fbab121d22289f3aeb40edc908f08 815e3ce6e574e374d79005bf19cea8f2d17f94c3815d20ce02ac5276ee302030 Baldwin Informational, Expires 12/25/1999 1633 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 10001". Note: Matching private key. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "c7a25a3b2d4673c98974b4e85 7ea8879c736bdb79cae168910c1899cd567688a0c274d1fef14abf20df13fb8e 662dba5064ec909095bc9e6bbb65bd1c2afb874649a0670e5697ba35e764d190 c2e56c494d34008fbab121d22289f3aeb40edc908f08815e3ce6e574e374d790 05bf19cea8f2d17f94c3815d20ce02ac5276ee3", "010001", "aa156c82d6841bca2d4e3d8366c3ef1ab1dbb5af65d1fc6932d9718129603cf 4c07e0b7b959a2b14c3443362390728d3649863374bbde43aacdb2547857368d 65ebf1fa6f2fcfc9f5387ee263099a19d9eff75b609289e44d5685d4e7fdc610 a8e0f212bfd140fee17e05bb94116d771feb784b3d26f1bddf5e8f3d11250af2 1", "f7a438cc372b3f350d69267cf5ca2e3e34a018c2f269547d8aede5033ca be78f344a174751fd390a6c162a1dc21d6baf232ec6721729f2004c4252596cf a5d37", "ce5f513ccb465355de9481a30b392dcaaff3f889b20a69ce3ab848f 55c7b4eeda26dd945b5e4006196e3d01b3c1dcd9d2165d9b6693ecca2b0fc4d0 89c1431b5", "baf3db7d305911cab7691e894ff5669bc796e59aa6ef25bdf15 84f7ff619c122b75307e7ebd9c36a3ed72ccc72734b8c587f4389763b505b313 7107c3a6d7859", "7913af23cdd71ab97c77007fd9ebd813dc9b74abc48b1b7 c65330d8af69159c34dd2c8f07f409f80a1f852764814ec374e0ae56a81e0d84 a732ff33a23e82d29", "3548dd2fdadad2e733bb32efd274e803b11924a497f c3d596db3f74b8a8079ddf553746ad396c770e938d080a676224f71fa43b33ba 15e5ee8ec5dd1a0760f30". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Fetch the BER encoded form to make test vectors Note: for other vendors. Create buffer "privateKeyBER" of decimal value "1000" bytes. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivateBER". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_PKCS_RSAPrivateBER". Load buffer "privateKeyBER" from info structure for "KI_PKCS_RSAPrivateBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "privateKeyBER". Check equality of buffer "privateKeyBER" with hex value "30820277020100300d06092a864886f70d0101010500048202613082025d020 10002818100c7a25a3b2d4673c98974b4e857ea8879c736bdb79cae168910c18 Baldwin Informational, Expires 12/25/1999 1634 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 99cd567688a0c274d1fef14abf20df13fb8e662dba5064ec909095bc9e6bbb65 bd1c2afb874649a0670e5697ba35e764d190c2e56c494d34008fbab121d22289 f3aeb40edc908f08815e3ce6e574e374d79005bf19cea8f2d17f94c3815d20ce 02ac5276ee3020301000102818100aa156c82d6841bca2d4e3d8366c3ef1ab1d bb5af65d1fc6932d9718129603cf4c07e0b7b959a2b14c3443362390728d3649 863374bbde43aacdb2547857368d65ebf1fa6f2fcfc9f5387ee263099a19d9ef f75b609289e44d5685d4e7fdc610a8e0f212bfd140fee17e05bb94116d771feb 784b3d26f1bddf5e8f3d11250af21024100f7a438cc372b3f350d69267cf5ca2 e3e34a018c2f269547d8aede5033cabe78f344a174751fd390a6c162a1dc21d6 baf232ec6721729f2004c4252596cfa5d37024100ce5f513ccb465355de9481a 30b392dcaaff3f889b20a69ce3ab848f55c7b4eeda26dd945b5e4006196e3d01 b3c1dcd9d2165d9b6693ecca2b0fc4d089c1431b5024100baf3db7d305911cab 7691e894ff5669bc796e59aa6ef25bdf1584f7ff619c122b75307e7ebd9c36a3 ed72ccc72734b8c587f4389763b505b3137107c3a6d785902407913af23cdd71 ab97c77007fd9ebd813dc9b74abc48b1b7c65330d8af69159c34dd2c8f07f409 f80a1f852764814ec374e0ae56a81e0d84a732ff33a23e82d2902403548dd2fd adad2e733bb32efd274e803b11924a497fc3d596db3f74b8a8079ddf553746ad 396c770e938d080a676224f71fa43b33ba15e5ee8ec5dd1a0760f30". Note: Create Data objects Create buffer "input" of decimal value "128" bytes. Create buffer "output" of decimal value "128" bytes. Create buffer "expected" of decimal value "128" bytes. Create buffer "seed" of decimal value "16" bytes. Create buffer "esalt" of decimal value "16" bytes. Create buffer "esaltcnt" of decimal value "1" bytes. Note: CreateDataObject (sha1in, 64) Create buffer "sha1out" of decimal value "20" bytes. Create buffer "h1result" of decimal value "120" bytes. Create buffer "H1" of decimal value "111" bytes. Create buffer "H2" of decimal value "16" bytes. Create buffer "A" of decimal value "111" bytes. Create buffer "B" of decimal value "16" bytes. Create buffer "I" of decimal value "1" bytes. Create buffer "PDB" of decimal value "127" bytes. Create buffer "R" of decimal value "128" bytes. Note: Create algorithm objects Create algorithm object "encryptPrivate". Call B_CreateAlgorithmObject passing "encryptPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encryptRawPrivate". Call B_CreateAlgorithmObject passing "encryptRawPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptPrivate". Call B_CreateAlgorithmObject passing "decryptPrivate". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1635 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encryptPublic". Call B_CreateAlgorithmObject passing "encryptPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptPublic". Call B_CreateAlgorithmObject passing "decryptPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "randomShadow". Call B_CreateAlgorithmObject passing "randomShadow". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "digestSHA1". Call B_CreateAlgorithmObject passing "digestSHA1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptPrivate" and "AI_SET_OAEP_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptRawPrivate" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptPrivate" and "AI_SET_OAEP_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptPublic" and "AI_SET_OAEP_RSAPublic" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 1636 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptPublic" and "AI_SET_OAEP_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomShadow" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestSHA1" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Initialize the random object Set buffer "seed" to hex value "00". Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomShadow" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomShadow" and address of first initialized byte in "seed" and length of initialized bytes in Baldwin Informational, Expires 12/25/1999 1637 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: - Encrypt a block of zeros with private key. Note: For 1024 bit key (128 bytes) need 128 - 25 = 103 byte Note: input Note: The first byte of these 103 is the BC value, the Note: remaining Note: 102 are the ADB value. The block type (BT) and the Note: verification zero bytes are added by the algorithm Note: object. Set buffer "input" to hex value "0000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000". Note: Compute the actual result. Call Call B_EncryptInit passing "encryptPrivate" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Note: Compute the expected result from the underlying Note: primitives. Baldwin Informational, Expires 12/25/1999 1638 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "esaltcnt" to hex value "00". Set buffer "h1result" to hex value "". Call Call B_DigestInit passing "digestSHA1" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute the esalt that will be used by this operation. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomShadow" and address of next free byte in "esalt" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "esalt" by "_OutputLen". Finalize "esalt". Display buffer "esalt". Check equality of buffer "esalt" with hex value "7e4696ef25d5faececd853ce5e2a233b". Note: Expand the esalt into the H1 value Note: Compute first 20 bytes of the full h1result. Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esalt" and length of initialized bytes in buffer "esalt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "esaltcnt" to hex value "00". Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esaltcnt" and length of initialized bytes in buffer "esaltcnt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Append buffer "h1result" with contents of buffer "sha1out". Note: 40 Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esalt" and length of initialized bytes in buffer "esalt" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1639 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "esaltcnt" to hex value "01". Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esaltcnt" and length of initialized bytes in buffer "esaltcnt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Append buffer "h1result" with contents of buffer "sha1out". Note: 60 Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esalt" and length of initialized bytes in buffer "esalt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "esaltcnt" to hex value "02". Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esaltcnt" and length of initialized bytes in buffer "esaltcnt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Append buffer "h1result" with contents of buffer "sha1out". Note: 80 Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esalt" and length of initialized bytes in buffer "esalt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "esaltcnt" to hex value "03". Call B_DigestUpdate passing "digestSHA1" and address of first Baldwin Informational, Expires 12/25/1999 1640 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "esaltcnt" and length of initialized bytes in buffer "esaltcnt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Append buffer "h1result" with contents of buffer "sha1out". Note: 100 Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esalt" and length of initialized bytes in buffer "esalt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "esaltcnt" to hex value "04". Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esaltcnt" and length of initialized bytes in buffer "esaltcnt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Append buffer "h1result" with contents of buffer "sha1out". Note: 120 Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esalt" and length of initialized bytes in buffer "esalt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "esaltcnt" to hex value "05". Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esaltcnt" and length of initialized bytes in buffer "esaltcnt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1641 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Append buffer "h1result" with contents of buffer "sha1out". Display buffer "h1result". Check equality of buffer "h1result" with hex value "6a3d8752f36e3933ae48f38095e3f8e183cba0a2a6046750637e311327965c4 91a7621915edb7b0acee430e69c9db150302a9363005cbe2f8c6e205d3de1aa1 94d466336abbfa2d47018c1e5323f147daf13e3afcfbf968bf776071e1527b48 5915422daf96099b705c0b47e47b00a7b5a1b91305cb046ea". Note: H1 = the first 111 bytes of h1result Set buffer "H1" to bytes extracted from buffer "h1result" starting at offset decimal value "0" extending for decimal value "111" bytes. Display buffer "H1". Note: I = the 112th byte of h1result that equals neither 00 nor Note: 80 Set buffer "I" to bytes extracted from buffer "h1result" starting at offset decimal value "111" extending for decimal value "1" bytes. Display buffer "I". Note: Compute A = DB xor H1 Set buffer "A" to hex value "693d8752f36e3933ae48f38095e3f8e183c ba0a2a6046750637e311327965c491a7621915edb7b0acee430e69c9db150302 a9363005cbe2f8c6e205d3de1aa194d466336abbfa2d47018c1e5323f147daf1 3e3afcfbf968bf776071e1527b485915422daf96099b705c0b47e47b00a". Note: Compute the H2 value, the trailing 16 bytes of sha1out. Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "A" and length of initialized bytes in buffer "A" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Set buffer "H2" to bytes extracted from buffer "sha1out" starting at offset decimal value "4" extending for decimal Baldwin Informational, Expires 12/25/1999 1642 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 value "16" bytes. Display buffer "H2". Note: Compute B = H2 xor esalt. Check equality of buffer "H2" with hex value "ff2f740965f94a6626c85abcb443775d". Check equality of buffer "esalt" with hex value "7e4696ef25d5faececd853ce5e2a233b". Set buffer "B" to hex value "8169e2e6402cb08aca100972ea695466". Note: PDB = A | B Set buffer "PDB" to contents of buffer "A". Append buffer "PDB" with contents of buffer "B". Display buffer "PDB". Note: R = I | PDB Set buffer "R" to contents of buffer "I". Append buffer "R" with contents of buffer "PDB". Display buffer "R". Note: Run the result through raw RSA. Call Call B_EncryptInit passing "encryptRawPrivate" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptRawPrivate" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and address of first initialized byte in buffer "R" and length of initialized bytes in buffer "R" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Call B_EncryptFinal passing "encryptRawPrivate" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Finalize buffer "expected". Display buffer "expected". Display buffer "output". Check equality of buffer "output" with contents of buffer "expected". Note: ---------------------------------------------------------- Note: ---------- Baldwin Informational, Expires 12/25/1999 1643 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVSET02". This is the start of test case "TVSET03". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, RSA SET OAEP Note: Tests are performed with a 768 bit modulus. Note: Test Cases: Note: - Encrypt a block of zeros with private key and compare Note: the result to explicit use of SHA1 and raw RSA. Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_DECRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_ENCRYPT", "NULL_PTR". Set "_Chooser" to "AM_MD2", "AM_MD5", "AM_SHA", "NULL_PTR". Note: Create an arbitrary public/private keypair. Note: This one contains a 768 bit modulus. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "cc76652b4b5d972b25c464d23b965fa a52ca08b1012239f4aa3f8d518bf550c56dc4c684c78fe4ed492728005a7c101 2a072ecd28592a6b0f520445e41eb4884a2b801d8b579e6920fa7d25c0b02359 263af4dd4beececaa9dd59671351bb59f", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1644 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "cc76652b4b5d972b25c464d23 b965faa52ca08b1012239f4aa3f8d518bf550c56dc4c684c78fe4ed492728005 a7c1012a072ecd28592a6b0f520445e41eb4884a2b801d8b579e6920fa7d25c0 b02359263af4dd4beececaa9dd59671351bb59f", "010001", "8ce64e23bec51946bfb90ead9e28ab7669a516c63bfcc529a9253092f0bb365 547a6e213609ef5e8db8fa34e530cc9d980ea4253c6624734e57fbc5d5df7775 536ecdd195e9e7e640f4301d3d12f391d012a1e552208c1c396a49d2d561390a 9", "e5db12250f865ace6d9613df55b2bddbbf3887e061f55c9228906873216 ff0c03a146bfd3d279ef57221fed054b502fb", "e3b7eca5658d8530e3f6e5e 0806a533b0d2bd86a348339548140ddab84b27247a6235b3d563d053802d652c 671eb76ad", "b9aa07f109a643e92459aa79a6d677476e2132980b684ebafca b10c39689be14f79511597fb16653ea3a0d82a839824b", "104bcf419edcdbd53ddb2364478c545c7b7ad1c7f7ee14223a05bc5753edb94 3eb5dc85fc1562893739086e7f0ab1b19", "875198f828082848eac2487c92d 6093d576382ab367eadcf059cd6a5a9062c9d6157a45631648cbffab6273361c 6ccb7". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create Data objects Create buffer "input" of decimal value "128" bytes. Create buffer "output" of decimal value "128" bytes. Create buffer "expected" of decimal value "128" bytes. Create buffer "seed" of decimal value "16" bytes. Create buffer "esalt" of decimal value "16" bytes. Create buffer "esaltcnt" of decimal value "1" bytes. Create buffer "sha1out" of decimal value "20" bytes. Create buffer "h1result" of decimal value "120" bytes. Create buffer "H1" of decimal value "111" bytes. Create buffer "H2" of decimal value "16" bytes. Create buffer "A" of decimal value "111" bytes. Create buffer "B" of decimal value "16" bytes. Create buffer "I" of decimal value "1" bytes. Create buffer "PDB" of decimal value "127" bytes. Create buffer "R" of decimal value "128" bytes. Note: Create algorithm objects Create algorithm object "encryptPrivate". Call B_CreateAlgorithmObject passing "encryptPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encryptRawPrivate". Call B_CreateAlgorithmObject passing "encryptRawPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1645 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Create algorithm object "decryptPrivate". Call B_CreateAlgorithmObject passing "decryptPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encryptPublic". Call B_CreateAlgorithmObject passing "encryptPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptPublic". Call B_CreateAlgorithmObject passing "decryptPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "randomShadow". Call B_CreateAlgorithmObject passing "randomShadow". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "digestSHA1". Call B_CreateAlgorithmObject passing "digestSHA1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptPrivate" and "AI_SET_OAEP_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptRawPrivate" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptPrivate" and "AI_SET_OAEP_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1646 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptPublic" and "AI_SET_OAEP_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptPublic" and "AI_SET_OAEP_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomShadow" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestSHA1" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Initialize the random object Set buffer "seed" to hex value "00". Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomShadow" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1647 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomShadow" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: - Encrypt a block of zeros with private key. Note: For 768 bit key (96 bytes) need 96 - 25 = 71 byte input Note: The first byte of these 71 is the BC value, the remaining Note: 70 are the ADB value. The block type (BT) and the Note: verification zero bytes are added by the algorithm Note: object. Set buffer "input" to hex value "0000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000". Note: Compute the actual result. Call Call B_EncryptInit passing "encryptPrivate" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Note: Compute the expected result from the underlying Baldwin Informational, Expires 12/25/1999 1648 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: primitives. Set buffer "esaltcnt" to hex value "00". Set buffer "h1result" to hex value "". Call Call B_DigestInit passing "digestSHA1" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Compute the esalt that will be used by this operation. Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomShadow" and address of next free byte in "esalt" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "esalt" by "_OutputLen". Finalize "esalt". Display buffer "esalt". Check equality of buffer "esalt" with hex value "7e4696ef25d5faececd853ce5e2a233b". Note: Expand the esalt into the H1 value Note: Compute first 20 bytes of the full h1result. Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esalt" and length of initialized bytes in buffer "esalt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "esaltcnt" to hex value "00". Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esaltcnt" and length of initialized bytes in buffer "esaltcnt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Append buffer "h1result" with contents of buffer "sha1out". Note: 40 Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esalt" and length of initialized Baldwin Informational, Expires 12/25/1999 1649 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "esalt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "esaltcnt" to hex value "01". Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esaltcnt" and length of initialized bytes in buffer "esaltcnt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Append buffer "h1result" with contents of buffer "sha1out". Note: 60 Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esalt" and length of initialized bytes in buffer "esalt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "esaltcnt" to hex value "02". Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esaltcnt" and length of initialized bytes in buffer "esaltcnt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Append buffer "h1result" with contents of buffer "sha1out". Note: 80 Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esalt" and length of initialized bytes in buffer "esalt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "esaltcnt" to hex value "03". Baldwin Informational, Expires 12/25/1999 1650 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "esaltcnt" and length of initialized bytes in buffer "esaltcnt" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Append buffer "h1result" with contents of buffer "sha1out". Note: H1 = the first 79 bytes of h1result Set buffer "H1" to bytes extracted from buffer "h1result" starting at offset decimal value "0" extending for decimal value "79" bytes. Display buffer "H1". Check equality of buffer "H1" with hex value "6a3d8752f36e3933ae48f38095e3f8e183cba0a2a6046750637e311327965c4 91a7621915edb7b0acee430e69c9db150302a9363005cbe2f8c6e205d3de1aa1 94d466336abbfa2d47018c1e5323f14". Note: I = the next byte of H1 that equals neither 00 nor 80 Set buffer "I" to bytes extracted from buffer "h1result" starting at offset decimal value "79" extending for decimal value "1" bytes. Display buffer "I". Check equality of buffer "I" with hex value "7d". Note: Compute A = DB xor H1, first byte of DB is BT=03. Set buffer "A" to hex value "693d8752f36e3933ae48f38095e3f8e183c ba0a2a6046750637e311327965c491a7621915edb7b0acee430e69c9db150302 a9363005cbe2f8c6e205d3de1aa194d466336abbfa2d47018c1e5323f14". Note: Compute the H2 value, the trailing 16 bytes of sha1out. Call B_DigestUpdate passing "digestSHA1" and address of first initialized byte in buffer "A" and length of initialized bytes in buffer "A" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestSHA1" and address of next free byte in buffer "sha1out" and address of "_OutputLen" and length of free bytes in buffer "sha1out" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1651 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "sha1out" by "_OutputLen". Finalize buffer "sha1out". Set buffer "H2" to bytes extracted from buffer "sha1out" starting at offset decimal value "4" extending for decimal value "16" bytes. Display buffer "H2". Note: Compute B = H2 xor esalt. Check equality of buffer "H2" with hex value "39a376e9b03a88337cd65e88010f91d0". Check equality of buffer "esalt" with hex value "7e4696ef25d5faececd853ce5e2a233b". Set buffer "B" to hex value "47e5e00695ef72df900e0d465f25b2eb". Note: PDB = A | B Set buffer "PDB" to contents of buffer "A". Append buffer "PDB" with contents of buffer "B". Display buffer "PDB". Note: R = I | PDB Set buffer "R" to contents of buffer "I". Append buffer "R" with contents of buffer "PDB". Display buffer "R". Note: Run the result through raw RSA. Call Call B_EncryptInit passing "encryptRawPrivate" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptRawPrivate" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and address of first initialized byte in buffer "R" and length of initialized bytes in buffer "R" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Call B_EncryptFinal passing "encryptRawPrivate" and address of next free byte in buffer "expected" and address of "_OutputLen" and length of free bytes in buffer "expected" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "expected" by "_OutputLen". Finalize buffer "expected". Display buffer "expected". Display buffer "output". Check equality of buffer "output" with contents of buffer "expected". Baldwin Informational, Expires 12/25/1999 1652 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVSET03". This is the start of test case "TVSET04". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, RSA SET OAEP Note: Tests are performed with a 1024 bit modulus. Note: Test Cases: Note: - Decrypt customer's output with private key and compare Note: the result with customer's input, see below for more Note: details Note: ***** Note: Here's a test vector to verify the SPYRUS OAEP Encryption Note: and RSA OAEP Note: Decryption process. It was encrypted with the Public Key Note: from your Note: vectors. The first byte of the input block is the BC Note: byte. The next 8 Note: bytes are the DEK. The remaining data is the HD and X Note: blocks. Note: ESALT = 21 fa 0c e2 05 1f 90 9d aa 1b a3 44 0b aa 25 Note: 5a Note: INPUT = a5 67 57 2c 02 f1 19 d9 91 00 01 02 03 04 05 Note: 06 Note: 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 Note: 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 Note: 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 Note: 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 Note: 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 Note: 57 58 59 5a 5b 5c 5d Note: OUTPUT = 8a 74 60 13 75 8e 37 f8 85 a1 f0 9b 40 86 8b Note: 76 Note: ba 27 27 6e 68 8a 70 a6 94 88 f6 90 45 af a7 e1 Note: 2b 6d 30 07 58 d6 12 ff 21 a4 d3 b9 35 57 49 5a Note: f4 50 15 68 f9 41 b8 3b 86 db d9 1c 8d ac ed 17 Note: 14 50 fb 7f 36 c6 37 8f 66 7a 50 ba 2c 49 55 89 Note: 4b 7f 6c 3e 28 66 d6 53 74 68 17 21 f8 2b f5 60 Note: 1a b3 c3 20 8b 54 62 a6 e1 2b 83 52 fc a8 a7 e7 Note: 58 a6 9d 63 bc 28 45 41 42 a4 f1 de 30 4a 64 5c Baldwin Informational, Expires 12/25/1999 1653 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ***** Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RSA_DECRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_CRT_ENCRYPT", "NULL_PTR". Set "_Chooser" to "AM_MD2", "AM_MD5", "AM_SHA", "NULL_PTR". Note: Create an arbitrary public/private keypair. Note: This one contains a 1024-bit modulus. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_RSAPublic" initialized from "c7a25a3b2d4673c98974b4e857ea887 9c736bdb79cae168910c1899cd567688a0c274d1fef14abf20df13fb8e662dba 5064ec909095bc9e6bbb65bd1c2afb874649a0670e5697ba35e764d190c2e56c 494d34008fbab121d22289f3aeb40edc908f08815e3ce6e574e374d79005bf19 cea8f2d17f94c3815d20ce02ac5276ee3", "010001". Call B_SetKeyInfo passing "publicKey" and "KI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Fetch the BER encoded form to make test vectors Note: for other vendors. Create buffer "publicKeyBER" of decimal value "1000" bytes. Set "_InfoPointer" to address of info structure for "KI_RSAPublicBER". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublicBER". Load buffer "publicKeyBER" from info structure for "KI_RSAPublicBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "publicKeyBER". Check equality of buffer "publicKeyBER" with hex value "30819f300d06092a864886f70d010101050003818d0030818902818100c7a25 a3b2d4673c98974b4e857ea8879c736bdb79cae168910c1899cd567688a0c274 d1fef14abf20df13fb8e662dba5064ec909095bc9e6bbb65bd1c2afb874649a0 Baldwin Informational, Expires 12/25/1999 1654 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 670e5697ba35e764d190c2e56c494d34008fbab121d22289f3aeb40edc908f08 815e3ce6e574e374d79005bf19cea8f2d17f94c3815d20ce02ac5276ee302030 10001". Note: Matching private key. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivate" initialized from "c7a25a3b2d4673c98974b4e85 7ea8879c736bdb79cae168910c1899cd567688a0c274d1fef14abf20df13fb8e 662dba5064ec909095bc9e6bbb65bd1c2afb874649a0670e5697ba35e764d190 c2e56c494d34008fbab121d22289f3aeb40edc908f08815e3ce6e574e374d790 05bf19cea8f2d17f94c3815d20ce02ac5276ee3", "010001", "aa156c82d6841bca2d4e3d8366c3ef1ab1dbb5af65d1fc6932d9718129603cf 4c07e0b7b959a2b14c3443362390728d3649863374bbde43aacdb2547857368d 65ebf1fa6f2fcfc9f5387ee263099a19d9eff75b609289e44d5685d4e7fdc610 a8e0f212bfd140fee17e05bb94116d771feb784b3d26f1bddf5e8f3d11250af2 1", "f7a438cc372b3f350d69267cf5ca2e3e34a018c2f269547d8aede5033ca be78f344a174751fd390a6c162a1dc21d6baf232ec6721729f2004c4252596cf a5d37", "ce5f513ccb465355de9481a30b392dcaaff3f889b20a69ce3ab848f 55c7b4eeda26dd945b5e4006196e3d01b3c1dcd9d2165d9b6693ecca2b0fc4d0 89c1431b5", "baf3db7d305911cab7691e894ff5669bc796e59aa6ef25bdf15 84f7ff619c122b75307e7ebd9c36a3ed72ccc72734b8c587f4389763b505b313 7107c3a6d7859", "7913af23cdd71ab97c77007fd9ebd813dc9b74abc48b1b7 c65330d8af69159c34dd2c8f07f409f80a1f852764814ec374e0ae56a81e0d84 a732ff33a23e82d29", "3548dd2fdadad2e733bb32efd274e803b11924a497f c3d596db3f74b8a8079ddf553746ad396c770e938d080a676224f71fa43b33ba 15e5ee8ec5dd1a0760f30". Call B_SetKeyInfo passing "privateKey" and "KI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Fetch the BER encoded form to make test vectors Note: for other vendors. Create buffer "privateKeyBER" of decimal value "1000" bytes. Set "_InfoPointer" to address of info structure for "KI_PKCS_RSAPrivateBER". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_PKCS_RSAPrivateBER". Load buffer "privateKeyBER" from info structure for "KI_PKCS_RSAPrivateBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "privateKeyBER". Check equality of buffer "privateKeyBER" with hex value Baldwin Informational, Expires 12/25/1999 1655 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "30820277020100300d06092a864886f70d0101010500048202613082025d020 10002818100c7a25a3b2d4673c98974b4e857ea8879c736bdb79cae168910c18 99cd567688a0c274d1fef14abf20df13fb8e662dba5064ec909095bc9e6bbb65 bd1c2afb874649a0670e5697ba35e764d190c2e56c494d34008fbab121d22289 f3aeb40edc908f08815e3ce6e574e374d79005bf19cea8f2d17f94c3815d20ce 02ac5276ee3020301000102818100aa156c82d6841bca2d4e3d8366c3ef1ab1d bb5af65d1fc6932d9718129603cf4c07e0b7b959a2b14c3443362390728d3649 863374bbde43aacdb2547857368d65ebf1fa6f2fcfc9f5387ee263099a19d9ef f75b609289e44d5685d4e7fdc610a8e0f212bfd140fee17e05bb94116d771feb 784b3d26f1bddf5e8f3d11250af21024100f7a438cc372b3f350d69267cf5ca2 e3e34a018c2f269547d8aede5033cabe78f344a174751fd390a6c162a1dc21d6 baf232ec6721729f2004c4252596cfa5d37024100ce5f513ccb465355de9481a 30b392dcaaff3f889b20a69ce3ab848f55c7b4eeda26dd945b5e4006196e3d01 b3c1dcd9d2165d9b6693ecca2b0fc4d089c1431b5024100baf3db7d305911cab 7691e894ff5669bc796e59aa6ef25bdf1584f7ff619c122b75307e7ebd9c36a3 ed72ccc72734b8c587f4389763b505b3137107c3a6d785902407913af23cdd71 ab97c77007fd9ebd813dc9b74abc48b1b7c65330d8af69159c34dd2c8f07f409 f80a1f852764814ec374e0ae56a81e0d84a732ff33a23e82d2902403548dd2fd adad2e733bb32efd274e803b11924a497fc3d596db3f74b8a8079ddf553746ad 396c770e938d080a676224f71fa43b33ba15e5ee8ec5dd1a0760f30". Note: Create Data objects Create buffer "input" of decimal value "128" bytes. Create buffer "output" of decimal value "128" bytes. Create buffer "expected" of decimal value "128" bytes. Note: Create algorithm objects Create algorithm object "decryptPrivate". Call B_CreateAlgorithmObject passing "decryptPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SET_OAEP_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptPrivate" and "AI_SET_OAEP_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Decrypt customer's output with private key and compare Note: the result with customer's input Set buffer "input" to hex value "8a746013758e37f885a1f09b40868b7 6ba27276e688a70a69488f69045afa7e12b6d300758d612ff21a4d3b93557495 af4501568f941b83b86dbd91c8daced171450fb7f36c6378f667a50ba2c49558 94b7f6c3e2866d65374681721f82bf5601ab3c3208b5462a6e12b8352fca8a7e 758a69d63bc28454142a4f1de304a645c". Set buffer "expected" to hex value "a567572c02f119d9910001020304 05060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324 25262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f4041424344 Baldwin Informational, Expires 12/25/1999 1656 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 45464748494a4b4c4d4e4f505152535455565758595a5b5c5d". Call Call B_DecryptInit passing "decryptPrivate" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptPrivate" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expected". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVSET04". This is the start of test case "TVSHA00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: FIPS 180-1: SHA1 vectors test Note: AI_SHA1, AI_SHA1_BER Note: ------------------------------------------------------- Note: Start with the GlobalInit Set "_Chooser" to "AM_SHA", "NULL_PTR". Create buffer "input" of decimal value "1024" bytes. Baldwin Informational, Expires 12/25/1999 1657 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "digest" of decimal value "20" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Initialization Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Reference test case 1 Note: SHA1 ("abc") = a9993e364706816aba3e25717850c26c9cd0d89d Set buffer "input" to hex value "616263". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a9993e364706816aba3e25717850c26c9cd0d89d". Note: ------------------------------------------------------- Note: Reference test case 2 Note: SHA1 ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomno Note: pnopq") = Note: 84983e441c3bd26ebaae4aa1f95129e5e54670f1 Set buffer "input" to hex value "6162636462636465636465666465666 Baldwin Informational, Expires 12/25/1999 1658 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 765666768666768696768696a68696a6b696a6b6c6a6b6c6d6b6c6d6e6c6d6e6 f6d6e6f706e6f7071". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "84983e441c3bd26ebaae4aa1f95129e5e54670f1". Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ------------------------------------------------------- Note: Reference test case 3 Note: SHA1 ("1,000,00 repetition of a" = 34aa973cd4c4daa4f61eeb2 Note: bdbad27316534016f Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1_BER" initialized from "300906052b0e03021a0500". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_SHA1_BER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "6161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 Baldwin Informational, Expires 12/25/1999 1659 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161616161616161616 1616161616161616161616161616161616161616161616161". Begin a loop of decimal value "1000" iterations. Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "34aa973cd4c4daa4f61eeb2bdbad27316534016f". This is the end of test case "TVSHA00". This is the start of test case "TERSA01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Baldwin Informational, Expires 12/25/1999 1660 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_SurrenderContext" to "NULL_PTR". Note: Generate errors when executing RSA operations Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_MD5_RANDOM", "AM_RSA_KEY_GEN", "NULL_PTR". Set "_Chooser" to "AM_RSA_ENCRYPT", "AM_RSA_DECRYPT", "NULL_PTR". Note: Build a random algorithm to use throughout this script. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1c32b1875f98d672". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try to generate key pairs that are too small or too Note: large. Create algorithm object "keypairGenerator". Call B_CreateAlgorithmObject passing "keypairGenerator". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAKeyGen" initialized from "255", "010001". Baldwin Informational, Expires 12/25/1999 1661 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "keypairGenerator" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_MODULUS_LEN". Call Call B_GenerateInit passing "keypairGenerator" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "keypairGenerator". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "keypairGenerator". Call B_CreateAlgorithmObject passing "keypairGenerator". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAKeyGen" initialized from "2049", "010001". Call B_SetAlgorithmInfo passing "keypairGenerator" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_MODULUS_LEN". Call Call B_GenerateInit passing "keypairGenerator" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "keypairGenerator". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try to generate a key pair with an invalid public Note: exponents. Create algorithm object "keypairGenerator". Call B_CreateAlgorithmObject passing "keypairGenerator". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAKeyGen" initialized from "256", "010002". Call B_SetAlgorithmInfo passing "keypairGenerator" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1662 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to "BE_EXPONENT_EVEN". Call Call B_GenerateInit passing "keypairGenerator" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "keypairGenerator". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "keypairGenerator". Call B_CreateAlgorithmObject passing "keypairGenerator". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAKeyGen" initialized from "256", "010001000100010001000100 010001000100010001000100010001000100010001". Call B_SetAlgorithmInfo passing "keypairGenerator" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_EXPONENT_LEN". Call Call B_GenerateInit passing "keypairGenerator" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "keypairGenerator". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate a key pair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "keypairGenerator". Call B_CreateAlgorithmObject passing "keypairGenerator". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAKeyGen" initialized from "256", "010001". Baldwin Informational, Expires 12/25/1999 1663 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "keypairGenerator" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "keypairGenerator" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "keypairGenerator" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try to perform raw RSA with too little data. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "782b15c0883a47c7". Create buffer "output" of decimal value "32" bytes. Create algorithm object "publicEncrypt". Call B_CreateAlgorithmObject passing "publicEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "publicEncrypt" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "publicEncrypt" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "publicEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_EncryptFinal passing "publicEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 1664 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Call Call B_DestroyAlgorithmObject passing "publicEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now Decrypt Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "782b15c0883a47c7". Create buffer "output" of decimal value "32" bytes. Create algorithm object "publicDecrypt". Call B_CreateAlgorithmObject passing "publicDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "publicDecrypt" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "publicDecrypt" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "publicDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_DecryptFinal passing "publicDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1665 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Call Call B_DestroyAlgorithmObject passing "publicDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try to perform raw RSA with an output buffer that is too Note: small. Create buffer "input" of decimal value "32" bytes. Set buffer "input" to hex value "00911f04ba55c72e782b15c0883a47c 7573c89b124d7d39877e86124e5713df1". Create buffer "output" of decimal value "31" bytes. Create algorithm object "publicEncrypt". Call B_CreateAlgorithmObject passing "publicEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "publicEncrypt" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "publicEncrypt" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_OUTPUT_LEN". Call B_EncryptUpdate passing "publicEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "publicEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1666 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Now decrypt. Create buffer "input" of decimal value "32" bytes. Set buffer "input" to hex value "00911f04ba55c72e782b15c0883a47c 7573c89b124d7d39877e86124e5713df1". Create buffer "output" of decimal value "31" bytes. Create algorithm object "publicDecrypt". Call B_CreateAlgorithmObject passing "publicDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "publicDecrypt" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "publicDecrypt" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_OUTPUT_LEN". Call B_DecryptUpdate passing "publicDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "publicDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try to perform raw RSA with the modulus as input. Create buffer "input" of decimal value "32" bytes. Create buffer "output" of decimal value "32" bytes. Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Load buffer "input" from info structure for "KI_RSAPublic". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1667 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "publicEncrypt". Call B_CreateAlgorithmObject passing "publicEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "publicEncrypt" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "publicEncrypt" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_INPUT_DATA". Call B_EncryptUpdate passing "publicEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "publicEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now decrypt. Create buffer "input" of decimal value "32" bytes. Create buffer "output" of decimal value "32" bytes. Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Load buffer "input" from info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "publicDecrypt". Call B_CreateAlgorithmObject passing "publicDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1668 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "publicDecrypt" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "publicDecrypt" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_INPUT_DATA". Call B_DecryptUpdate passing "publicDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "publicDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TERSA01". This is the start of test case "TERSA02". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Generate errors when executing RSA operations Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_MD5_RANDOM", "AM_RSA_KEY_GEN", "NULL_PTR". Set "_Chooser" to "AM_RSA_CRT_ENCRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 1669 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Build a random algorithm to use throughout this script. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "7c8230f989001d54". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate a key pair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "keypairGenerator". Call B_CreateAlgorithmObject passing "keypairGenerator". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAKeyGen" initialized from "256", "010001". Call B_SetAlgorithmInfo passing "keypairGenerator" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1670 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_GenerateInit passing "keypairGenerator" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "keypairGenerator" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try to perform raw RSA with too little data. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "782b15c0883a47c7". Create buffer "output" of decimal value "32" bytes. Create algorithm object "privateEncrypt". Call B_CreateAlgorithmObject passing "privateEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateEncrypt" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "privateEncrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "privateEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_EncryptFinal passing "privateEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1671 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "output". Call Call B_DestroyAlgorithmObject passing "privateEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now Decrypt Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "782b15c0883a47c7". Create buffer "output" of decimal value "32" bytes. Create algorithm object "privateDecrypt". Call B_CreateAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateDecrypt" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "privateDecrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "privateDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_DecryptFinal passing "privateDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Call Call B_DestroyAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1672 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: Try to perform raw RSA with an output buffer that is too Note: small. Create buffer "input" of decimal value "32" bytes. Set buffer "input" to hex value "00911f04ba55c72e782b15c0883a47c 7573c89b124d7d39877e86124e5713df1". Create buffer "output" of decimal value "31" bytes. Create algorithm object "privateEncrypt". Call B_CreateAlgorithmObject passing "privateEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateEncrypt" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "privateEncrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_OUTPUT_LEN". Call B_EncryptUpdate passing "privateEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "privateEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now decrypt. Create buffer "input" of decimal value "32" bytes. Set buffer "input" to hex value "00911f04ba55c72e782b15c0883a47c 7573c89b124d7d39877e86124e5713df1". Baldwin Informational, Expires 12/25/1999 1673 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "output" of decimal value "31" bytes. Create algorithm object "privateDecrypt". Call B_CreateAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateDecrypt" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "privateDecrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_OUTPUT_LEN". Call B_DecryptUpdate passing "privateDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try to perform raw RSA with the modulus as input. Create buffer "input" of decimal value "32" bytes. Create buffer "output" of decimal value "32" bytes. Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Load buffer "input" from info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "privateEncrypt". Call B_CreateAlgorithmObject passing "privateEncrypt". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1674 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateEncrypt" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "privateEncrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_INPUT_DATA". Call B_EncryptUpdate passing "privateEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "privateEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now decrypt. Create buffer "input" of decimal value "32" bytes. Create buffer "output" of decimal value "32" bytes. Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Load buffer "input" from info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "privateDecrypt". Call B_CreateAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateDecrypt" and "AI_RSAPrivate" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 1675 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "privateDecrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_INPUT_DATA". Call B_DecryptUpdate passing "privateDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TERSA02". This is the start of test case "TERSA03". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Generate errors when executing RSA operations Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_MD5_RANDOM", "AM_RSA_KEY_GEN", "NULL_PTR". Set "_Chooser" to "AM_RSA_CRT_ENCRYPT_BLIND", "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Set "_Chooser" to "AM_MD5_RANDOM", "AM_RSA_KEY_GEN", "AM_RSA_CRT_ENCRYPT_BLIND", "AM_RSA_CRT_DECRYPT_BLIND", "NULL_PTR". Note: Build a random algorithm to use throughout this script. Baldwin Informational, Expires 12/25/1999 1676 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "7c8230f989001d54". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate a key pair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "keypairGenerator". Call B_CreateAlgorithmObject passing "keypairGenerator". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAKeyGen" initialized from "256", "010001". Call B_SetAlgorithmInfo passing "keypairGenerator" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "keypairGenerator" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1677 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "keypairGenerator" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try to perform raw RSA with too little data. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "782b15c0883a47c7". Create buffer "output" of decimal value "32" bytes. Create algorithm object "privateEncrypt". Call B_CreateAlgorithmObject passing "privateEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateEncrypt" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "privateEncrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "privateEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_EncryptFinal passing "privateEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Call Call B_DestroyAlgorithmObject passing "privateEncrypt". Baldwin Informational, Expires 12/25/1999 1678 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now Decrypt Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "782b15c0883a47c7". Create buffer "output" of decimal value "32" bytes. Create algorithm object "privateDecrypt". Call B_CreateAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateDecrypt" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "privateDecrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "privateDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Set "_ExpectedStatus" to "BE_INPUT_LEN". Call B_DecryptFinal passing "privateDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Call Call B_DestroyAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1679 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Try to perform raw RSA with an output buffer that is too Note: small. Create buffer "input" of decimal value "32" bytes. Set buffer "input" to hex value "00911f04ba55c72e782b15c0883a47c 7573c89b124d7d39877e86124e5713df1". Create buffer "output" of decimal value "31" bytes. Create algorithm object "privateEncrypt". Call B_CreateAlgorithmObject passing "privateEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateEncrypt" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "privateEncrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_OUTPUT_LEN". Call B_EncryptUpdate passing "privateEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "privateEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now decrypt. Create buffer "input" of decimal value "32" bytes. Set buffer "input" to hex value "00911f04ba55c72e782b15c0883a47c 7573c89b124d7d39877e86124e5713df1". Create buffer "output" of decimal value "31" bytes. Create algorithm object "privateDecrypt". Baldwin Informational, Expires 12/25/1999 1680 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateDecrypt" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "privateDecrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_OUTPUT_LEN". Call B_DecryptUpdate passing "privateDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try to perform raw RSA with the modulus as input. Create buffer "input" of decimal value "32" bytes. Create buffer "output" of decimal value "32" bytes. Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Load buffer "input" from info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "privateEncrypt". Call B_CreateAlgorithmObject passing "privateEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1681 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateEncrypt" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "privateEncrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_INPUT_DATA". Call B_EncryptUpdate passing "privateEncrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "privateEncrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now decrypt. Create buffer "input" of decimal value "32" bytes. Create buffer "output" of decimal value "32" bytes. Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Load buffer "input" from info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "privateDecrypt". Call B_CreateAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "privateDecrypt" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1682 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "privateDecrypt" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_INPUT_DATA". Call B_DecryptUpdate passing "privateDecrypt" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call Call B_DestroyAlgorithmObject passing "privateDecrypt". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TERSA03". This is the start of test case "TFDSA00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: 512 bits key functional test for Note: AI_DSAParamGen, AI_DSAKeyGen, Note: KI_DSAPublic, KI_DSAPublicBER, KI_DSAPrivate, Note: KI_DSAPrivateBER Note: AI_DSAWithSHA1, AI_DSAWithSHA1_BER, AI_DSA Note: Depending on AI_MD5Random algorithm Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_DSA_PARAM_GEN", "AM_DSA_KEY_GEN", "AM_SHA", "AM_DSA_VERIFY", "AM_DSA_SIGN", "NULL_PTR". Note: Set up random object for param and key generation Baldwin Informational, Expires 12/25/1999 1683 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "512" bytes. Set buffer "seed" to hex value "112233445566". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DSA parameter Create algorithm object "dsaParamGen". Call B_CreateAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAParamGen" initialized from "512". Call B_SetAlgorithmInfo passing "dsaParamGen" and "AI_DSAParamGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaParams". Call B_CreateAlgorithmObject passing "dsaParams". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "dsaParamGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateParameters passing "dsaParamGen" and "dsaParams" and "random" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1684 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DSAKeyGen" initialized from "ea5fd4a8924fe8836afac54ab0b05a98e1c1f39ab2987a896b181764f2b4530 a79de272c91c7d76bc328f12083e4d4532deda791a52145144e0c0c320b6958d b", "e4e38dc8f10cc7d4a9b3e34b1c6faef6fec1a38f", "494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9205fb361c0b53b1b a344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce87cecf2733fa4c5f a". Set "_InfoPointer" to address of info structure for "AI_DSAKeyGen". Call B_GetAlgorithmInfo passing "_InfoPointer" and "dsaParams" and "AI_DSAKeyGen". Check equality of info structure for "AI_DSAKeyGen" with expected info structure for "AI_DSAKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DSA Keypair Create algorithm object "dsaKeyGen". Call B_CreateAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAKeyGen" initialized from "ea5fd4a8924fe8836afac54ab0b05a9 8e1c1f39ab2987a896b181764f2b4530a79de272c91c7d76bc328f12083e4d45 32deda791a52145144e0c0c320b6958db", "e4e38dc8f10cc7d4a9b3e34b1c6 faef6fec1a38f", "494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9 205fb361c0b53b1ba344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce 87cecf2733fa4c5fa". Call B_SetAlgorithmInfo passing "dsaKeyGen" and "AI_DSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "dsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1685 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "dsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the DSA public Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DSAPublic" initialized from "9060867cb048004b7555b2af386fc16aece4a45898654f52c1b29ecea188b7f f48d71c9058631c27d10e0af71c5eddb90f835a2be78eaeebbfff9304f167f14 4", "ea5fd4a8924fe8836afac54ab0b05a98e1c1f39ab2987a896b181764f2b 4530a79de272c91c7d76bc328f12083e4d4532deda791a52145144e0c0c320b6 958db", "e4e38dc8f10cc7d4a9b3e34b1c6faef6fec1a38f", "494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9205fb361c0b53b1b a344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce87cecf2733fa4c5f a". Set "_InfoPointer" to address of info structure for "KI_DSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_DSAPublic". Check equality of info structure for "KI_DSAPublic" with expected info structure for "KI_DSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the DSA public key BER encoding Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DSAPublicBER" initialized from "3081f33081aa06052b0e03020c3081a002020200024100ea5fd4a8924fe8836 afac54ab0b05a98e1c1f39ab2987a896b181764f2b4530a79de272c91c7d76bc 328f12083e4d4532deda791a52145144e0c0c320b6958db021500e4e38dc8f10 cc7d4a9b3e34b1c6faef6fec1a38f0240494eeb99abfe14fbc16602d4ef606e9 442ebc11eb3c98a9205fb361c0b53b1ba344c3ff9b8c6e74e46c1d113171f262 d61fbc79457001ce87cecf2733fa4c5fa0344000241009060867cb048004b755 5b2af386fc16aece4a45898654f52c1b29ecea188b7ff48d71c9058631c27d10 e0af71c5eddb90f835a2be78eaeebbfff9304f167f144". Set "_InfoPointer" to address of info structure for "KI_DSAPublicBER". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_DSAPublicBER". Check equality of info structure for "KI_DSAPublicBER" with expected info structure for "KI_DSAPublicBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the DSA private Baldwin Informational, Expires 12/25/1999 1686 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DSAPrivate" initialized from "91eced865500bed9485a971552c59e695f6c9365", "ea5fd4a8924fe8836af ac54ab0b05a98e1c1f39ab2987a896b181764f2b4530a79de272c91c7d76bc32 8f12083e4d4532deda791a52145144e0c0c320b6958db", "e4e38dc8f10cc7d4a9b3e34b1c6faef6fec1a38f", "494eeb99abfe14fbc16 602d4ef606e9442ebc11eb3c98a9205fb361c0b53b1ba344c3ff9b8c6e74e46c 1d113171f262d61fbc79457001ce87cecf2733fa4c5fa". Set "_InfoPointer" to address of info structure for "KI_DSAPrivate". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_DSAPrivate". Check equality of info structure for "KI_DSAPrivate" with expected info structure for "KI_DSAPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the DSA private BER encoding Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DSAPrivateBER" initialized from "3081cb0201003081aa06052b0e03020c3081a002020200024100ea5fd4a8924 fe8836afac54ab0b05a98e1c1f39ab2987a896b181764f2b4530a79de272c91c 7d76bc328f12083e4d4532deda791a52145144e0c0c320b6958db021500e4e38 dc8f10cc7d4a9b3e34b1c6faef6fec1a38f0240494eeb99abfe14fbc16602d4e f606e9442ebc11eb3c98a9205fb361c0b53b1ba344c3ff9b8c6e74e46c1d1131 71f262d61fbc79457001ce87cecf2733fa4c5fa0419301702150091eced86550 0bed9485a971552c59e695f6c9365". Set "_InfoPointer" to address of info structure for "KI_DSAPrivateBER". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_DSAPrivateBER". Check equality of info structure for "KI_DSAPrivateBER" with expected info structure for "KI_DSAPrivateBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now use the generated key in signing and verifying Create buffer "signature" of decimal value "128" bytes. Create algorithm object "dsaSigner". Call B_CreateAlgorithmObject passing "dsaSigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaSigner" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1687 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: check the BER encoding of AI_DSAWithSHA1 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DSAWithSHA1_BER" initialized from "300906052b0e03021b0500". Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1_BER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "dsaSigner" and "AI_DSAWithSHA1_BER". Check equality of info structure for "AI_DSAWithSHA1_BER" with expected info structure for "AI_DSAWithSHA1_BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaVerifier". Call B_CreateAlgorithmObject passing "dsaVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1_BER" initialized from "300906052b0e03021b0500". Call B_SetAlgorithmInfo passing "dsaVerifier" and "AI_DSAWithSHA1_BER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: Sign 6 bytes Note: 30 2d Note: 02 14 70 02 56 94 ea 37 57 9f a5 aa 66 42 18 55 6a 84 2a Note: 94 de e5 Note: 02 15 00 8f ce 55 d6 46 28 15 cd 06 cd da 19 52 19 bc b6 Note: b4 d7 69 43 Call Call B_SignInit passing "dsaSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1688 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302c02142bf6bdccb7c046f9687832414e721599e8a2a22102146ad9ba1662f 15f39ec29e2ec6beaa62b468dd244". Note: Verify the signature of the seed Call Call B_VerifyInit passing "dsaVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2: Sign 3 bytes Set buffer "seed" to hex value "616263". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302e021500a526a883b505202b6d202e1b5326c6ba8e8d84040215009c1595a 36310d46ab6dfe348d1ad254c50b569a2". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first Baldwin Informational, Expires 12/25/1999 1689 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 3: Sign 56 bytes Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a68696a6b696a6b6c6a6b6c6d6b6c6d6e6c6d6e6f 6d6e6f706e6f7071". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302d021423d7d1e8361e967fcd9691bc5b7971f44bb655c70215008f6b169fc ebb60f376ab8f44db930cbd04b24290". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1690 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 4: Sign 65 bytes Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f7071616263616263". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302d021500ba8aeb0e312c67df007685c5e2a4d48087c209f50214185f48033 9a63bad75f32061b18ea767186b736e". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 5: Sign 89 bytes Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f707161626361626361626368696a61626368696a616263 68696a61626368696a". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1691 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302d021500beedc2889974cdef1e46acc57e860ab7f63be1430214709896916 1839cc37b8d70f0ff8998d0ec731eaf". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 6: Sign 122 bytes Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f707161626361626361626368696a61626368696a616263 68696a61626368696a696a6b6c6a6b6c6d6b6c6d696a6b6c6a6b6c6d6b6c6d69 6a6b6c6a6b6c6d6b6c6d". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1692 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "signature". Check equality of buffer "signature" with hex value "302d021451c77e2eb7053b7d12a963b724ecafe745f3d913021500d3078b71d 59e0334c53c2a1df17c1cf2470e157d". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 7: Sign 164 bytes Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f707161626361626361626368696a61626368696a616263 68696a61626368696a696a6b6c6a6b6c6d6b6c6d696a6b6c6a6b6c6d6b6c6d69 6a6b6c6a6b6c6d6b6c6d56667656667686566676566676865666765666768656 6676566676865666765666768656667656667686". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302d02146cbab1a8474655af63e5e59ba5e0e6d4c14eb28b021500bbd5b03aa 76b58bea84b591985cca6063d6a711d". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first Baldwin Informational, Expires 12/25/1999 1693 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 8: Sign 246 bytes Set buffer "seed" to hex value "3081f33081aa06052b0e03020c3081a0 02020200024100b7061d628cad126c544941b12c4de907816ebdc073cd0a2176 4494e87171c112ad08a3ad2d6517bd7a793052dfbc82d77d4379e888da147e31 4db2c04dcdc119021500f9f71fb9ffeccc1c0c01715df92bcf2fcf484b570240 1dda6509b478f574227f030077fe85bf3764cbaa283c343d0362537060f4d757 472b60950e4cb06e05f3fe1f339c546cb8e48a76f25694a505478ba309ab677e 03440002410082c229ec57d9701b2b62c010c6d2628fed746dd1efaa0a7f1ca9 f6473ec6cb3ef4114f6d27f61b34535050bcd23c8ab765089b4f7aa685192d57 cd1b10412818". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302c02146112f5e59a1abbec13bc175a2e3008c25c8677d90214264ba1bdcde 6bd3367677d8e824f86fe8d33e492". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first Baldwin Informational, Expires 12/25/1999 1694 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 9: Sign 273 bytes Set buffer "seed" to hex value "3082010d0201003081aa06052b0e0302 0c3081a002020200024100b7061d628cad126c544941b12c4de907816ebdc073 cd0a21764494e87171c112ad08a3ad2d6517bd7a793052dfbc82d77d4379e888 da147e314db2c04dcdc119021500f9f71fb9ffeccc1c0c01715df92bcf2fcf48 4b5702401dda6509b478f574227f030077fe85bf3764cbaa283c343d03625370 60f4d757472b60950e4cb06e05f3fe1f339c546cb8e48a76f25694a505478ba3 09ab677e045b305902410082c229ec57d9701b2b62c010c6d2628fed746dd1ef aa0a7f1ca9f6473ec6cb3ef4114f6d27f61b34535050bcd23c8ab765089b4f7a a685192d57cd1b10412818021414c40daa97b8ddec7dd762db1e59f70cc8efb6 96". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302c02147a4edc7dd0164b2967bdb385e845ad8418e1be5702144a6e017efab 493a6d0ce5196a3cf36df2807768d". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1695 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: Case 10: Sign 412 bytes Set buffer "seed" to hex value "3082019830820122020446000001300d 06092a864886f70d0101020500305f310b30090603550406130255533120301e 060355040a131752534120446174612053656375726974792c20496e632e312e 302c060355040b13254c6f77204173737572616e636520436572746966696361 74696f6e20417574686f72697479301e170d3932303930393138353030355a17 0d3934303930393138353030345a302c310b3009060355040613025553311d30 1b060355040a13144578616d706c65204f7267616e697a6174696f6e305c300d 06092a864886f70d0101010500034b003048024100c5596591f670ac387fbabf f6c0d083e593220e0bc3a00f975b9eb7ad514c777bae14252df83058747f177e ac9c1da5394d33ebd8de9216a41c69d2d4838fa4510203010001300d06092a86 4886f70d0101020500036100738e6d829230f4376aa94c20500bf15342898014 facad1d87148e72812d6f195700f1f1c42378208038cfa96d4d77baafab2dcdc 7c5a8031fc678e789a35c5cee985ece445fe8bb258bccbd92802ddecc826bc6a d67664c48e3cc5a26d8f7495". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302d02150098d5e65a7da77ed45ea97198efa6eb66c342d121021457c53415b 6f5a20b593bd803229998aced2ee4e1". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1696 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Now use the generated key in raw signing and verifying Create algorithm object "dsaRawSigner". Call B_CreateAlgorithmObject passing "dsaRawSigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawSigner" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawVerifier". Call B_CreateAlgorithmObject passing "dsaRawVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawVerifier" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "sha1Digester". Call B_CreateAlgorithmObject passing "sha1Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "sha1Digester" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "digest" of decimal value "20" bytes. Note: Case 11: Raw Sign 6 bytes Set buffer "seed" to hex value "112233445566". Call Call B_DigestInit passing "sha1Digester" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1697 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "sha1Digester" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digester" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Call Call B_SignInit passing "dsaRawSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSigner" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "7f4b4d77b3231b35ff067e4d1edf904276cf7c4c301834e3dfc929aa7008e73 b9e3296d87f567fb9". Note: Verify the signature of the seed Call Call B_VerifyInit passing "dsaRawVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaRawVerifier" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1698 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_VerifyFinal passing "dsaRawVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 12: Raw Sign 3 bytes Set buffer "seed" to hex value "616263". Call Call B_DigestInit passing "sha1Digester" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digester" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digester" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Call Call B_SignInit passing "dsaRawSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSigner" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value Baldwin Informational, Expires 12/25/1999 1699 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "1532d483b13b64c2da51fd78089ad80a47451cbd458cbedd73af09dc9327319 d5b2ca96f5f203b63". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaRawVerifier" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 13: Raw Sign 56 bytes Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a68696a6b696a6b6c6a6b6c6d6b6c6d6e6c6d6e6f 6d6e6f706e6f7071". Call Call B_DigestInit passing "sha1Digester" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digester" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digester" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Call Call B_SignInit passing "dsaRawSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSigner" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1700 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "930c1a72ef1c74e7109a686982a267ec07d1aa0fdde2cf3b9a03b0d5d708d72 e6b34211e78db2708". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaRawVerifier" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 14: Raw Sign 65 bytes Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f7071616263616263". Call Call B_DigestInit passing "sha1Digester" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digester" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digester" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1701 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Call Call B_SignInit passing "dsaRawSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSigner" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "2eb3d704b6c8f95c19cc146e37bc2f98139143658eb3bbdb638264f7af77dfa 1b2a56fde40352d80". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaRawVerifier" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 15: Raw Sign 89 bytes Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f707161626361626361626368696a61626368696a616263 68696a61626368696a". Baldwin Informational, Expires 12/25/1999 1702 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DigestInit passing "sha1Digester" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digester" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digester" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Call Call B_SignInit passing "dsaRawSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSigner" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "2e67d7a771b306f6c421938dc88b55e31b3e1abbca1917f196ae7504ab9b33a 66b0e3eeb1760d651". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaRawVerifier" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerifier" and address of Baldwin Informational, Expires 12/25/1999 1703 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 16: Raw Sign 122 bytes Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f707161626361626361626368696a61626368696a616263 68696a61626368696a696a6b6c6a6b6c6d6b6c6d696a6b6c6a6b6c6d6b6c6d69 6a6b6c6a6b6c6d6b6c6d". Call Call B_DigestInit passing "sha1Digester" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digester" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digester" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Call Call B_SignInit passing "dsaRawSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSigner" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1704 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "0e98cf6a25882eb3294bff7787b69a089af6eb6c748a99ef825ae64366f8315 75613fd2c51df9fdc". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaRawVerifier" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 17: Raw Sign 164 bytes Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f707161626361626361626368696a61626368696a616263 68696a61626368696a696a6b6c6a6b6c6d6b6c6d696a6b6c6a6b6c6d6b6c6d69 6a6b6c6a6b6c6d6b6c6d56667656667686566676566676865666765666768656 6676566676865666765666768656667656667686". Call Call B_DigestInit passing "sha1Digester" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digester" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digester" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Call Call B_SignInit passing "dsaRawSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1705 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSigner" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "616f9caa0a5ae490df5c3b3ffcd989d2f6b557927bc7084bc9356d7d33b7bc8 fd2bbdc3d0364f18f". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaRawVerifier" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 18: Raw Sign 246 bytes Set buffer "seed" to hex value "3081f33081aa06052b0e03020c3081a0 02020200024100b7061d628cad126c544941b12c4de907816ebdc073cd0a2176 4494e87171c112ad08a3ad2d6517bd7a793052dfbc82d77d4379e888da147e31 4db2c04dcdc119021500f9f71fb9ffeccc1c0c01715df92bcf2fcf484b570240 1dda6509b478f574227f030077fe85bf3764cbaa283c343d0362537060f4d757 472b60950e4cb06e05f3fe1f339c546cb8e48a76f25694a505478ba309ab677e 03440002410082c229ec57d9701b2b62c010c6d2628fed746dd1efaa0a7f1ca9 f6473ec6cb3ef4114f6d27f61b34535050bcd23c8ab765089b4f7aa685192d57 cd1b10412818". Call Call B_DigestInit passing "sha1Digester" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1706 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digester" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digester" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Call Call B_SignInit passing "dsaRawSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSigner" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "3083073d1f017b2b82788c275c74fac18dc201568bd3c075953e0da1a091e58 71b982c4bb9886315". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaRawVerifier" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1707 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 19: Raw Sign 273 bytes Set buffer "seed" to hex value "3082010d0201003081aa06052b0e0302 0c3081a002020200024100b7061d628cad126c544941b12c4de907816ebdc073 cd0a21764494e87171c112ad08a3ad2d6517bd7a793052dfbc82d77d4379e888 da147e314db2c04dcdc119021500f9f71fb9ffeccc1c0c01715df92bcf2fcf48 4b5702401dda6509b478f574227f030077fe85bf3764cbaa283c343d03625370 60f4d757472b60950e4cb06e05f3fe1f339c546cb8e48a76f25694a505478ba3 09ab677e045b305902410082c229ec57d9701b2b62c010c6d2628fed746dd1ef aa0a7f1ca9f6473ec6cb3ef4114f6d27f61b34535050bcd23c8ab765089b4f7a a685192d57cd1b10412818021414c40daa97b8ddec7dd762db1e59f70cc8efb6 96". Call Call B_DigestInit passing "sha1Digester" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digester" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digester" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Call Call B_SignInit passing "dsaRawSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSigner" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1708 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "0c7a14dff2faabe15a2fe93b99436525cabe3d783d47a2e668a070489c2c98c 1946e4510231fb251". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaRawVerifier" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 20: Raw Sign 412 bytes Set buffer "seed" to hex value "3082019830820122020446000001300d 06092a864886f70d0101020500305f310b30090603550406130255533120301e 060355040a131752534120446174612053656375726974792c20496e632e312e 302c060355040b13254c6f77204173737572616e636520436572746966696361 74696f6e20417574686f72697479301e170d3932303930393138353030355a17 0d3934303930393138353030345a302c310b3009060355040613025553311d30 1b060355040a13144578616d706c65204f7267616e697a6174696f6e305c300d 06092a864886f70d0101010500034b003048024100c5596591f670ac387fbabf f6c0d083e593220e0bc3a00f975b9eb7ad514c777bae14252df83058747f177e ac9c1da5394d33ebd8de9216a41c69d2d4838fa4510203010001300d06092a86 4886f70d0101020500036100738e6d829230f4376aa94c20500bf15342898014 facad1d87148e72812d6f195700f1f1c42378208038cfa96d4d77baafab2dcdc 7c5a8031fc678e789a35c5cee985ece445fe8bb258bccbd92802ddecc826bc6a d67664c48e3cc5a26d8f7495". Call Call B_DigestInit passing "sha1Digester" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digester" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digester" and address of next Baldwin Informational, Expires 12/25/1999 1709 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Call Call B_SignInit passing "dsaRawSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSigner" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "b946e2f3ed39e446ca87cf32e1db73015da775662f6be8b7516ebd3b27726e7 215f6ea01eafcb84d". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaRawVerifier" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFDSA00". This is the start of test case "TFDSA01". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1710 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Key length-based functional test for Note: AI_DSAParamGen, AI_DSAKeyGen, Note: KI_DSAPublic, KI_DSAPublicBER, KI_DSAPrivate, Note: KI_DSAPrivateBER Note: AI_DSAWithSHA1, AI_DSAWithSHA1_BER Note: Depending on AI_MD5Random algorithm Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_DSA_PARAM_GEN", "AM_DSA_KEY_GEN", "AM_SHA", "AM_DSA_VERIFY", "AM_DSA_SIGN", "NULL_PTR". Note: Set up global objects Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "26" bytes. Set buffer "seed" to hex value "01020304050607080910111213141516 171819202122232425". Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "message" of decimal value "512" bytes. Set buffer "message" with string value "Now is the time for all Baldwin Informational, Expires 12/25/1999 1711 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 good men ...". Create buffer "signature" of decimal value "128" bytes. Create algorithm object "dsaSign". Call B_CreateAlgorithmObject passing "dsaSign". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaSign" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaVerify". Call B_CreateAlgorithmObject passing "dsaVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaVerify" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawSign". Call B_CreateAlgorithmObject passing "dsaRawSign". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawSign" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawVerify". Call B_CreateAlgorithmObject passing "dsaRawVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawVerify" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1712 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "sha1Digest". Call B_CreateAlgorithmObject passing "sha1Digest". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "sha1Digest" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try key sizes from 512 thru 2048 in increments of 256 Create buffer "keySize" of decimal value "4" bytes. Set buffer "keySize" to hex value "00000200". Begin a loop of decimal value "7" iterations. Note: Generate DSA parameters Create algorithm object "dsaParamGen". Call B_CreateAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaKeyGen". Call B_CreateAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAParamGen" initialized from contents of buffer "keySize". Call B_SetAlgorithmInfo passing "dsaParamGen" and "AI_DSAParamGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "dsaParamGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateParameters passing "dsaParamGen" and "dsaKeyGen" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1713 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Generate DSA keypair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "dsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "dsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Sign the message Call Call B_SignInit passing "dsaSign" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaSign" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSign" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the signature Call Call B_VerifyInit passing "dsaVerify" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1714 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaVerify" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerify" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Digest the message Call Call B_DigestInit passing "sha1Digest" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digest" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digest" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Note: Do a "raw" signature Call Call B_SignInit passing "dsaRawSign" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSign" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSign" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and Baldwin Informational, Expires 12/25/1999 1715 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the "raw" signature Call Call B_VerifyInit passing "dsaRawVerify" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaRawVerify" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerify" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Clean up loop objects Call Call B_DestroyAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Increment key size Increment buffer "keySize" by decimal value "256". End the loop and display execution times. Baldwin Informational, Expires 12/25/1999 1716 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 This is the end of test case "TFDSA01". This is the start of test case "TFDSA02". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Key length-based functional test for Note: AI_DSAParamGen, AI_DSAKeyGen, Note: AI_DSAWithSHA1, AI_DSA Note: Depending on AI_MD5Random algorithm Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_DSA_PARAM_GEN", "AM_DSA_KEY_GEN", "AM_SHA", "AM_DSA_VERIFY", "AM_DSA_SIGN", "NULL_PTR". Note: Set up global objects Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "26" bytes. Set buffer "seed" to hex value "01020304050607080910111213141516 171819202122232425". Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1717 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "message" of decimal value "512" bytes. Set buffer "message" with string value "Now is the time for all good men ...". Create buffer "signature" of decimal value "128" bytes. Create algorithm object "dsaSign". Call B_CreateAlgorithmObject passing "dsaSign". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaSign" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaVerify". Call B_CreateAlgorithmObject passing "dsaVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaVerify" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawSign". Call B_CreateAlgorithmObject passing "dsaRawSign". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawSign" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawVerify". Call B_CreateAlgorithmObject passing "dsaRawVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Baldwin Informational, Expires 12/25/1999 1718 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "dsaRawVerify" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "sha1Digest". Call B_CreateAlgorithmObject passing "sha1Digest". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "sha1Digest" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try key sizes from 513 thru 1062 in increments of 61 Create buffer "keySize" of decimal value "4" bytes. Set buffer "keySize" to hex value "00000201". Begin a loop of decimal value "9" iterations. Note: Generate DSA parameters Create algorithm object "dsaParamGen". Call B_CreateAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaKeyGen". Call B_CreateAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAParamGen" initialized from contents of buffer "keySize". Call B_SetAlgorithmInfo passing "dsaParamGen" and "AI_DSAParamGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "dsaParamGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateParameters passing "dsaParamGen" and "dsaKeyGen" and "random" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1719 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DSA keypair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "dsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "dsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Sign the message Call Call B_SignInit passing "dsaSign" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaSign" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSign" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the signature Call Call B_VerifyInit passing "dsaVerify" and "publicKey" and Baldwin Informational, Expires 12/25/1999 1720 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaVerify" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerify" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Digest the message Call Call B_DigestInit passing "sha1Digest" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digest" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digest" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Note: Do a "raw" signature Call Call B_SignInit passing "dsaRawSign" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSign" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1721 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SignFinal passing "dsaRawSign" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the "raw" signature Call Call B_VerifyInit passing "dsaRawVerify" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaRawVerify" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerify" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Clean up loop objects Call Call B_DestroyAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Increment key size Increment buffer "keySize" by decimal value "61". Baldwin Informational, Expires 12/25/1999 1722 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 End the loop and display execution times. This is the end of test case "TFDSA02". This is the start of test case "TFDSA03". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Key length-based functional test for Note: AI_DSAParamGen, AI_DSAKeyGen, Note: AI_DSAWithSHA1, AI_DSA Note: Depending on AI_MD5Random algorithm Note: Set up global objects Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "26" bytes. Set buffer "seed" to hex value "01020304050607080910111213141516 171819202122232425". Set "_Chooser" to "AM_MD5_RANDOM", "AM_DSA_PARAM_GEN", "AM_DSA_KEY_GEN", "AM_SHA", "AM_DSA_VERIFY", "AM_DSA_SIGN", "NULL_PTR". Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1723 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "message" of decimal value "512" bytes. Set buffer "message" with string value "Now is the time for all good men ...". Create buffer "signature" of decimal value "128" bytes. Create algorithm object "dsaSign". Call B_CreateAlgorithmObject passing "dsaSign". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaSign" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaVerify". Call B_CreateAlgorithmObject passing "dsaVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaVerify" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawSign". Call B_CreateAlgorithmObject passing "dsaRawSign". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawSign" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawVerify". Call B_CreateAlgorithmObject passing "dsaRawVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Baldwin Informational, Expires 12/25/1999 1724 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "dsaRawVerify" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "sha1Digest". Call B_CreateAlgorithmObject passing "sha1Digest". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "sha1Digest" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try key sizes from 1025 thru 2048 in increments of 341 Create buffer "keySize" of decimal value "4" bytes. Set buffer "keySize" to hex value "00000401". Begin a loop of decimal value "4" iterations. Note: Generate DSA parameters Create algorithm object "dsaParamGen". Call B_CreateAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaKeyGen". Call B_CreateAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAParamGen" initialized from contents of buffer "keySize". Call B_SetAlgorithmInfo passing "dsaParamGen" and "AI_DSAParamGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_Chooser" to "AM_DSA_PARAM_GEN", "NULL_PTR". Call Call B_GenerateInit passing "dsaParamGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1725 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_GenerateParameters passing "dsaParamGen" and "dsaKeyGen" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DSA keypair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_Chooser" to "AM_DSA_KEY_GEN", "NULL_PTR". Call Call B_GenerateInit passing "dsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "dsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Sign the message Set "_Chooser" to "AM_SHA", "AM_DSA_SIGN", "NULL_PTR". Call Call B_SignInit passing "dsaSign" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaSign" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSign" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1726 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the signature Set "_Chooser" to "AM_SHA", "AM_DSA_VERIFY", "NULL_PTR". Call Call B_VerifyInit passing "dsaVerify" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaVerify" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerify" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Digest the message Call Call B_DigestInit passing "sha1Digest" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digest" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digest" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Note: Do a "raw" signature Call Call B_SignInit passing "dsaRawSign" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1727 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSign" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSign" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the "raw" signature Call Call B_VerifyInit passing "dsaRawVerify" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaRawVerify" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerify" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Clean up loop objects Call Call B_DestroyAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1728 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Increment key size Increment buffer "keySize" by decimal value "341". End the loop and display execution times. This is the end of test case "TFDSA03". This is the start of test case "TFDSA04". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: functional test for Note: AI_DSAWithSHA1 Note: Depending on AI_MD5Random algorithm Note: Set up global objects Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "26" bytes. Set buffer "seed" to hex value "01020304050607080910111213141516 171819202122232425". Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1729 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Create buffer "message" of decimal value "512" bytes. Set buffer "message" with string value "Now is the time for all good men ...". Create buffer "signature" of decimal value "128" bytes. Create algorithm object "dsaSign". Call B_CreateAlgorithmObject passing "dsaSign". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaSign" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaVerify". Call B_CreateAlgorithmObject passing "dsaVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaVerify" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawSign". Call B_CreateAlgorithmObject passing "dsaRawSign". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawSign" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawVerify". Call B_CreateAlgorithmObject passing "dsaRawVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1730 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawVerify" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "sha1Digest". Call B_CreateAlgorithmObject passing "sha1Digest". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "sha1Digest" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPublicBER" initialized from "3081f33081aa06052b0e03020c30 81a002020200024100b7061d628cad126c544941b12c4de907816ebdc073cd0a 21764494e87171c112ad08a3ad2d6517bd7a793052dfbc82d77d4379e888da14 7e314db2c04dcdc119021500f9f71fb9ffeccc1c0c01715df92bcf2fcf484b57 02401dda6509b478f574227f030077fe85bf3764cbaa283c343d0362537060f4 d757472b60950e4cb06e05f3fe1f339c546cb8e48a76f25694a505478ba309ab 677e03440002410082c229ec57d9701b2b62c010c6d2628fed746dd1efaa0a7f 1ca9f6473ec6cb3ef4114f6d27f61b34535050bcd23c8ab765089b4f7aa68519 2d57cd1b10412818". Call B_SetKeyInfo passing "publicKey" and "KI_DSAPublicBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPrivate" initialized from "14c40daa97b8ddec7dd762db1e59f7 Baldwin Informational, Expires 12/25/1999 1731 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 0cc8efb696", "b7061d628cad126c544941b12c4de907816ebdc073cd0a2176 4494e87171c112ad08a3ad2d6517bd7a793052dfbc82d77d4379e888da147e31 4db2c04dcdc119", "f9f71fb9ffeccc1c0c01715df92bcf2fcf484b57", "1dda6509b478f574227f030077fe85bf3764cbaa283c343d0362537060f4d75 7472b60950e4cb06e05f3fe1f339c546cb8e48a76f25694a505478ba309ab677 e". Call B_SetKeyInfo passing "privateKey" and "KI_DSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Sign the message Call Call B_SignInit passing "dsaSign" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaSign" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSign" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the signature Set "_Chooser" to "AM_SHA", "AM_DSA_VERIFY", "NULL_PTR". Call Call B_VerifyInit passing "dsaVerify" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaVerify" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerify" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and Baldwin Informational, Expires 12/25/1999 1732 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "signature". Note: Digest the message Call Call B_DigestInit passing "sha1Digest" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digest" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digest" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Note: Do a "raw" signature Call Call B_SignInit passing "dsaRawSign" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSign" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSign" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the "raw" signature Baldwin Informational, Expires 12/25/1999 1733 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_VerifyInit passing "dsaRawVerify" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaRawVerify" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerify" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Display buffer "signature". Note: Clean up loop objects Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFDSA04". This is the start of test case "TFDSA05". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Key length-based functional test for Note: AI_DSAParamGen, AI_DSAKeyGen, Note: AI_DSAWithSHA1, AI_DSA Note: Depending on AI_MD5Random algorithm Note: Set up global objects Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1734 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "26" bytes. Set buffer "seed" to hex value "01020304050607080910111213141516 171819202122232425". Set "_Chooser" to "AM_MD5_RANDOM", "AM_DSA_PARAM_GEN", "AM_DSA_KEY_GEN", "AM_SHA", "AM_DSA_VERIFY", "AM_DSA_SIGN", "NULL_PTR". Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "message" of decimal value "512" bytes. Set buffer "message" with string value "Now is the time for all good men ...". Create buffer "signature" of decimal value "128" bytes. Create algorithm object "dsaSign". Call B_CreateAlgorithmObject passing "dsaSign". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaSign" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaVerify". Call B_CreateAlgorithmObject passing "dsaVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1735 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaVerify" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawSign". Call B_CreateAlgorithmObject passing "dsaRawSign". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawSign" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaRawVerify". Call B_CreateAlgorithmObject passing "dsaRawVerify". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSA" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaRawVerify" and "AI_DSA" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "sha1Digest". Call B_CreateAlgorithmObject passing "sha1Digest". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "sha1Digest" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Try key sizes from 1025 thru 1366 in increments of 341 Create buffer "keySize" of decimal value "4" bytes. Set buffer "keySize" to hex value "00000401". Baldwin Informational, Expires 12/25/1999 1736 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Begin a loop of decimal value "2" iterations. Note: Generate DSA parameters Create algorithm object "dsaParamGen". Call B_CreateAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaKeyGen". Call B_CreateAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAParamGen" initialized from contents of buffer "keySize". Call B_SetAlgorithmInfo passing "dsaParamGen" and "AI_DSAParamGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_Chooser" to "AM_DSA_PARAM_GEN", "NULL_PTR". Call Call B_GenerateInit passing "dsaParamGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateParameters passing "dsaParamGen" and "dsaKeyGen" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DSA keypair Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_Chooser" to "AM_DSA_KEY_GEN", "NULL_PTR". Call Call B_GenerateInit passing "dsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1737 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_GenerateKeypair passing "dsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Sign the message Set "_Chooser" to "AM_SHA", "AM_DSA_SIGN", "NULL_PTR". Call Call B_SignInit passing "dsaSign" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaSign" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSign" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the signature Set "_Chooser" to "AM_SHA", "AM_DSA_VERIFY", "NULL_PTR". Call Call B_VerifyInit passing "dsaVerify" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaVerify" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerify" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1738 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Digest the message Call Call B_DigestInit passing "sha1Digest" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "sha1Digest" and address of first initialized byte in buffer "message" and length of initialized bytes in buffer "message" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "sha1Digest" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Note: Do a "raw" signature Call Call B_SignInit passing "dsaRawSign" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaRawSign" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaRawSign" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Note: Verify the "raw" signature Call Call B_VerifyInit passing "dsaRawVerify" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1739 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_VerifyUpdate passing "dsaRawVerify" and address of first initialized byte in buffer "digest" and length of initialized bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaRawVerify" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Clean up loop objects Call Call B_DestroyAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Increment key size Increment buffer "keySize" by decimal value "341". End the loop and display execution times. This is the end of test case "TFDSA05". This is the start of test case "TFDSA06". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for KI_DSAPrivateX957BER and its Note: interoperability with KI_DSAPrivateBER Note: Start with GlobalInit for code resource Baldwin Informational, Expires 12/25/1999 1740 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "AM_MD5_RANDOM", "AM_DSA_PARAM_GEN", "AM_DSA_KEY_GEN", "AM_SHA", "AM_DSA_VERIFY", "AM_DSA_SIGN", "NULL_PTR". Note: Set up random object for param and key generation Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "512" bytes. Set buffer "seed" to hex value "112233445566". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DSA parameter Create algorithm object "dsaParamGen". Call B_CreateAlgorithmObject passing "dsaParamGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAParamGen" initialized from "512". Call B_SetAlgorithmInfo passing "dsaParamGen" and "AI_DSAParamGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaParams". Call B_CreateAlgorithmObject passing "dsaParams". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1741 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "dsaParamGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateParameters passing "dsaParamGen" and "dsaParams" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DSAKeyGen" initialized from "ea5fd4a8924fe8836afac54ab0b05a98e1c1f39ab2987a896b181764f2b4530 a79de272c91c7d76bc328f12083e4d4532deda791a52145144e0c0c320b6958d b", "e4e38dc8f10cc7d4a9b3e34b1c6faef6fec1a38f", "494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9205fb361c0b53b1b a344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce87cecf2733fa4c5f a". Set "_InfoPointer" to address of info structure for "AI_DSAKeyGen". Call B_GetAlgorithmInfo passing "_InfoPointer" and "dsaParams" and "AI_DSAKeyGen". Check equality of info structure for "AI_DSAKeyGen" with expected info structure for "AI_DSAKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate DSA Keypair Create algorithm object "dsaKeyGen". Call B_CreateAlgorithmObject passing "dsaKeyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAKeyGen" initialized from "ea5fd4a8924fe8836afac54ab0b05a9 8e1c1f39ab2987a896b181764f2b4530a79de272c91c7d76bc328f12083e4d45 32deda791a52145144e0c0c320b6958db", "e4e38dc8f10cc7d4a9b3e34b1c6 faef6fec1a38f", "494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9 205fb361c0b53b1ba344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce 87cecf2733fa4c5fa". Call B_SetAlgorithmInfo passing "dsaKeyGen" and "AI_DSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1742 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "dsaKeyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateKeypair passing "dsaKeyGen" and "publicKey" and "privateKey" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check the DSA public Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DSAPublic" initialized from "9060867cb048004b7555b2af386fc16aece4a45898654f52c1b29ecea188b7f f48d71c9058631c27d10e0af71c5eddb90f835a2be78eaeebbfff9304f167f14 4", "ea5fd4a8924fe8836afac54ab0b05a98e1c1f39ab2987a896b181764f2b 4530a79de272c91c7d76bc328f12083e4d4532deda791a52145144e0c0c320b6 958db", "e4e38dc8f10cc7d4a9b3e34b1c6faef6fec1a38f", "494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9205fb361c0b53b1b a344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce87cecf2733fa4c5f a". Set "_InfoPointer" to address of info structure for "KI_DSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_DSAPublic". Check equality of info structure for "KI_DSAPublic" with expected info structure for "KI_DSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check DSA public key BER encoding Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DSAPublicBER" initialized from "3081f33081aa06052b0e03020c3081a002020200024100ea5fd4a8924fe8836 afac54ab0b05a98e1c1f39ab2987a896b181764f2b4530a79de272c91c7d76bc 328f12083e4d4532deda791a52145144e0c0c320b6958db021500e4e38dc8f10 cc7d4a9b3e34b1c6faef6fec1a38f0240494eeb99abfe14fbc16602d4ef606e9 442ebc11eb3c98a9205fb361c0b53b1ba344c3ff9b8c6e74e46c1d113171f262 d61fbc79457001ce87cecf2733fa4c5fa0344000241009060867cb048004b755 5b2af386fc16aece4a45898654f52c1b29ecea188b7ff48d71c9058631c27d10 e0af71c5eddb90f835a2be78eaeebbfff9304f167f144". Set "_InfoPointer" to address of info structure for "KI_DSAPublicBER". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and Baldwin Informational, Expires 12/25/1999 1743 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "KI_DSAPublicBER". Check equality of info structure for "KI_DSAPublicBER" with expected info structure for "KI_DSAPublicBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check DSA X9.57 public BER encoding Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DSAPublicX957BER" initialized from "3081f13081a806072a8648ce38040130819c024100ea5fd4a8924fe8836afac 54ab0b05a98e1c1f39ab2987a896b181764f2b4530a79de272c91c7d76bc328f 12083e4d4532deda791a52145144e0c0c320b6958db021500e4e38dc8f10cc7d 4a9b3e34b1c6faef6fec1a38f0240494eeb99abfe14fbc16602d4ef606e9442e bc11eb3c98a9205fb361c0b53b1ba344c3ff9b8c6e74e46c1d113171f262d61f bc79457001ce87cecf2733fa4c5fa0344000241009060867cb048004b7555b2a f386fc16aece4a45898654f52c1b29ecea188b7ff48d71c9058631c27d10e0af 71c5eddb90f835a2be78eaeebbfff9304f167f144". Set "_InfoPointer" to address of info structure for "KI_DSAPublicX957BER". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_DSAPublicX957BER". Check equality of info structure for "KI_DSAPublicX957BER" with expected info structure for "KI_DSAPublicX957BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check DSA private Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DSAPrivate" initialized from "91eced865500bed9485a971552c59e695f6c9365", "ea5fd4a8924fe8836af ac54ab0b05a98e1c1f39ab2987a896b181764f2b4530a79de272c91c7d76bc32 8f12083e4d4532deda791a52145144e0c0c320b6958db", "e4e38dc8f10cc7d4a9b3e34b1c6faef6fec1a38f", "494eeb99abfe14fbc16 602d4ef606e9442ebc11eb3c98a9205fb361c0b53b1ba344c3ff9b8c6e74e46c 1d113171f262d61fbc79457001ce87cecf2733fa4c5fa". Set "_InfoPointer" to address of info structure for "KI_DSAPrivate". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_DSAPrivate". Check equality of info structure for "KI_DSAPrivate" with expected info structure for "KI_DSAPrivate". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check DSA private BER encoding Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DSAPrivateBER" initialized from "3081cb0201003081aa06052b0e03020c3081a002020200024100ea5fd4a8924 fe8836afac54ab0b05a98e1c1f39ab2987a896b181764f2b4530a79de272c91c 7d76bc328f12083e4d4532deda791a52145144e0c0c320b6958db021500e4e38 Baldwin Informational, Expires 12/25/1999 1744 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 dc8f10cc7d4a9b3e34b1c6faef6fec1a38f0240494eeb99abfe14fbc16602d4e f606e9442ebc11eb3c98a9205fb361c0b53b1ba344c3ff9b8c6e74e46c1d1131 71f262d61fbc79457001ce87cecf2733fa4c5fa0419301702150091eced86550 0bed9485a971552c59e695f6c9365". Set "_InfoPointer" to address of info structure for "KI_DSAPrivateBER". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_DSAPrivateBER". Check equality of info structure for "KI_DSAPrivateBER" with expected info structure for "KI_DSAPrivateBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check DSA X9.57 private BER encoding Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DSAPrivateX957BER" initialized from "3081c70201003081a806072a8648ce38040130819c024100ea5fd4a8924fe88 36afac54ab0b05a98e1c1f39ab2987a896b181764f2b4530a79de272c91c7d76 bc328f12083e4d4532deda791a52145144e0c0c320b6958db021500e4e38dc8f 10cc7d4a9b3e34b1c6faef6fec1a38f0240494eeb99abfe14fbc16602d4ef606 e9442ebc11eb3c98a9205fb361c0b53b1ba344c3ff9b8c6e74e46c1d113171f2 62d61fbc79457001ce87cecf2733fa4c5fa041702150091eced865500bed9485 a971552c59e695f6c9365". Set "_InfoPointer" to address of info structure for "KI_DSAPrivateX957BER". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_DSAPrivateX957BER". Check equality of info structure for "KI_DSAPrivateX957BER" with expected info structure for "KI_DSAPrivateX957BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Check interoperability with Crypto-J Note: Read in X9.30 BER encoded Private key Create key object "privateKeyJX930". Call B_CreateKeyObject passing "privateKeyJX930". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPrivateBER" initialized from "3081CB0201003081AA06052B0E0 3020C3081A002020200024100E300CA44A4D69F6F6057082EE29B6384E835A8A 870BE33A01761E3C8C99FF696FDD7521E6BB2279A52ED3A6E6D6DFE399AEB428 390A91D1E359697E44CE63A55021500E2170D227C2D6D1A64CBDD5D3075CDDB2 349D7EF024025B04ACFFC7909200157261692E053046EFF2D6C2D31DC2CCCAEF 3D3BF6A00A4E5C7429B09B31BA6E24AD866A1F68B4B21EADF4E38BABB914C13E 35F95EB34D304193017021500ACF460E27D9586E1C2F05CB0BC9E35F687B5844 C". Call B_SetKeyInfo passing "privateKeyJX930" and "KI_DSAPrivateBER" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1745 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Read in X9.30 BER encoded Public key Create key object "publicKeyJX930". Call B_CreateKeyObject passing "publicKeyJX930". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPublicBER" initialized from "3081F33081AA06052B0E03020C30 81A002020200024100E300CA44A4D69F6F6057082EE29B6384E835A8A870BE33 A01761E3C8C99FF696FDD7521E6BB2279A52ED3A6E6D6DFE399AEB428390A91D 1E359697E44CE63A55021500E2170D227C2D6D1A64CBDD5D3075CDDB2349D7EF 024025B04ACFFC7909200157261692E053046EFF2D6C2D31DC2CCCAEF3D3BF6A 00A4E5C7429B09B31BA6E24AD866A1F68B4B21EADF4E38BABB914C13E35F95EB 34D3034400024100A77A966336E0DA90CEE40EC18D2E3C355235B08CBA7CEAA8 E08782B56854DD0885D53E6A244C7469025E3053EE281864C8DD46910C7E61DD 72BE40C390887E7D". Call B_SetKeyInfo passing "publicKeyJX930" and "KI_DSAPublicBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Read in X9.57 BER encoded Private key Create key object "privateKeyJX957". Call B_CreateKeyObject passing "privateKeyJX957". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPrivateX957BER" initialized from "3081C70201003081A806072 A8648CE38040130819C024100E300CA44A4D69F6F6057082EE29B6384E835A8A 870BE33A01761E3C8C99FF696FDD7521E6BB2279A52ED3A6E6D6DFE399AEB428 390A91D1E359697E44CE63A55021500E2170D227C2D6D1A64CBDD5D3075CDDB2 349D7EF024025B04ACFFC7909200157261692E053046EFF2D6C2D31DC2CCCAEF 3D3BF6A00A4E5C7429B09B31BA6E24AD866A1F68B4B21EADF4E38BABB914C13E 35F95EB34D30417021500ACF460E27D9586E1C2F05CB0BC9E35F687B5844C". Call B_SetKeyInfo passing "privateKeyJX957" and "KI_DSAPrivateX957BER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Read in X9.57 BER encoded Public key Create key object "publicKeyJX957". Call B_CreateKeyObject passing "publicKeyJX957". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPublicX957BER" initialized from "3081F13081A806072A8648CE Baldwin Informational, Expires 12/25/1999 1746 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 38040130819C024100E300CA44A4D69F6F6057082EE29B6384E835A8A870BE33 A01761E3C8C99FF696FDD7521E6BB2279A52ED3A6E6D6DFE399AEB428390A91D 1E359697E44CE63A55021500E2170D227C2D6D1A64CBDD5D3075CDDB2349D7EF 024025B04ACFFC7909200157261692E053046EFF2D6C2D31DC2CCCAEF3D3BF6A 00A4E5C7429B09B31BA6E24AD866A1F68B4B21EADF4E38BABB914C13E35F95EB 34D3034400024100A77A966336E0DA90CEE40EC18D2E3C355235B08CBA7CEAA8 E08782B56854DD0885D53E6A244C7469025E3053EE281864C8DD46910C7E61DD 72BE40C390887E7D". Call B_SetKeyInfo passing "publicKeyJX957" and "KI_DSAPublicX957BER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Now use the generated key in signing and verifying Create buffer "signature" of decimal value "128" bytes. Create algorithm object "dsaSigner". Call B_CreateAlgorithmObject passing "dsaSigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaSigner" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: check the BER encoding of AI_DSAWithSHA1 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DSAWithSHA1_BER" initialized from "300906052b0e03021b0500". Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1_BER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "dsaSigner" and "AI_DSAWithSHA1_BER". Check equality of info structure for "AI_DSAWithSHA1_BER" with expected info structure for "AI_DSAWithSHA1_BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "dsaVerifier". Call B_CreateAlgorithmObject passing "dsaVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1_BER" initialized from "300906052b0e03021b0500". Call B_SetAlgorithmInfo passing "dsaVerifier" and "AI_DSAWithSHA1_BER" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 1747 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: Sign 6 bytes -- Use derived privateKey and Note: publicKey Note: 30 2d Note: 02 14 70 02 56 94 ea 37 57 9f a5 aa 66 42 18 55 6a 84 2a Note: 94 de e5 Note: 02 15 00 8f ce 55 d6 46 28 15 cd 06 cd da 19 52 19 bc b6 Note: b4 d7 69 43 Call Call B_SignInit passing "dsaSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302c02142bf6bdccb7c046f9687832414e721599e8a2a22102146ad9ba1662f 15f39ec29e2ec6beaa62b468dd244". Note: Verify the signature of the seed Call Call B_VerifyInit passing "dsaVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1748 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Cleanup Call Call B_DestroyAlgorithmObject passing "dsaSigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2: Sign 3 bytes -- Initialize KI_DSAPrivateBER Note: object with data of type Note: KI_DSAPrivateBER Set buffer "seed" to hex value "616263". Create algorithm object "dsaSigner". Call B_CreateAlgorithmObject passing "dsaSigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaSigner" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DSAWithSHA1_BER" initialized from "300906052b0e03021b0500". Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1_BER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "dsaSigner" and "AI_DSAWithSHA1_BER". Check equality of info structure for "AI_DSAWithSHA1_BER" with expected info structure for "AI_DSAWithSHA1_BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPrivateBER" initialized from "3081cb0201003081aa06052b0e0 Baldwin Informational, Expires 12/25/1999 1749 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 3020c3081a002020200024100ea5fd4a8924fe8836afac54ab0b05a98e1c1f39 ab2987a896b181764f2b4530a79de272c91c7d76bc328f12083e4d4532deda79 1a52145144e0c0c320b6958db021500e4e38dc8f10cc7d4a9b3e34b1c6faef6f ec1a38f0240494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9205fb3 61c0b53b1ba344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce87cecf 2733fa4c5fa0419301702150091eced865500bed9485a971552c59e695f6c936 5". Call B_SetKeyInfo passing "privateKey" and "KI_DSAPrivateBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "dsaSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302e021500a526a883b505202b6d202e1b5326c6ba8e8d84040215009c1595a 36310d46ab6dfe348d1ad254c50b569a2". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1750 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Cleanup Call Call B_DestroyAlgorithmObject passing "dsaSigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 3: Sign 56 bytes -- Initialize KI_DSAPrivateBER Note: object with data of type Note: KI_DSAPrivateX957BER Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a68696a6b696a6b6c6a6b6c6d6b6c6d6e6c6d6e6f 6d6e6f706e6f7071". Create algorithm object "dsaSigner". Call B_CreateAlgorithmObject passing "dsaSigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaSigner" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DSAWithSHA1_BER" initialized from "300906052b0e03021b0500". Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1_BER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "dsaSigner" and "AI_DSAWithSHA1_BER". Check equality of info structure for "AI_DSAWithSHA1_BER" with expected info structure for "AI_DSAWithSHA1_BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPrivateBER" initialized from "3081c70201003081a806072a864 8ce38040130819c024100ea5fd4a8924fe8836afac54ab0b05a98e1c1f39ab29 87a896b181764f2b4530a79de272c91c7d76bc328f12083e4d4532deda791a52 Baldwin Informational, Expires 12/25/1999 1751 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 145144e0c0c320b6958db021500e4e38dc8f10cc7d4a9b3e34b1c6faef6fec1a 38f0240494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9205fb361c0 b53b1ba344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce87cecf2733 fa4c5fa041702150091eced865500bed9485a971552c59e695f6c9365". Call B_SetKeyInfo passing "privateKey" and "KI_DSAPrivateBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "dsaSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302d021423d7d1e8361e967fcd9691bc5b7971f44bb655c70215008f6b169fc ebb60f376ab8f44db930cbd04b24290". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Cleanup Call Call B_DestroyAlgorithmObject passing "dsaSigner". Baldwin Informational, Expires 12/25/1999 1752 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 4: Sign 65 bytes -- Initialize KI_DSAPrivateX957BER Note: object with data of type Note: KI_DSAPrivateX957BER Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f7071616263616263". Create algorithm object "dsaSigner". Call B_CreateAlgorithmObject passing "dsaSigner". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "dsaSigner" and "AI_DSAWithSHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_DSAWithSHA1_BER" initialized from "300906052b0e03021b0500". Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1_BER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "dsaSigner" and "AI_DSAWithSHA1_BER". Check equality of info structure for "AI_DSAWithSHA1_BER" with expected info structure for "AI_DSAWithSHA1_BER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPrivateX957BER" initialized from "3081c70201003081a806072 a8648ce38040130819c024100ea5fd4a8924fe8836afac54ab0b05a98e1c1f39 ab2987a896b181764f2b4530a79de272c91c7d76bc328f12083e4d4532deda79 1a52145144e0c0c320b6958db021500e4e38dc8f10cc7d4a9b3e34b1c6faef6f ec1a38f0240494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9205fb3 61c0b53b1ba344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce87cecf Baldwin Informational, Expires 12/25/1999 1753 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 2733fa4c5fa041702150091eced865500bed9485a971552c59e695f6c9365". Call B_SetKeyInfo passing "privateKey" and "KI_DSAPrivateX957BER " and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "dsaSigner" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302d021500ba8aeb0e312c67df007685c5e2a4d48087c209f50214185f48033 9a63bad75f32061b18ea767186b736e". Note: Verify the signature of the seed Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Cleanup Call Call B_DestroyAlgorithmObject passing "dsaVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1754 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set privateKey; it won't be modified by the subsequent Note: tests Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPrivateBER" initialized from "3081cb0201003081aa06052b0e0 3020c3081a002020200024100ea5fd4a8924fe8836afac54ab0b05a98e1c1f39 ab2987a896b181764f2b4530a79de272c91c7d76bc328f12083e4d4532deda79 1a52145144e0c0c320b6958db021500e4e38dc8f10cc7d4a9b3e34b1c6faef6f ec1a38f0240494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9205fb3 61c0b53b1ba344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce87cecf 2733fa4c5fa0419301702150091eced865500bed9485a971552c59e695f6c936 5". Call B_SetKeyInfo passing "privateKey" and "KI_DSAPrivateBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 5: Sign 89 bytes -- Initialize KI_DSAPublicBER Note: object with data of type Note: KI_DSAPublicBER Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f707161626361626361626368696a61626368696a616263 68696a61626368696a". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1755 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302d021500beedc2889974cdef1e46acc57e860ab7f63be1430214709896916 1839cc37b8d70f0ff8998d0ec731eaf". Note: Verify the signature of the seed Create algorithm object "dsaVerifier". Call B_CreateAlgorithmObject passing "dsaVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1_BER" initialized from "300906052b0e03021b0500". Call B_SetAlgorithmInfo passing "dsaVerifier" and "AI_DSAWithSHA1_BER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPublicBER" initialized from "3081f33081aa06052b0e03020c30 81a002020200024100ea5fd4a8924fe8836afac54ab0b05a98e1c1f39ab2987a 896b181764f2b4530a79de272c91c7d76bc328f12083e4d4532deda791a52145 144e0c0c320b6958db021500e4e38dc8f10cc7d4a9b3e34b1c6faef6fec1a38f 0240494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9205fb361c0b53 b1ba344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce87cecf2733fa4 c5fa0344000241009060867cb048004b7555b2af386fc16aece4a45898654f52 c1b29ecea188b7ff48d71c9058631c27d10e0af71c5eddb90f835a2be78eaeeb bfff9304f167f144". Call B_SetKeyInfo passing "publicKey" and "KI_DSAPublicBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "dsaVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1756 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Cleanup Call Call B_DestroyAlgorithmObject passing "dsaVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 6: Sign 122 bytes -- Initialize KI_DSAPublicBER Note: object with data of type Note: KI_DSAPublicX957BER Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f707161626361626361626368696a61626368696a616263 68696a61626368696a696a6b6c6a6b6c6d6b6c6d696a6b6c6a6b6c6d6b6c6d69 6a6b6c6a6b6c6d6b6c6d". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302d021451c77e2eb7053b7d12a963b724ecafe745f3d913021500d3078b71d 59e0334c53c2a1df17c1cf2470e157d". Note: Verify the signature of the seed Create algorithm object "dsaVerifier". Call B_CreateAlgorithmObject passing "dsaVerifier". Baldwin Informational, Expires 12/25/1999 1757 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1_BER" initialized from "300906052b0e03021b0500". Call B_SetAlgorithmInfo passing "dsaVerifier" and "AI_DSAWithSHA1_BER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPublicBER" initialized from "3081f13081a806072a8648ce3804 0130819c024100ea5fd4a8924fe8836afac54ab0b05a98e1c1f39ab2987a896b 181764f2b4530a79de272c91c7d76bc328f12083e4d4532deda791a52145144e 0c0c320b6958db021500e4e38dc8f10cc7d4a9b3e34b1c6faef6fec1a38f0240 494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9205fb361c0b53b1ba 344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce87cecf2733fa4c5fa 0344000241009060867cb048004b7555b2af386fc16aece4a45898654f52c1b2 9ecea188b7ff48d71c9058631c27d10e0af71c5eddb90f835a2be78eaeebbfff 9304f167f144". Call B_SetKeyInfo passing "publicKey" and "KI_DSAPublicBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "dsaVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Cleanup Baldwin Informational, Expires 12/25/1999 1758 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "dsaVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 7: Sign 164 bytes -- Initialize KI_DSAPublicX957BER Note: object with data of type Note: KI_DSAPublicX957BER Set buffer "seed" to hex value "61626364626364656364656664656667 65666768666768696768696a61626368696a6b696a6b6c6a6b6c6d6b6c6d6e6c 6d6e6f6d6e6f706e6f707161626361626361626368696a61626368696a616263 68696a61626368696a696a6b6c6a6b6c6d6b6c6d696a6b6c6a6b6c6d6b6c6d69 6a6b6c6a6b6c6d6b6c6d56667656667686566676566676865666765666768656 6676566676865666765666768656667656667686". Call B_SignUpdate passing "dsaSigner" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "dsaSigner" and address of next free byte in buffer "signature" and address of "_OutputLen" and length of free bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "signature" by "_OutputLen". Finalize buffer "signature". Check equality of buffer "signature" with hex value "302d02146cbab1a8474655af63e5e59ba5e0e6d4c14eb28b021500bbd5b03aa 76b58bea84b591985cca6063d6a711d". Note: Verify the signature of the seed Create algorithm object "dsaVerifier". Call B_CreateAlgorithmObject passing "dsaVerifier". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DSAWithSHA1_BER" initialized from "300906052b0e03021b0500". Call B_SetAlgorithmInfo passing "dsaVerifier" and "AI_DSAWithSHA1_BER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1759 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DSAPublicX957BER" initialized from "3081f13081a806072a8648ce 38040130819c024100ea5fd4a8924fe8836afac54ab0b05a98e1c1f39ab2987a 896b181764f2b4530a79de272c91c7d76bc328f12083e4d4532deda791a52145 144e0c0c320b6958db021500e4e38dc8f10cc7d4a9b3e34b1c6faef6fec1a38f 0240494eeb99abfe14fbc16602d4ef606e9442ebc11eb3c98a9205fb361c0b53 b1ba344c3ff9b8c6e74e46c1d113171f262d61fbc79457001ce87cecf2733fa4 c5fa0344000241009060867cb048004b7555b2af386fc16aece4a45898654f52 c1b29ecea188b7ff48d71c9058631c27d10e0af71c5eddb90f835a2be78eaeeb bfff9304f167f144". Call B_SetKeyInfo passing "publicKey" and "KI_DSAPublicX957BER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "dsaVerifier" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "dsaVerifier" and address of first initialized byte in buffer "seed" and length of initialized bytes in buffer "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "dsaVerifier" and address of first initialized byte in buffer "signature" and length of initialized bytes in buffer "signature" and "random" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ----- Test negative capabilities ----- Create buffer "privKeyBER" of decimal value "256" bytes. Set "_InfoPointer" to address of info structure for "KI_DSAPrivateBER". Call B_GetKeyInfo passing "_InfoPointer" and "privateKey" and "KI_DSAPrivateBER". Load buffer "privKeyBER" from info structure for "KI_DSAPrivateBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1760 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create key object "privErrorKey". Call B_CreateKeyObject passing "privErrorKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: This call is supposed to fail with BE_WRONG_KEY_INFO Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Set "_InfoPointer" to address of info structure for "KI_DSAPrivateX957BER" initialized from contents of buffer "privKeyBER". Call B_SetKeyInfo passing "privErrorKey" and "KI_DSAPrivateX957BER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "pubKeyBER" of decimal value "256" bytes. Set "_InfoPointer" to address of info structure for "KI_DSAPublicBER". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_DSAPublicBER". Load buffer "pubKeyBER" from info structure for "KI_DSAPublicBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "pubErrorKey". Call B_CreateKeyObject passing "pubErrorKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: This call is supposed to fail with BE_WRONG_KEY_INFO Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Set "_InfoPointer" to address of info structure for "KI_DSAPublicX957BER" initialized from contents of buffer "pubKeyBER". Call B_SetKeyInfo passing "pubErrorKey" and "KI_DSAPublicX957BER " and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFDSA06". This is the start of test case "TFHMAC". Baldwin Informational, Expires 12/25/1999 1761 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Generate 24 byte key and use it to perform HMAC Create buffer "keytext" of decimal value "24" bytes. Set buffer "keytext" to hex value "0123456789ABCDEF1324354757687 98A9BACBDCEDF112233". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keytext". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate an HMAC code. Create algorithm object "HMAC_Digester". Call B_CreateAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_HMAC" initialized from "AI_SHA1", "NULL_PTR". Call B_SetAlgorithmInfo passing "HMAC_Digester" and "AI_HMAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "dataToDigest" of decimal value "32" bytes. Create buffer "HMACdigest" of decimal value "64" bytes. Set buffer "dataToDigest" to hex value "000000000000000000000000 0000000000000000000000000000000000000000". Note: Use the private key to sign. Call Call B_DigestInit passing "HMAC_Digester" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1762 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestUpdate passing "HMAC_Digester" and address of first initialized byte in buffer "dataToDigest" and length of initialized bytes in buffer "dataToDigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "HMAC_Digester" and address of next free byte in buffer "HMACdigest" and address of "_OutputLen" and length of free bytes in buffer "HMACdigest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "HMACdigest" by "_OutputLen". Finalize buffer "HMACdigest". Display buffer "HMACdigest". Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "HMAC_Digester". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFHMAC". This is the start of test case "TFMAC00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: test AI_MAC with mac length from 2-64, 128, 256, 512 Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MAC", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 1763 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "2" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "2". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1 Set buffer "input" to hex value "4778ec68d5391ec842b6d8b3a61fe02 20a18489854d74fdcdab267cf8a0c0c6efa71fef6f118c1a5b2e2d4ce9b76568 5058e5e6f5a1c3d3a42bb091f6bcc5c69". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "54e6". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1764 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "3" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "3". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2 Set buffer "input" to hex value "f1eccf5e41991fbfb1903324fd32211 9e250c29bcd2e60aa4670b723cccfacfbecd259efba8ed95764a1db939235e76 4b455c258b50d21cb4ae777929cb6d8f4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "40d512". Note: Case 3 Set buffer "input" to hex value "0f64a730e0e4ccfbb9960fdb1200e8e 3cb75ead5a0df047918dfd13f30caeb65fb79e2a7f4bce63462a2d13e1af723a d819b50fff33de6e8a207972cb57e8909". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 1765 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c1121b". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "4" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "4". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 4 Set buffer "input" to hex value "9c8f9237cde80516a42da869f3e23b9 ee1a0c8a6848be481ee23a4c2ce3e07d4227ea8d719aaa2922eeb8e84f683279 Baldwin Informational, Expires 12/25/1999 1766 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 5261adc1d3380bcf476607c2909c71ffe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "79499cc9". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "5" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "5". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 5 Baldwin Informational, Expires 12/25/1999 1767 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "6a52db130fc87d7d7550457eef56cc1 a6e8d6422774e665404c8a02c967111b89516984819b594e1555afcdbb68eb73 84f44eec098a138cbcca6a0f703d57ef3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5706c0930e". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "6" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "6". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1768 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 6 Set buffer "input" to hex value "ffe42622563d86f8a4b6960006e3044 aa085de7e22c9301d939050362848ac2fcfdff29dd032db43b1cd452ff34ef11 2c0921d503bb5587bce215bc0023dee37". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7b8e9d97b495". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "7" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "7". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1769 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 7 Set buffer "input" to hex value "8ce0a4ac1567dbcc4fd9f8261119bef 0033fa49f53427b85e7660e25504375521007a83982fc938f334da72eeac17eb 6cde0aba0a9de70e7dd14572367941090". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d455b8cbe21e5a". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "8" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "8". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1770 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 8 Set buffer "input" to hex value "b7b6c149372852c18a895b412d6fea4 8b30488484ad33f6008699d1c12ca50c993a152f63d95fec6dc9999ebce6ce1b 09662da3fae351d2279355376eb7bbc70". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f131741e9d5921f5". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "9" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "9". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 1771 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 9 Set buffer "input" to hex value "0459ff5ad334dbb4c2f7e13e8eba485 17b602246223d1d32b1cea86ad7534a55e60894060e8eda3c83c30cdfe4a6ce3 ec7f7715ff81d791b267965229925eb91". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b936c307428b7bb119". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "10" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" Baldwin Informational, Expires 12/25/1999 1772 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized from "10". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 10 Set buffer "input" to hex value "654ac6466ee8154059d9b7d1495ecb2 744ec8c0510ec39fe7fed783d41062aa8e02448e7670ab4d0e568d547832f994 d1c32a10e36eb2f09c35911ebf0c30dac". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bb3ec4ef33213642e800". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "11" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1773 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "11". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 11 Set buffer "input" to hex value "5e82f7fdf97641a944c46489542fbeb b1295d9e05824452417bf8cf50843c74452e1c80d2d90917f5fe2dd854e4f63f f99dadfc5b3e9d63552608373811a624e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "24a07f5f9778f9b027eb58". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "12" bytes. Create algorithm object "digestAlg". Baldwin Informational, Expires 12/25/1999 1774 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "12". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 12 Set buffer "input" to hex value "0be9831b351a352654757ca9318ff1b a9de10452f9a6b7e29d44b61e9b8632fcd0de6be125cd309eb28b953ad983c18 b4e8fbb36bb059b8f612d4a13a1a0e1f2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d25777966768ee46e2abb493". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Baldwin Informational, Expires 12/25/1999 1775 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "13" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "13". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 13 Set buffer "input" to hex value "cea551ae1c1d1dc52c2dfb9ed336265 1b34ef7b49ad40aba001feda3134dde403ae9a3f6f2f785c9f4701bf1eaa2cc9 aff6cef38fdbdb70b45e1c415eff02643". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "cfd712854035d8e73fc91e8709". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1776 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "14" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "14". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 14 Set buffer "input" to hex value "0600ccc6371790794741973a9d0b97c 6b197316073115058aee2b6b57c3ba0859be1d96c95f69ee347b2f5eb1469ab9 84193e42569cdd7cf5423551f84566fd3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7ecfd500bd55cda328073d853c3f". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1777 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "15" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "15". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 15 Set buffer "input" to hex value "c5b900bf1b18693742c3a4f58e38397 77bd3bf6c5addbcfafee277de52c689bd1f802112f9df4b5f7adc03e7a70947e 2dbacd616a3b1d9c2538ac4e1daac1f25". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "cf943a8c7e14106421134ce1fcb99e". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1778 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "16". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 16 Set buffer "input" to hex value "4707af58671d58b6f6f21074ad38513 04c9ef1473501649f9a04db141a19459c90cac3233da8aaaed47ca5886defe60 a2aa7e467193a945d9b6985768b53383c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b525d6d2c558361a38223bbb6e8871c1". Note: Clean up Baldwin Informational, Expires 12/25/1999 1779 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "17" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "17". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 17 Set buffer "input" to hex value "f87f1b89eec701bc7a86257e3e1dbec 4179644336ce6441c6250645febd94392202e84cc6a8ca8f00acc7fc531c6d17 036aeac1acb2bff57aa715d0135e9d4bf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 1780 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "d8bb83b9ef26ae1b34a9c325edc7744c5d". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "18" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "18". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 18 Set buffer "input" to hex value "e8fdddffc3c621db8d3186dbe7f51ff 0caec1e73d4d5b2a74a29d1ba1aa83004f5f5e1fe851f6ca284c6924bd5988b1 c4ad7703ede3f252dbd04dd067ac72c71". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1781 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f6e06d3bd654d8e805f51eb81dad99d7d6dc". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "19" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "19". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 19 Set buffer "input" to hex value "ea97bb3f392fa668dcda3544dc90fb3 ba2883c1e8918c0e6f6a4ae4958f77ae21871d39b31ae51dcf0c9f48787bebe6 00845638ad5760728caa545ea7fd27ce4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1782 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "876cf5fe86deb61009c84cba8466fc60bf658c". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "20". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 20 Set buffer "input" to hex value "cc24d8272d0758077f5853317dd3c85 92487a8cb25e968f26169ee0b30410064800dcee6c0b42936d33e55a8aa62f4b 0ce19410543515955bf41107a0ffa8739". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1783 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3715f738666bedeb800aa9f863e2943efadc643c". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "21" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "21". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 21 Set buffer "input" to hex value "c9a846a03a920335e63a0c400252470 2aae356a469ef44245be5e88ae835772967492b8ddfd6675ebde2a6c90d77bc3 c1067d7273b6c972a78d29f0956e8d062". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1784 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5dd6ac4986071249b3a8120d6d4a7cf8765ef0ca48". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "22" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "22". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 22 Set buffer "input" to hex value "932166d334a7c5e645095acbe2620a0 328195f6b9889027a477ad80980314726eb717a28bc98ed8ae18ab5df9f73de2 08614411dca234179bac6703f1563bbd8". Baldwin Informational, Expires 12/25/1999 1785 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9299ce3cfdce5ca5e8a87ba7ba71ce1ad1b349512fdc". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "23" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "23". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 23 Baldwin Informational, Expires 12/25/1999 1786 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "b6a993c187ba64a776139ae72462594 aa8fa5ddaae487f3b914bfd7d254fc3e098f97eda62617748751042ef17e9285 48eb24db4c586176947c2029685148629". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "67e3ab257ffcc33b97f4ef128d3763b7a134a0317a55c1". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "24" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "24". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1787 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 24 Set buffer "input" to hex value "087b7496d00935ac5ab8160e9efd2ab 3f4c92bf409a79d6961c261195072200fed93432bf6f0d9b3f06044c56c5b5fb a167d9abcbe4d78d6e4a1bc113552d8df". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "cf1ae13a51487a469cee6c0ba3519d4d4de449e4de1d4ccd". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "24" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "24". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1788 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 24 Set buffer "input" to hex value "66fd6dc1e670ccbaf6bfb6e47e2f58d e53810ace1cedaee27a8e22773297f352605088ce5f1f965555e5be458bab04d 9042093c9d0ce4bf71e6b10c3fbc8b587". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ade685bd978850159bd74e2975020daf11f9e1ef72a8eb34". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "25" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "25". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1789 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 25 Set buffer "input" to hex value "5bd22e093ee43652623c22d02cc6fb0 343b1bec0b81d7c0f9a49dc29a59f3460d29df86f3309f46f26e561d369b1115 abaf8f81f77679f3e2113523aa725ebf4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "465e2cb137fdae6e4b00e0a45d34bee5afaa894485f300517d". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "26" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "26". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and Baldwin Informational, Expires 12/25/1999 1790 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 26 Set buffer "input" to hex value "4f7712effe29344615adaef2fccb4f0 86c6b3552acb1a89fe102f0ae7b44103b9388dce6fb569319ece74742d10bf17 0f6e57bd5d9fa04ac2f0a5fd48c319f95". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3ba5fbfe6dc61c484abb5e01d805ac503fea05948cac4abc1842". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "27" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1791 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "27". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 27 Set buffer "input" to hex value "e997d75dbd04deb4b7c342b68a1ae14 6fbfd3b7a8ed25ae31497da80eada2f8666f32c5488f8dc8fbebae2bd2ceee59 d1e2423488a36052ad1209ff0608dbb88". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "917a5857e4021149ca8c1be204ec46783186f368562c51b34eeace". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "28" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1792 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "28". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 28 Set buffer "input" to hex value "1d13029b610ae79f79254921f44fd0b c8a2f79c6f495828048c56aabdb5f5b0a71c38ec0f26b1c21888070f3e18c667 9fb736d4775b13e83fe1ce84182c9005a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "74d108e6c763ca3dfe288482843887f9fcdd27082ded9e5c05a561fd". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "29" bytes. Baldwin Informational, Expires 12/25/1999 1793 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "29". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 29 Set buffer "input" to hex value "198fc01736a9ccc9642fa4b6b9394e3 c19ac23daad8633030144f4aadc3a0bef6bf4abb8ea44a01c73fa3a672a009e2 32f5f027866a27da0d222c26990420624". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4920a3a3aaa3c011526791581a049c93468c63c92409afd3b5e9969659". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Baldwin Informational, Expires 12/25/1999 1794 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "30" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "30". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 30 Set buffer "input" to hex value "4e4bc5a2526127df483c5694911409f 4a55c04651e5536c707385ce7ae9c9265362c11567161188d728507f761277fa 3d72a056f46ac83838d008120fe8b52ee". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "843158c2b9ddb6740d4c9ec1462fa85be22d5aba8f9ac2666ca3e7c7be3e". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1795 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "31" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "31". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 31 Set buffer "input" to hex value "51f6ebd864e75dd8087c8f70bbdbef7 e5903659ab6dbe37d7ad7a17254d3b0d8565662eea07af78c02bbceec2a35228 53dc66eb958001a943e71149d391bd3c9". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c33ae06870ea2d0b10b51830f5f890e66d49856c61305eb09a8aeacb35c149" . Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1796 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "32" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "32". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 32 Set buffer "input" to hex value "f09d1756974c36c3203f4f09b475d27 a2b714606488fd8513183810edf3a735c1bd0bf2556bf5e1abc46d071ab26d98 03de35a621197f72111ff9f7867200049". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "27bb9b1d7e08c4cee6aab79193785c66284b22da57e5c0d5dd15590be6468b3 d". Note: Clean up Baldwin Informational, Expires 12/25/1999 1797 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "33" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "33". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 33 Set buffer "input" to hex value "87e66592805a60bf542e27819c07087 067433962436257c4e29cf42060a8e7246057c5bc17382fbc918a457cd527ad7 ce8b52f59bb3be1e939b03452cf7a93b3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 1798 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "997328cb73a1893c19bf3dd6776e257de8a3ff983724a41f95a7542074b7c4f 3dc". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "34" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "34". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 34 Set buffer "input" to hex value "972692952472c91b4fde13f85660076 46a88ae3081351c24a74ea6030af1c4b8c318eeb510e58fbd35cd27bd178eef8 09a9096c8a3f4a3a4d5ed45f1343cebbe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1799 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "79057e342b073a202bf2cd3ee74439b3214dd86dec56c23111cce1e393b82ba f0240". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "35" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "35". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 35 Set buffer "input" to hex value "43512453a7912d275089b58daf7ef17 37b1c5520dd74e4000b5bd5f87479720510a66191df64e6bf38f82cb96b537e3 65acc082f81a10464d7f2a04707586f41". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free Baldwin Informational, Expires 12/25/1999 1800 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c4cfb8ad1b2227574f8f71602907edcd679f459c5ab8e2e729fb8100e23c0f6 5071672". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "36" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "36". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 36 Set buffer "input" to hex value "44d47c9e5d235157156b9eae6ce1a81 663044c2419ec37614e8c4cfda3e426a2bfb15b27ec692c611285bc6ff4f6337 bddb258d1274a393c6fba82263a5bd012". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1801 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1e599b1f020ce61e3bec560ef6b010c0106c0dbf54d45959eabf2d03f592261 0fe4d1596". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "37" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "37". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 37 Set buffer "input" to hex value "5d4c80792a1490d393e299c07f04016 7b6729a8ba67fb188df8ca4ba7b0be529838707aac1ecf15f45f4a43f4595b3b Baldwin Informational, Expires 12/25/1999 1802 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 b8c93f311d63990e36457c3992cbef01a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "07c6b658943e3aba17a5e87366162c181c3d26c2b36ee202caa502d9e73b038 3305eed503b". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "38" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "38". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1803 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 38 Set buffer "input" to hex value "1ee894df9e9746c44f12ca13b226aaa b2373cc197badcb0876f175f9935c74b06a3385659b85228c1e54b689ee00fcc e059a7eb08d556ede505251187eea2c77". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c8442ee1c90dd78e38d826d4a1f8f97025fa7803fceb511514c9dba9263c97d 8d6c3110e5bcb". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "39" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "39". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1804 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 39 Set buffer "input" to hex value "141d6deab6730c237f1e3f8d4ce6aad 719c0469d459c1670354bf0141410ec89c4c3a4d672feb4100ab0e60979b34ef 90f64d99e328b668112942b5dac2d2110". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f64da9a9ad5134797e196bcf435183e6c76006c685c88690a8e15cda5826d5f fbc0e09c7f6e0f4". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "40" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "40". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1805 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 40 Set buffer "input" to hex value "e4a5f61cdbc06a36c124cb530e9ae2d 21cac7ed4fa61a8976cdd100f3737d7b437a807eb7288094be23654934811aac 712a6bc99140cf9b65ec664e7219bb622". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d160adb28a8a6a098a15ba56cf35b443c665fad5d3d32c089389e7997e98c7f 6ea3ea66723e5bacb". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "41" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" Baldwin Informational, Expires 12/25/1999 1806 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized from "41". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 41 Set buffer "input" to hex value "c4be1013e79ae33fd590358e42bb1ca 376983fcee716ea40978dc12633014fdeb1d995017f6fa693063ab45c1eb5da9 2270af6a14738086b446c22831eda6ede". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "fd2a307c9b8ebcf2630c6428bcc2d21b2e9f8d89ae7766433889cbe9eec5015 68983307c9f76c6221c". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "42" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1807 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "42". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 42 Set buffer "input" to hex value "e2c742093f46c40feac82da8f45659e b99049ab5f5a96cfeadf711d2cebb09aa19a26f0eae4be7b301b23b4596db0a4 c8caf5236ab51bee4fe705a9f8da1e671". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d143104aac6f7306b417a41fd2b313f65a0ebc48764f711593daf72eb3b7a1d 7eb3432458ffebbd9607e". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Baldwin Informational, Expires 12/25/1999 1808 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "digest" of decimal value "43" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "43". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 43 Set buffer "input" to hex value "b23b07a95d76944413b7f96dc30229d e32276c8600ce0b0b5a8a76878150ab44402b97c9c62437d3bbe26a828a8f823 d9522a7c46480e10624f024ce11037d46". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "73b6b6e737cb3a3ced16f9fd962a747b998a6e065fbab52cb2ebfeef3fd569d ceadc3ee73ff911f6ad9006". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1809 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "44" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "44". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 44 Set buffer "input" to hex value "cb3252bf102c0109b49b1a4d135b942 ee3f82f49cb068605fc810b4d99eea232b2ae35bc49fe8fa02776dc2ee99a320 5b9c2170a281c06c195cec81900dcbdbb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "76bb3bb8413cb6f024531f8f0f138801f443321d9acb61a0d06e44691f9da7e a1ec27445607b00e09b4b662d". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1810 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "45" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "45". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 45 Set buffer "input" to hex value "40827222755a96e286c2d06612009a3 e521335502793ce5932ecee436400d5c7a9d7dc5acc394c72a51e04f0b5dcc58 5b7c305cc29b75b07826106a940a392dd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ed9a2e73e48f5153fed9bd687a146a61e77184f1cf18a3b94d4a1862cdc5f58 76d30e5ed5e23d75b04fa870c2b". Note: Clean up Baldwin Informational, Expires 12/25/1999 1811 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "46" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "46". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 46 Set buffer "input" to hex value "a99c1b6f0627c4517a1ef59385d8694 69e3168b3a2f2a5430feb2c97538f7c9d7e553aa18c9908260d28468c6907e89 48fecf1dbefc95976c93c1d3fc66727cf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d50e1f4f18feb256912aee32c120c3e8871c3124b59bb095fb31d47a16e32e6 Baldwin Informational, Expires 12/25/1999 1812 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 16e0f640a4058120e1dfaf0424bc7". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "47" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "47". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 47 Set buffer "input" to hex value "2a9fe3bc7cfeaa445492c108a567e0e bcc3d9f699845a6483870c0034bc955e5cae660d778284a273b684e7b52f594f a36341522929454e1fd36a3d1a18fa91c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1813 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8022d425f81bf585cd7dbef674e858775bdd6ac595f79a86d5f3c6ef48376b4 2ce03b461c86484ae486915d6137300". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "48" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "48". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 48 Set buffer "input" to hex value "81ecfda8f1204e3f7e523285428fe44 5312196e4295c3a7f8107e824f9473add8836e20c4dfa2910f10abee70bf21bd a488658b6141c2fd610ad9587f9d8ca39". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 1814 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8c9c2b5994e187c23cba559944fa8760358b5fb1f04794ad4cb7035ab64fa67 c7482cabe671a9cf2375998c100ca4598". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "49" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "49". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 49 Set buffer "input" to hex value "7d2900542a3a1ba87c49cba21c707cd 0890c9e9564d48ff8069dde8b086df3967e051b68ce085bea1b6181641187638 11217a04ed512cb2be3e2ded228350372". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1815 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6d34b12328d9693245bb206336b5d04e2bc3b8a6d573b5e657a6dc3cd9ac3ad e3c04e4c8bd3122545bc51c485f298f1811". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "50" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "50". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 50 Set buffer "input" to hex value "d9ba09ddae4b8bb0ad8bcaf5d32f9c3 d9604fabcacce4926d84fc14c9e48c0240b3a686fb44b14c9568ed933685064c 3826248ee54787e00a64addaf2a3f74a0". Baldwin Informational, Expires 12/25/1999 1816 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "21802bb947011173f49b65f27cf123f57d99b687d5d209f6a974eb33648ed5e dd97e3f7b0a9e7269ff1656f1438b26a138d0". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "51" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "51". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 51 Baldwin Informational, Expires 12/25/1999 1817 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "bacc561d8de5577764b50385ed5679e d7f4189603e68434f22dd3459e3a9938ca1305f2921321bc953a82b1c70a32d2 d1bf10733566e5e11397aed3a6c5670af". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ebc450c2fc34dd83d5fef29f6089e45e142e311c8de2949c8fa674ee1596a1c d1e9090a64c2dbd0b898905f53b314935bb64e0". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "52" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "52". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1818 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 52 Set buffer "input" to hex value "32bd28458a0c41e43aeba1a06f21d55 bea5fdca06ae0bd540bb818af6deecbb119057cd0e744d68b4d82ff61b0095d3 53deec27de25889b8434ead4c1c59675b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d29c68e657e2611dd75d00e9b605a512d053760ca4b8c16d5af96b36f03f42d c0db4e08880537fbb24d3b50dae49b2d16fc931ee". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "53" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "53". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1819 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 53 Set buffer "input" to hex value "b68877d25ce6de3c5f049b34053671d 3de610ea51d4434afd2c01304b78a1bc812392685a2d6d8514a2eaca49310459 8ea15054c2a9d5f6e2d64a20248e8d772". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "89b88bcc6e63dcb318a0f989126f7daeb90a37a675af849b381f6b65ecf7931 1192eadf82557a8b8f1b645f4714fac96780a86341e". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "54" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "54". Baldwin Informational, Expires 12/25/1999 1820 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 54 Set buffer "input" to hex value "7153a98234fb040cf3db8dc59ccfd00 3f40cbdf6761ac0decdb1d6ed2c9c39b60b3b304839765c902bff78f05aea7be 2215e6d7efa48252c0a012c4ff3ff8fbb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "307821726dbe49b1004bcba77d63700c6b509121840bb6868df584cbe12d964 2c54de757c65f9ce3d0c347cac495c95899e443542f1f". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "55" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1821 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "55". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 55 Set buffer "input" to hex value "955aca4fe34e2e534884bd8e914dca5 9a31bc64adf576c9b5478b445a5d4d364aefce6d6b2bf79cddf1013dab3739fd 84b5e3c2ec498c4eaa60fb54962009ea1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3900332cf077e41ea67bf762ead126e9c509f818696ed913415b6b0f02c4706 2adae670ece2265f6e381937925645f7105d68396d30523". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "56" bytes. Baldwin Informational, Expires 12/25/1999 1822 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "56". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 56 Set buffer "input" to hex value "b8199e80a67cdefe5e2d82ee88bb352 c49495cbef35708312c96398349d0cf5a5b2d4b0d080849e490f009ef57318ae bb539b97dd6991c6785471f281b64d66b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e3903f5335068891f4f4e1034eeab58c912b843ef46d72e7e690f6b0b5b5f45 92d4db452ea8c3756088404c06b24a1960a303eb6aa319773". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1823 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "57" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "57". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 57 Set buffer "input" to hex value "e3672205459f33bdcabeaeebe377669 21c2d117c2a8bfac7e85840efff0f56ea2f4d1f5c2c14cacae22d5b0dfa63550 59c8f830d58d3e204c8807db5e37bf184". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "00770313565ecadb2fa190acc19736477a55e5fd5242b2eb5792f0a2e191a97 7775f90e6b047dee8b821323eb0e56e5fb94c3cbc6f9bca92e6". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1824 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "58" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "58". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 58 Set buffer "input" to hex value "ef74619a5ead883c2daf824cd076673 d874099bc4e426ac7db96d05eb9e9f6cd32a6cec13dca5b943191f9fdd374934 79e10074821a1556ae2bbf7c1f74faab8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "358190123ff16dcbda803afd2401f3ffd77a662b6de304544b708f1b737c807 7e6298c2c44406ec92efa23adbaf59c1ce8d75fa5f51e1e74a3f5". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Baldwin Informational, Expires 12/25/1999 1825 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "59" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "59". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 59 Set buffer "input" to hex value "74e6c62fd00c0a129bff6e36c102fe1 da6a03adc130a953ae045bd93c8854aeddfa63d1211efacf0349c26b1e374f41 4889a8ce70ae4939324f48ba6922de0c1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b1b7af2642d38b7cbf43a01b1d8761aeb728875df8002e7538f750621b80afa c52114d89219b0c5ec949a93527315ab7592e2e9949f574d3fb4b6b". Baldwin Informational, Expires 12/25/1999 1826 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "60" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "60". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 60 Set buffer "input" to hex value "b143b3993876d8c640deed9f13f8916 6da579591581d9483a560a5289ce9817ed9de129f816c51951daee1075430dac bff981143b1676856df594d6a14feb207". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1827 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "digest". Check equality of buffer "digest" with hex value "85cb657bfd635022ae452cdb67ea282ce5a0293e18dd189521543cc36463af2 23cd1ec28a0135cbae98d67764225acfe0cdad5eb62e4f071dd599e88". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "61" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "61". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 61 Set buffer "input" to hex value "74c7f70742c29f97a0bb1a97f24149b abc739cd39b88cb9822b613ad5110a2d71c56b75bab0bf1e5455c9b03b4ea10b 8f477309964a5f48e8ae07afb5e80b028". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1828 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "baff7f222a1d06a72a4ffcf40701ce216e263576259f0bae10ecad1f6aa1eb0 ae616b64c58f8e126be0957ad0549ca8d24d9184933375dc74620f08e8f". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "62" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "62". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 62 Set buffer "input" to hex value "82480f8d0422ee4ee6cdcc7405ef392 7394a40fbf7a085fbe39918821d1d50f8011b5b1a1f56ac0f8e9160feac36083 5342e429432f834243fa329343787b485". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1829 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b230b99f53f35b7071c9b852849a84f7fd464a1d38465e24a53fa0a0ed45bca 6e6a7a2eb11b2332cdd43118bb5888993ff298f458999821e94898a8b9992". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "63" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "63". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 63 Set buffer "input" to hex value "23303c647bdfeb94edc614b424fc42d 201ac2b6dcf59fca9b679763a1885f55e69b00c01cea033ac15c2b6a8b1881cc b6c533e5f45a674b2c66d0f9f357c0b8a". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 1830 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8d81d9c6625629507ba9099941ff6fbc1196d072e441140bc4cb87a53848e3d 40db1bc731d8e11a87f0b150c35a176d1ee83e2f81bc90f7bd0b22288c16a56" . Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "64" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "64". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 64 Baldwin Informational, Expires 12/25/1999 1831 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "0a3c898d9b5bd775991eaa47c43fa65 8593c24d3f83d8c6d62df499c3a4065f9c5198b2182777ecf2cec627d5fea377 a59a5d132d6756d7555927a5577663748". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b781343026e66ac824a317fa79821be5e481996e458031d0df62f42187fdd84 478a4369c3fcac3729151dfc0e2578ac7e4186c8f6bc8d0c8e82fc7e8cadb8a4 5". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "47" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "47". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1832 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 65 Set buffer "input" to hex value "84e29f704f19d06fb01e55f015df07d 714de5027d1b16b9be65e47192f95e43c829a835b4c0072ee3a4fde7854aa937 01cfcb07d81d1da05ef28ab5a3be884ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "63ed9a6c0cd6265be3faa4922859813f273ee6f1bdcf5387f263c5e9173aabc fd3bcd9ff337f3808372a771ef5ebe7". Note: Case 66 Set buffer "input" to hex value "be705b06fdafdd1d155c5e37b059f7b d345aa7ae8a4d19ed2f0ca4171f26899fc24929843868da3654da28a08ee69dd fb020771d6183bf9ef462e8ab65374fcd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e71a1337f0a45092b119aaa29b34227ff4943985d5678be967951d335b6f9f7 3209e0354950ff81eef9f7d58a778cb". Note: Case 67 Set buffer "input" to hex value "8f695dbfebc808e11650d66aa15d489 Baldwin Informational, Expires 12/25/1999 1833 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 21dd8b7977215f30a4d5c4f3d9d6ac79ad1ba884835f84d61cf833dad5abbb6e 3ee64f6113dab0cf6e729078303520b2b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "650a2acfa84eb7f0e1f28020d77a276c0735f58845f0dc723e8010e7064da7f 41e05c82b7dc3910a717ccfdce3cd24". Note: Case 68 Set buffer "input" to hex value "969a145660bf6f04daf359b3427ceea adb9587492e0cf72fd905ce709ecfe90ed92e510fc7c5552017835a58d3c0dfe 712ef60331c3100920f138414e4cc84d1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "283af493b14a9264b873cd237254b36493ecb27a78e89daa3ee7e56e7d1cfc7 040ae9601239dfacdbd98cc369e3769". Note: Case 69 Set buffer "input" to hex value "c410252d018299d0673076170a80cd8 c9d8f38ba1777b9baff0b8e47f65fab576e1b6e8be0179da0b4661432efc6070 7ec83c000739957972ab48a4989f064b2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1834 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "328507aaca040742b633fa4be216ead3a6d3365daa201d09dba98f527b9e211 233e70ee8ff5ae54dcb31228ed46004". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "512" bytes. Create buffer "digest" of decimal value "128" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "128". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 70 Set buffer "input" to hex value "424947698ffe60dcfd54cf08417b164 5065fc4898dbf16a9cb177cc8badf28861a3da66bf3375c5ca46116411f98536 70ab925cb5b3a551e1b418feee3183c7bc410252d018299d0673076170a80cd8 c9d8f38ba1777b9baff0b8e47f65fab576e1b6e8be0179da0b4661432efc6070 Baldwin Informational, Expires 12/25/1999 1835 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 7ec83c000739957972ab48a4989f064b2436035e4990469404c7b3443a9713da 3367ac77e8688e8fedd6c2f865bd56535a4767d41eca632c8842a700d1d04b0a 0a6decdac69e9abfe2ac538b68f580f9c1a3da66bf3375c5ca46116411f98536 70ab925cb5b3a551e1b418feee3183c7bc410252d018299d0673076170a80cd8 c9d8f38ba1777b9baff0b8e47f65fab576e1b6e8be0179da0b4661432efc6070 7ec83c000739957972ab48a4989f064b2436035e4990469404c7b3443a9713da 3367ac77e8688e8fedd6c2f865bd56535a4767d41eca632c8842a700d1d04b0a 0a6decdac69e9abfe2ac538b68f580f9c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4c98a43fcee9a6ad9f05e88f62b870a2d3ac2eabb937af5a9ed3e1516f35bd3 2c1bbb1e080e4c12ea9fa66d1201f5b068bc4f18f4354b365b9600a68845f936 a92c7541ddbf46f102789379776b6f333e569694243a6cbc015a8eb52fa04be9 a0fb168840a8420bf99640c6f334dcd0516f40191ae713f34830d89e9a40e5af d". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "44" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "44". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and Baldwin Informational, Expires 12/25/1999 1836 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 71 Set buffer "input" to hex value "436035e4990469404c7b3443a9713da 3367ac77e8688e8fedd6c2f865bd56535a4767d41eca632c8842a700d1d04b0a 0a6decdac69e9abfe2ac538b68f580f9c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3b35554360d1923be668d88819cbc0fc511b8f753997cd4ec496c37373e2a5b 7c18980500f2d593d67b82fb5". Note: Case 72 Set buffer "input" to hex value "679b0d4c300bfcde4cae1dff8e47ed0 900c08d7aaabad58c6a8a8c99bc8b71b7d7862dd46f48411038018f10439bbb4 1fca383c9be187c8976afed9e59bed042". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "17076831d73731240136cc0a6a3b9069d2f5fcad85bc32a10fb99f350c6c621 Baldwin Informational, Expires 12/25/1999 1837 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bc468063a086dfd0d4fb91f5f". Note: Case 73 Set buffer "input" to hex value "c3002ed55d2ebe3868d236c4e7a18b6 dd4829730b0a09d1b6e52cc32583f43004a5e1dc8b52296e966b1db79b6c3503 c088144eb5c2c574e8680bf1a702ef893". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0d1d20a6d3ef718fe582febdf7e3a075089f2b54db0c669dd943b9c01956a9a 3943c9e97e1acfb3ad4f1a6a9". Note: Case 74 Set buffer "input" to hex value "673ba4ed59d01c611b5d339b3775f23 b67cd0f04aeb531029a27bd28912abb8efca578b8d2b5fcbabe56b1fe9070e0b d866e123a25d8557947d8dcb3ce71d5d0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "13088cbf279a00952c9706334118c5056f08410703eb0c4f1693860fb1ecc18 d42ded01ae8afa2350cb54912". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1838 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "512" bytes. Create buffer "digest" of decimal value "256" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "256". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 75 Set buffer "input" to hex value "2944e16195f38e3a2226f5a3807beed a4fcc2fbc532558349df0e1ae302e4e901aea4a8e9ec099de3b383ac94574f3e 3ebf815572fb50bcc83259d09a5343af3424947698ffe60dcfd54cf08417b164 5065fc4898dbf16a9cb177cc8badf28861a3da66bf3375c5ca46116411f98536 70ab925cb5b3a551e1b418feee3183c7bc410252d018299d0673076170a80cd8 c9d8f38ba1777b9baff0b8e47f65fab576e1b6e8be0179da0b4661432efc6070 7ec83c000739957972ab48a4989f064b2436035e4990469404c7b3443a9713da 3367ac77e8688e8fedd6c2f865bd56535a4767d41eca632c8842a700d1d04b0a 0a6decdac69e9abfe2ac538b68f580f9cc410252d018299d0673076170a80cd8 c9d8f38ba1777b9baff0b8e47f65fab576e1b6e8be0179da0b4661432efc6070 7ec83c000739957972ab48a4989f064b2436035e4990469404c7b3443a9713da 3367ac77e8688e8fedd6c2f865bd56535a4767d41eca632c8842a700d1d04b0a 0a6decdac69e9abfe2ac538b68f580f9c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1839 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "79ad9890bc3f246dda8dcbaab73d703120328507aaca040742b633fa4be216e ad3a6d3365daa201d09dba98f527bbaba513e7dbdce24ea2a970937f4344dd90 ffedd885924b9d4fdf1c689fe14cc801e8bc77ac33b35554360d1923be668d88 819cbc0fc511b8f753997cdb0a0b90d1d1b637011d45416439778850b32e5b2f 6f80f1f44da512b27c5dbd2cee30bd707935b449599a4035fc30fee26d7ab363 cc90355bb641f8a21468c1d4b01b137b730f56f942e9811f721f3e02a490d1a7 7df9db5a02a6531dfa9797225ba4d6e803e78c0dc7d6d0a74777e9db3ad1a584 07e74841ad7b48fe18b0102896a7faa9cd6ab917b16a74c0f3f8547856612187 e". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "1000" bytes. Create buffer "digest" of decimal value "512" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "512". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 76 Set buffer "input" to hex value "80d5cb8b0f3335ae59b696500b011e4 Baldwin Informational, Expires 12/25/1999 1840 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 9291e2d66259f3f46b3b1ad268b4c5ad4a8e14ebe6044c562825ecac7028968f 35eb3523d269ff929cf388d7c92ea981b2944e16195f38e3a2226f5a3807beed a4fcc2fbc532558349df0e1ae302e4e901aea4a8e9ec099de3b383ac94574f3e 3ebf815572fb50bcc83259d09a5343af312125eef064ae13c1bb0863bdc09de0 fa2ab5ff032c60331d1ccccbe4ec9fe59363bb792d73aca0ec7944feec26ea19 b3b89bb95582e5e1c5c9ac224f4c5f0c104d7bfd047550e476957c6c4272ded8 b7e2081b4c9cd9545a5ea0786257d87e2333b5fd401780eb428b5c4f494c14ec 40e8dd32cce5cbbea3e40a060e2e94c07424947698ffe60dcfd54cf08417b164 5065fc4898dbf16a9cb177cc8badf28861a3da66bf3375c5ca46116411f98536 70ab925cb5b3a551e1b418feee3183c7bc410252d018299d0673076170a80cd8 c9d8f38ba1777b9baff0b8e47f65fab576e1b6e8be0179da0b4661432efc6070 7ec83c000739957972ab48a4989f064b2436035e4990469404c7b3443a9713da 3367ac77e8688e8fedd6c2f865bd56535a4767d41eca632c8842a700d1d04b0a 0a6decdac69e9abfe2ac538b68f580f9c2944e16195f38e3a2226f5a3807beed a4fcc2fbc532558349df0e1ae302e4e901aea4a8e9ec099de3b383ac94574f3e 3ebf815572fb50bcc83259d09a5343af3424947698ffe60dcfd54cf08417b164 5065fc4898dbf16a9cb177cc8badf28861a3da66bf3375c5ca46116411f98536 70ab925cb5b3a551e1b418feee3183c7bc410252d018299d0673076170a80cd8 c9d8f38ba1777b9baff0b8e47f65fab576e1b6e8be0179da0b4661432efc6070 7ec83c000739957972ab48a4989f064b2436035e4990469404c7b3443a9713da 3367ac77e8688e8fedd6c2f865bd56535a4767d41eca632c8842a700d1d04b0a 0a6decdac69e9abfe2ac538b68f580f9c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b96a026dfae8b3fad4ea7b799a905036c39d3c09747028f81857ba3b98c03a5 f8e86e269bcc5b30995087949297cf379b3306e9173e1065783fd1ddd5f54f1b afff4fad43243dd6140e972b5fcc6abf8bbe279343002ab1476aac1750762953 ba7801bd64e8ae1e119dcabfca225eedab7049876e687e8a3a6fc32535ea581c 679ad9890bc3f246dda8dcbaab73d703120328507aaca040742b633fa4be216e ad3a6d3365daa201d09dba98f527bbaba513e7dbdce24ea2a970937f4344dd90 ffedd885924b9d4fdf1c689fe14cc801e8bc77ac33b35554360d1923be668d88 819cbc0fc511b8f753997cdb0a0b90d1d1b637011d45416439778850b32e5b22 194f95cdc284e33879f9b481e3dc65367f2719201ee98e589204d5c138d93f32 da757f733237d246386858774f8c94e5e5645a8ea9208b6713e9820b4188987c cd0683fd529526213d215aa66902164b1aeca23aa45a78f3321267f02fced4af 27c5101f6b9e902380e0b254e1cf551ad7cd46b507be1485ad4d093b2772d328 0f80f1f44da512b27c5dbd2cee30bd707935b449599a4035fc30fee26d7ab363 cc90355bb641f8a21468c1d4b01b137b730f56f942e9811f721f3e02a490d1ad ffe88f0327153f19a1bb5d4ac6ee64e69a513abbaef87139a66d11a212c7d3b7 b970f30809a0109b6d702ff2a7eb1a3b86a254d55e70504864f497cab61a6e19 Baldwin Informational, Expires 12/25/1999 1841 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 3". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "512" bytes. Create buffer "digest" of decimal value "25" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "25". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 77 Set buffer "input" to hex value "12125eef064ae13c1bb0863bdc09de0 fa2ab5ff032c60331d1ccccbe4ec9fe59363bb792d73aca0ec7944feec26ea19 b3b89bb95582e5e1c5c9ac224f4c5f0c1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1842 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7d0d0726820607ae60d50b296f8c0ea20803a01db864cae880". Note: Case 78 Set buffer "input" to hex value "04d7bfd047550e476957c6c4272ded8 b7e2081b4c9cd9545a5ea0786257d87e2333b5fd401780eb428b5c4f494c14ec 40e8dd32cce5cbbea3e40a060e2e94c07". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6fb2314b0a4763c2d9dd316504765b5ad69608d4efcc9d892c". Note: Case 79 Set buffer "input" to hex value "56e3e6ca6d4e5182c0cb5c0b99ac401 cc51c19a345ed920cde09e3228da661517fd8a78acec40c3018bd0b6169330b0 3c4c0fdfef20ffd1878b2262385edcba1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b64ce9faa92db6b462e0d496b5756cafc628d85e6f9573e56c". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1843 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "2" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "2". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 80 Set buffer "input" to hex value "e63596e76d2a5e8743e41a71bd8cf0a 6ef1702249581d3a44a7d9878acefc621d01e90c655912cb924289f26162ca8b 325788b58dd16b5b497e093fbd8b01721". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "845c". Note: Case 81 Baldwin Informational, Expires 12/25/1999 1844 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "f67b424092b53bd3972d07c3aedb10a 059149894e986e3af87a4528e70db116082d2136e3b6e9c04d3915ff54ac97b4 acf45fa59115a7ca269099afedad1f073". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d33c". Note: Case 82 Set buffer "input" to hex value "f946a587332c6783841031f869fd621 e3a47ca78a425f87ecc653ed6a5e3eb71863b055e9d1ca39e78235317725982d bcfdf06a31dcd24c845229527820b9e17". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "dc90". Note: Case 83 Set buffer "input" to hex value "2c780b634a6bea1c6241c5ff71e3cd6 2e17e6d7fd3c69f7d4e512368d8612bb8059c2d6455dfe25042de975107d03bc 88f089988c48a2b96e67b3d05b3973873". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 1845 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6ff6". Note: Case 84 Set buffer "input" to hex value "46c7bc4ec7e27862d60040128efba8d 7f611e427dde4c8391f6aa67b7abd6893be856eb9debac38690db018302158ab 2fab8aa10b2d7a41fbd210c80c7bcddd2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "07e6". Note: Case 85 Set buffer "input" to hex value "9b1be4346df155d1c8446aa245597c9 61c52a89dc7e20abc747081b0ebc62f2735eb6b25c54885921bd0dafe292993d 55650b2866f17edb76080253f2d3311b5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "009e". Note: Case 86 Set buffer "input" to hex value "293d76ba9ae6f68cdd8b342ba66983b Baldwin Informational, Expires 12/25/1999 1846 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 f8cda268592c230b09471bb541770e67a0fbcebdbca00bec6e4f916a3a9dde7d b4bb56ee26d3f92a08356c74953dd3bb5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7c99". Note: Case 87 Set buffer "input" to hex value "56a3408e80db84e53cea63a7b47fcf9 c58c56d1bd34b07b76f629ca2864d2c0d4e1993ccaab21d1bb52773cce90ef52 ebc2dcd8670e1daaa2abc6a43484aaedc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "10ee". Note: Case 88 Set buffer "input" to hex value "b063da46b50720cf13c0e230d5fffd1 16d1b1a9262447a553c0efcf07b369b7b74a306fe728cea9a9088c3ebf244fe8 e584bd14deea967563875c10bf2b68e2b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1847 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c190". Note: Case 89 Set buffer "input" to hex value "d03b192739bc99a123d1582a709a747 c4348508c8cddf43f486dca0d9fc220ea227277c0314b43598f2f792b156726e 93a35b12eacb4de49463f3928cde65d35". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3fe7". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "3" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "3". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 1848 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 90 Set buffer "input" to hex value "75298e5cc59af8ad6a883796113f68f a96c34b87e6895a9671ce964885a87db0ded3c976ce268b3b9d47b1dd140d38f a72f7487d58a23a767720df728e2227a4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b81568". Note: Case 91 Set buffer "input" to hex value "29d656955d7cc8b992aa5e2a4d07923 54de07d318057d2224e2ae45b4e3df9687c9f0c8af02c67070a48b1da53a00bd 3db4d419022622fdbc000f96de87a11a5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5af722". Note: Case 92 Baldwin Informational, Expires 12/25/1999 1849 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "a5527c8578551f293638ecd67d2bf50 b787a5d846a9a8665a8be907878ac4e8a9436b8b20f19a108211eafada7aed40 39a2e72a0e4b86b3d1d24ac989951b7ab". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "328f57". Note: Case 93 Set buffer "input" to hex value "8d99c4fb33d171d6b1713e794d698ae d327303d1810929096945cce0840a40fc5150961432764d65cb53f8cc5078ace 2f7c8b31b9dfc7a6dfd380a3d0058c44e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1770f6". Note: Case 94 Set buffer "input" to hex value "f9ffd620309711cdbba1d88f5e85183 1545f5f032512684f3d311bd7e39f90b35fa638f879c608a9265464d95765c8a b7d5f2afe9d2064e3f8c7f46a493c512f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 1850 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3d6ff8". Note: Case 95 Set buffer "input" to hex value "502d576540caf10a55f12398c265d53 f1c48b465a1811d9e0018ca9ffb160b5fdbcb1e7ea3328c5694190d50e420149 cc3dd75aace57216eee2e53183b41420f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8da999". Note: Case 96 Set buffer "input" to hex value "81d6b071fc77b43d5efc3af029c4de9 7137a27f225969725af7618cc04fa857a10eb76381477b5c8a7d2681fd852045 6d9b3ae2f3972f117ca0daadd126a3fcf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "66498c". Note: Case 97 Set buffer "input" to hex value "7ecce551ff50e5179e56c923045811c Baldwin Informational, Expires 12/25/1999 1851 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 4b146b2cc45c932b851665f394c5e4beb690a068b661ec60b3a94f2d9a585f4b f6e152c8130cd32efe2ca68a77c3d1597". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7adc90". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "4" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "4". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 98 Baldwin Informational, Expires 12/25/1999 1852 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "ba62e4d9f590cd4e89e66658f3de540 fd6a411c711e31d60c8fb7d135bf70fc48fcbc03a454b7b87bc191e6984287e2 04c852b61392b3a03a06804a94c41a5a9". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "25d9f281". Note: Case 99 Set buffer "input" to hex value "8168572d190eb3a86b4ca25e02782ba 22ceb5c1ede921446f01e8bc49321e4d0319318094d331c13f9933bad0bac4e8 20676a9de2a4af7c5190a92f47b3b21bb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "fe9f43a5". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Baldwin Informational, Expires 12/25/1999 1853 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "5" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "5". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 100 Set buffer "input" to hex value "7236e7fadfc4936fb010abf9b7b95fa c6857ba48e7782d571017f52f62c45f79f2594121c28de6be4aa3e190f90ab8b 35846254fe2fac07ba9cf2a71d7872eb1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "29062fc870". Note: Case 101 Set buffer "input" to hex value "9e159e0d3c845b02dcb9948dbcab5aa 2ceba5e73b0a874a9b2f6da8a1f98521ad17e0b215d28c995cd7f276a716e399 9ca94f4de8e048bf65ae47af3d7ab3235". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1854 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "773c5ce6cd". Note: Case 101 Set buffer "input" to hex value "922fb0ce5527e4b9364f7beecaf4a93 3106ffcabb7414f7efd4415a704b5e55b718e56da00edb2741dd8866eb61eed4 f2a1abfa1760b4a0f69f36bbabb7aa947". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "63e19bd939". Note: Case 102 Set buffer "input" to hex value "4cfa4dc436617dec656e41cdf5a2717 0da830e47920c6564c896041acf60a10b0040ada2edc1e73221949260aabb86a 15c9e99e7c82ac4a556e751e7f9608808". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "afea35b421". Baldwin Informational, Expires 12/25/1999 1855 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 103 Set buffer "input" to hex value "788a31dcbf0a4c83114e6770fe1d88e b685430a0137c6f38c91d6f0f884c80efa7c08beba05e4adac92df48b1264ac3 76d6bbec2c10653ecd138f38316335074". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c9e0b2170a". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "6" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "6". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1856 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: Case 104 Set buffer "input" to hex value "fcb9536eed8d3e05c6b5060870179b4 8cf750663526bef2e6c51378c07724df7b745b03469e68bfc98b66344368ec4b d26b098f01c0608afd2cf1e6752198f7f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "711af1376e52". Note: Case 105 Set buffer "input" to hex value "e036e41aa5fb46664b102a1462a9c3d ebfad588826a05d70030f3f28cba38f06539d91048342be6f7a2f1cbbe1f62cb 70f44f255998a2a3077ea110eff59a2a7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bd7a33177ee4". Note: Case 106 Set buffer "input" to hex value "1f68377c2aec436e402a9aed5f899cb 575addbb96d6a7c97ba4d09164b0b46c020d3e8507bf0e987f0cb0ca3d879520 cfbd45449705e093ddf2a63531ac668d8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1857 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "cac46a2d6344". Note: Case 107 Set buffer "input" to hex value "444018bc7308a20dff9129057af5c15 6a8f453c831527003d9594e99b03da69da0d693a2578da14fbbf621d3f90cec8 9f9900c3a084b6d6151705f8bea4ec557". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "619f5a872cff". Note: Case 108 Set buffer "input" to hex value "9cfea0c7e3c7b6a2d2c924065937633 d17a40ed180e333c7c02820dc2c4ddfcc6cf328d08172500c87158e169f8ad80 ecfb403ad9d533df0c0e493676dc82107". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "92fa6b5c8aa8". Baldwin Informational, Expires 12/25/1999 1858 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 109 Set buffer "input" to hex value "db90bd046a1d8052b9a3ecbf502f93e 2a47b8e245f340fa9603ed3368173129fd6aa6dad1e243cbab73c0cc08255f0b c3cffdf4363113abd3023a9ee0d05bd00". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "afe8a2685dab". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "7" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "7". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1859 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 110 Set buffer "input" to hex value "ebe625d97fcdcf7dbecb14265c45ac7 951e7672f724b00ade78f25d15ae32076d48933e36f2909a290fb6f2be5b4cc8 690eb00ef3512411c1f2a4c99c31d6340". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8faecf1ecd1d1b". Note: Case 111 Set buffer "input" to hex value "7d53f4c64bbae5b0ea65665d1dfaa19 c4b6fb7f397cb801eda3f7765dd8d047f7dc2f498ae2e35fdf8152af896462f5 e73c0569948ccb70d797dbb4dc59424a2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7142c548148725". Note: Case 112 Set buffer "input" to hex value "8c28c9ce68583e9eadc03b87f0db865 39bdf75e3c838890d7468dee36f4aa98ca408499849b3c7986cae75c35d485db a6c61bb57880df0c92ad292c86e20637d". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 1860 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4af358fe39c6bc". Note: Case 113 Set buffer "input" to hex value "dede0f17077f0cfd9075cb2b797b1a0 a3a3b294dc39cf1f78052ca7b1598d5be6d54a8276e133440b658234c7ec0dc7 cfb3d4b537c82aa920173c14e7d4741bd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f2bc15d1cb17a3". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "8" bytes. Baldwin Informational, Expires 12/25/1999 1861 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "8". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 114 Set buffer "input" to hex value "9058e3e6bba94527ceef6189f1091ad acbc8ab4e5787febbb1f7a44f0f05f96ee37b205dd2625d4b4ca9d41aadae361 9b51ae8e10ed4f62499ebf9de5ac48e86". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4981df90a4c7e5cc". Note: Case 115 Set buffer "input" to hex value "aa2be83649040b6b4725eed4cde35e7 6b182ed965f3db1af3bb58e115f7405191123aca13aa97818ba1bf0234a38582 994f3668ff2cafeb0b946d71c3fb2752e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free Baldwin Informational, Expires 12/25/1999 1862 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "dba728ba227bcc85". Note: Case 116 Set buffer "input" to hex value "01eb8459992a903587662f0598f0af8 4723fb212bc904430b08c30a4e71a4dc89eae336ce78551ab464945d1baee490 fd316d3695541f98fa93173d981ec4e9f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b90dca1e289b1f71". Note: Case 117 Set buffer "input" to hex value "2c25c78f8c709d295fd4d3137bf75f6 b730f0eae4aeaf074bf1be1ce54c4e80e67efceb0e7fc3ffd3aa9fceaa47ab26 015ce2d0d91e98d036f76b1f19b3378ad". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0dd2c2ace6687bbb". Baldwin Informational, Expires 12/25/1999 1863 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 118 Set buffer "input" to hex value "2374db50d6104b3b923f07f285f6f7a 16798ce0fd5a2dc304a925a3b3e3da8ae83cd7e8f7d33eaaf5ed64d9001ab3f9 b6676082c1a0fdef0158681dd9c795484". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6c01f38988a06686". Note: Case 119 Set buffer "input" to hex value "7ae545e5638e7fd394f198617625f19 3626a9eff09a8e6fe7b3d08340dde0fefbce4f32eb167a3b13d0e385385b3a14 6b6d104b8e1302e2a7d3e7bb52eecf4ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a99864416706d3a8". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1864 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "9" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "9". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 120 Set buffer "input" to hex value "4e7754e8beea94fbc945282d500b48f cdd03a8834504e6d0434d2771aaf5f98856b22474a7cfa7b1ba7998301906453 9d5507603f2bd51e7d7fbee5dd21c54e7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1b3afff911ac270c3d". Note: Case 121 Set buffer "input" to hex value "7730d9af33521642242b16405aeb6c0 e64fc3eaba9d25d927c249df8d4f5e35eb49fe458e05a53f10d195043946651d ac0c8c947dc531325f4d42b9581233991". Baldwin Informational, Expires 12/25/1999 1865 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0aafcccacdd92425dc". Note: Case 122 Set buffer "input" to hex value "e7250405b97eee260a643f27bb3b66b e3ce51a3e615b172373c4efbf7af7336058459601f876ca6732e0972d6c14242 0511ca358b4a3e986b35080e5550f4d10". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "655be9eb0d0980707a". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Baldwin Informational, Expires 12/25/1999 1866 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "digest" of decimal value "10" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "10". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 123 Set buffer "input" to hex value "e1adf0c73905afe2f180be19b0f35fc a1586b6fcc1f293c57d4d6b5976fadb52ee42c8f2a02921e8f0834a0e7641252 4958bf0697689cdadd670078eedb7b579". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9ba8f12d28e2dbc313b4". Note: Case 124 Set buffer "input" to hex value "96083455215916bc6cf2f515123b2f3 f7e7fff410cb6cd36c95d3e345b9f567e8a9508f064d4b352a4563ff6b17e127 5a0794f7883247e6a616dac58482c477c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1867 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "cad0a20621d10e48c1a1". Note: Case 125 Set buffer "input" to hex value "edcd8e4446f752c96b2defbe0a89069 88a51eeca816a23467b0f22609db9f15e1e1f0628d7d79dde239bc6dbc71d0a5 321a3a94d32e527080e3d0c77f22505cc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2d80f3b65eb3d1120084". Note: Case 126 Set buffer "input" to hex value "3c9346447c98bd576025037892bdedc 55ad165f5cc8d6c1565ae4f636b42b4a84c1192dcd125dbf51b90775fe5a6c75 c818c9cd84438b0a09fed6a7c7f322eec". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 1868 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "5ef9009b937a06e79f3c". Note: Case 127 Set buffer "input" to hex value "37ff651514f8dda02fde3c9aca7cd1b 7e0fbc3eec04aa60cafb079be7feb76cb1bcf8a4084bde8589c0bbf599b31f5d 97d922fdd2c5943cac04e9668655fe9a8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "20463507a7f3efd278e3". Note: Case 128 Set buffer "input" to hex value "3f81d85d75153c6749dca621b570c6a 3c6926261f3b1670af656442a3186e487bb13d97becbb83ecf180b1195466efc 103fc976a3a26d6f27f5ba6f5bdd65935". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "03b23a85ad2afd22e8f6". Note: Case 129 Set buffer "input" to hex value "65746dd3452154c188f66a0ebe73b93 b092ce854353eb96fbb53acec47414af6e9e19262107b19520ae21ae5fe4f17d 5cad394ce4f54320ea84351770611ded2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 1869 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bf296a10f3a9e32f5ab6". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "11" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "11". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 130 Set buffer "input" to hex value "54f6e771c83a2e3ba5261d4f8c4b009 965524f13c506295be39a189be25192baa55751c62a1dbedc23d61eadcbfb1ce Baldwin Informational, Expires 12/25/1999 1870 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 ec4ddc1f22d826b28b82da44ebc388e8e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7b34ea4b13bed6afe69e73". Note: Case 131 Set buffer "input" to hex value "78104ca000a890ec840f90cd6ab340e 473817756323118bb451a7648eeb4f0c858857f447199632fa8f6251fe468cd2 e6ebf830a40f5b1034321c46405e890ce". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "372fc225bdef2efa4fc9bc". Note: Case 132 Set buffer "input" to hex value "5d512e140181295d775eea3568a18ce e263136552a9f3fa00c7cb48a0963099243d78057a2495d4478a6fe0e79c010a 0a929a50130b2e69a3936523488318e39". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 1871 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "de310c6aa672c5a23d6434". Note: Case 133 Set buffer "input" to hex value "88e9438cfcac063f499e918200122f7 a1491025ed12367a3e5947dd756e238b9c1595e878c9726eb8730b2d81f92ea9 2dcce95ad99b113fc5e67e6d09c59006f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5a5d1b58f993cee3bb3d41". Note: Case 134 Set buffer "input" to hex value "29d2ce0307b3ec4b0629793fcdc7af1 b5c48b285061bfe1643acc4c2bb80cc19c14acb1149d65b432a5f91a120f6af6 995889bf384f71ad24716d070e23d2fcc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4b6a89203ec02bd98bff0e". Baldwin Informational, Expires 12/25/1999 1872 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 135 Set buffer "input" to hex value "5627efedfeca60437808923c2f880b6 d19b0dbcbd50c3b2577e971f588e254159b9545e41f193aa1d6c123f84362ff1 12093a9ce138239ebbd9ff4ba92feb9fe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "053f227996c75c36a0c654". Note: Case 136 Set buffer "input" to hex value "365e3f9fd8910a6108fa4f05dd08266 768a401a80f93132684836be79960c9655a4dc4bcba5d02143fd509060ead131 0dddef6bbafc222a06360915cb3485fac". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3c0ee7bbe5840416f85733". Note: Case 137 Set buffer "input" to hex value "75dec9a0b31244b4085f2ce193721ff bace0c8c2ff148d87253457cbc7b5935044d84a64cbd2eb6703c2aab0e7f5dc4 07b7ba72faea92f449422f66a8fffb504". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1873 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8b79a7b4d4546f7ade4e28". Note: Case 138 Set buffer "input" to hex value "6c3f3cc1830063b4e9b9040520e6fb5 6db45f4cfae7a422cd19c9658c30451f76b5a8083cd4a3f3765f9dd996a5acfb bdae6c5b48940ec84435c667ca721b937". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "92af4e52b48debd7799b6a". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "12" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1874 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "12". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 139 Set buffer "input" to hex value "790b9c8df13d4d7976ea7a1a21bd4a5 681a2050f0611ff50eff4131a467125c2d739e7d87e23fefc50b59db72dcde1e 0ceb812caf376a8b00fac3dbb0c4cd1c4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4604e3827ed85ae36b29af9c". Note: Case 140 Set buffer "input" to hex value "a43337110f60aad787a7e61875e8ce5 76fdd25e5e40b374c0badd614817baba400e08bf65cc70b6eea8cee25c00f05e 64d208ef2055ea7525790e4986ca46557". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1875 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d0008dde25117de368a64b46". Note: Case 141 Set buffer "input" to hex value "9ea5748856688be293a5218d0e9b8cf ce3f381c6eac2c8885915dd2ffcf4e53b3f0c568e9dc5662df0a25ac408c8b10 1607d5f0976610a49ea526a5cb9f335ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6db697d63b1e3e3a596ab25f". Note: Case 142 Set buffer "input" to hex value "08f8067ea8b38e94fea578fa6d3bec6 fb736b4a2c65f50ef163d66fa1c10d78492ae33f06bec97814ad997ad0df0e4d 745734876f4865e535856d8635ce01449". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ad7f988f510b2cbd741f675b". Note: Case 143 Baldwin Informational, Expires 12/25/1999 1876 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "d1b696cfa0c2cf5823c15ec362acfc4 4344c4e2581cf018886e4ae11a13ccded57a43cc7f42ba4a18b5ae2f36828b1c f9470985fb3bd359bfae91e236a19d70a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "031af3b821605a9e0eb33fa4". Note: Case 144 Set buffer "input" to hex value "12c7cc752a4bbb3e05183ea55e3840a 3b1f94ccd8af1e06d9264283a02c77cf3b10616d7e5f026f21f88239e3b51c03 05790682bb60b7db6aeb774df701ac19f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ded4d0026a922d523f327df9". Note: Case 145 Set buffer "input" to hex value "24326850aadb4f674bf2f1e563b9919 8d0f86c09313a0f00e0dfbb9a5cb8469e190170c95fba7376f2a8f6ce01cc0ea adf32fbf906123697685f475df862d736". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1877 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7a8f2ebdfbe456a67a58207d". Note: Case 146 Set buffer "input" to hex value "2c91d81cd831cfe23670949936d4f6d ad8b752aef705f94d9352f4c6c68fa574a525def492fcfd44bf81046aa99e255 fc132e91875192b1f25b88e28cca99625". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "76942df7e4095618a078c51b". Note: Case 147 Set buffer "input" to hex value "8a9494baa8ea500b3f6322fae28f30b 3f87ea811d96428c4b26438491d27130d6858ab23015e2316632814eb43ffa03 3fb23c18134b307f5bf354b216d3a8251". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 1878 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "362ebabcf4d77300b84495ba". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "13" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "13". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 148 Set buffer "input" to hex value "918eda65fa5ce91d57607c7b4682b82 cd94fdf04a256b97702cb2180624249569d8abe1b61b9e6f610bb086f2f971e6 3fbe5144fa166da64e2e4e6828f5cfadd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1879 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d2cd84550d4d06efe89d84b8c8". Note: Case 149 Set buffer "input" to hex value "bab23a9a1acb38badb28ceb436f0cde eb6f18faff87bccd46666793d83ee761227dca86e702629637dc9c58477cc540 61bff27f4d6b74bf38fa890259716c41d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a5994a9cf45716b140dac9de39". Note: Case 150 Set buffer "input" to hex value "37e24b4faef87c36dc655ab483076d3 1aaa9bb1fe02eda02b4228f3960ff2f46c5da973e0b9b43bc197244cdf32445e c747765f617066cbe512c2ff605a54784". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ff118992f2203f787e8d5b221d". Note: Case 151 Set buffer "input" to hex value "22fb6a512afffe4cbee11056dcfeeb0 0dc09c852df48eae923cf5e586d8fb6db402b21abaa1ae61836b1ec3a5faf5f4 Baldwin Informational, Expires 12/25/1999 1880 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 cb84dac6d567587836ef35eb34feba6e0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e7ad3f9a74a8edc7cc974a8403". Note: Case 152 Set buffer "input" to hex value "3e6f42d692adaaf4e78f6706506f974 39aa49a673b57f2ec259400cd84324238319c013f7427d2b9bbf1ddb57ed2646 d4a55fda517fdd81b2578d28d0dfe1c5d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9632b8440b9a6572389e27be78". Note: Case 153 Set buffer "input" to hex value "712d545331f05aa05190f32bf1c1813 d31ad160bfc20518365401d969d60c5b97bb473432bf26e76c237fefa1eee114 23414b740daacebc02669a3cc18ae9eac". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 1881 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6baed0ea46306077c46ec2f07c". Note: Case 154 Set buffer "input" to hex value "9e91d6cbc99ed92d9e045d5063b67d2 b451387c72716a742978a93b0dd3713c09b906ad44602b4b2d58b5b57041d94b 09dc632edb780bac1c54966bf1fa02a61". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "edc26cda2ad89035baa75bd3f8". Note: Case 156 Set buffer "input" to hex value "edc641c013f04abe8b73949ccda2998 fe30479c66c8e5902bcf7b8ebc360371baf8b75e87b556f9c2a43e2912ce5c39 c37128d1d14df7dcbe1ab636e9af1016f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "851c6ada4371c0925df6240227". Baldwin Informational, Expires 12/25/1999 1882 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 157 Set buffer "input" to hex value "5f3bdd91d276cbaaa54c9f305aa9d84 842a5c7b4566870a740e2e52a7f517440652a4bf42257fc3ab6bff1af313e5b1 922ba0ff7e984d149338a36bf8ed46ae4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3289688e14e497726c7e95caf9". Note: Case 158 Set buffer "input" to hex value "fd37ed70fb0fa83cba1dcf712b136a4 3227223f735fe6dc66dd18805142e239a970a0b278f11971be0ecfa40b3da21b 4a9beca53d581c6eeff51337478ff61f9". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ee991995254e4f4185ee3b3c13". Note: Case 159 Set buffer "input" to hex value "e8c4d52ab8812c5af246111218d39e9 68469badcc7f906e03c5aee3999b859dd636c6597b5e3e879493b58bd7e6835e 01077a26d3e8435ef98dde188be6a7ac7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1883 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "64fdd3dd0fdb2dd040773420c9". Note: Case 160 Set buffer "input" to hex value "f51b6b5594522f0987a957ad136c3a8 690de1837ff0359cce939bfa3278c3db86cffa84f114dcc131d7e821150617de f1588b80aecb67f93a7340bfe4186108d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7a7c629896e170f79ad26ed246". Note: Case 161 Set buffer "input" to hex value "072e4e8a4aa52a92e10c04a7a7f6623 07cfacd85574bc7802e6f693d1184a9da412c2d66699f647f270925061088ee5 ce9003ff3907039d9b598c41d24086fb5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1884 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "digest". Check equality of buffer "digest" with hex value "5bfe61af77cb6481664555c66f". Note: Case 162 Set buffer "input" to hex value "29c9d94535b875109e284738a881a17 1fd52c89e5c33b8f7fd7881c8ae6b6bd8b215edde75f31bda5faa56056d9ca5c 2f6cb6808ff3e7ed2a0da04fc835e424d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d759356b44584fb3967fee9a15". Note: Case 163 Set buffer "input" to hex value "96ccd75f6b2eb3580d8db3475508603 d48a4641bec0eedf1d14491f05157d3314b3fab52904f61d0ca201ef665100d2 67cb9e1e4ed63ae790d3866b6b78998bf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2e877de5b356cf7ad90e4f2250". Note: Case 164 Set buffer "input" to hex value "bc707a109a5b5120999ef9a1693c624 7c07a3589c4df1d7e1f0a3159f162f44a2416429b166524a87f30e2caa0da23c 8401baa8f5ce844fd6c7c7f6a2d39dd64". Baldwin Informational, Expires 12/25/1999 1885 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "73af8126b3eebfa04f4fd5f49a". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFMAC00". This is the start of test case "TFMD200". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Content-based test for MD2. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD2", "NULL_PTR". Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1886 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_MD2" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD2" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1 Set buffer "input" to hex value "4778ec68d5391ec842b6d8b3a61fe02 20a18489854d74fdcdab267cf8a0c0c6efa71fef6f118c1a5b2e2d4ce9b76568 5058e5e6f5a1c3d3a42bb091f6bcc5c69". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f1b75e8a24fab4d8d09591f3951f8885". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Baldwin Informational, Expires 12/25/1999 1887 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD2" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2 Set buffer "input" to hex value "f1eccf5e41991fbfb1903324fd32211 9e250c29bcd2e60aa4670b723cccfacfbecd259efba8ed95764a1db939235e76 4b455c258b50d21cb4ae777929cb6d8f4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "da7523b1399a1cdeb54108cbf0df6c8d". Note: Case 3 Set buffer "input" to hex value "0f64a730e0e4ccfbb9960fdb1200e8e 3cb75ead5a0df047918dfd13f30caeb65fb79e2a7f4bce63462a2d13e1af723a d819b50fff33de6e8a207972cb57e8909". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1888 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5312b76418e76914246f24c85b7f255b". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD2" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 4 Set buffer "input" to hex value "9c8f9237cde80516a42da869f3e23b9 ee1a0c8a6848be481ee23a4c2ce3e07d4227ea8d719aaa2922eeb8e84f683279 5261adc1d3380bcf476607c2909c71ffe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1889 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6286421ea3869dcf5dc342cfc229b571". Note: Case 5 Set buffer "input" to hex value "6a52db130fc87d7d7550457eef56cc1 a6e8d6422774e665404c8a02c967111b89516984819b594e1555afcdbb68eb73 84f44eec098a138cbcca6a0f703d57ef3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8ebda6fc699336158a192b407f09f8c8". Note: Case 6 Set buffer "input" to hex value "ffe42622563d86f8a4b6960006e3044 aa085de7e22c9301d939050362848ac2fcfdff29dd032db43b1cd452ff34ef11 2c0921d503bb5587bce215bc0023dee37". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 1890 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "278011bc77c327fff0c7ef651eb644cb". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD2" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 7 Set buffer "input" to hex value "8ce0a4ac1567dbcc4fd9f8261119bef 0033fa49f53427b85e7660e25504375521007a83982fc938f334da72eeac17eb 6cde0aba0a9de70e7dd14572367941090". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1891 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "19d26df4f8c46c4c6d768d146cdbb367". Note: Case 8 Set buffer "input" to hex value "b7b6c149372852c18a895b412d6fea4 8b30488484ad33f6008699d1c12ca50c993a152f63d95fec6dc9999ebce6ce1b 09662da3fae351d2279355376eb7bbc70". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bd542eb6bf96c80bcb757b5a0ec2b57f". Note: Case 9 Set buffer "input" to hex value "0459ff5ad334dbb4c2f7e13e8eba485 17b602246223d1d32b1cea86ad7534a55e60894060e8eda3c83c30cdfe4a6ce3 ec7f7715ff81d791b267965229925eb91". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "28a6384102abb3c020ffdec194075959". Note: Case 10 Set buffer "input" to hex value "654ac6466ee8154059d9b7d1495ecb2 744ec8c0510ec39fe7fed783d41062aa8e02448e7670ab4d0e568d547832f994 Baldwin Informational, Expires 12/25/1999 1892 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 d1c32a10e36eb2f09c35911ebf0c30dac". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a4156fd8cbf42dc81c02e1b691aca5dc". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD2" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 11 Baldwin Informational, Expires 12/25/1999 1893 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "5e82f7fdf97641a944c46489542fbeb b1295d9e05824452417bf8cf50843c74452e1c80d2d90917f5fe2dd854e4f63f f99dadfc5b3e9d63552608373811a624e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6d41ce1b11e9a60004d9451feed158ad". Note: Case 12 Set buffer "input" to hex value "0be9831b351a352654757ca9318ff1b a9de10452f9a6b7e29d44b61e9b8632fcd0de6be125cd309eb28b953ad983c18 b4e8fbb36bb059b8f612d4a13a1a0e1f2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5a263accdfd25ade0d4742abb82c6543". Note: Case 13 Set buffer "input" to hex value "cea551ae1c1d1dc52c2dfb9ed336265 1b34ef7b49ad40aba001feda3134dde403ae9a3f6f2f785c9f4701bf1eaa2cc9 aff6cef38fdbdb70b45e1c415eff02643". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1894 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1c403aab0ce0f90bf5171a2828255389". Note: Case 14 Set buffer "input" to hex value "0600ccc6371790794741973a9d0b97c 6b197316073115058aee2b6b57c3ba0859be1d96c95f69ee347b2f5eb1469ab9 84193e42569cdd7cf5423551f84566fd3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "67c089f692a94eac27f49a7ebe168eef". Note: Case 15 Set buffer "input" to hex value "c5b900bf1b18693742c3a4f58e38397 77bd3bf6c5addbcfafee277de52c689bd1f802112f9df4b5f7adc03e7a70947e 2dbacd616a3b1d9c2538ac4e1daac1f25". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Baldwin Informational, Expires 12/25/1999 1895 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "digest" with hex value "75df90a3f41ecff4e0a288caa6aa857d". Note: Case 16 Set buffer "input" to hex value "4707af58671d58b6f6f21074ad38513 04c9ef1473501649f9a04db141a19459c90cac3233da8aaaed47ca5886defe60 a2aa7e467193a945d9b6985768b53383c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "da36c053980a48ad80d369a08d91ee7f". Note: Case 17 Set buffer "input" to hex value "f87f1b89eec701bc7a86257e3e1dbec 4179644336ce6441c6250645febd94392202e84cc6a8ca8f00acc7fc531c6d17 036aeac1acb2bff57aa715d0135e9d4bf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ebe12877c4fec7f37c4f837d12333db9". Note: Case 18 Set buffer "input" to hex value "e8fdddffc3c621db8d3186dbe7f51ff 0caec1e73d4d5b2a74a29d1ba1aa83004f5f5e1fe851f6ca284c6924bd5988b1 c4ad7703ede3f252dbd04dd067ac72c71". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 1896 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "075b5bbe10754dd54f0d6473248e7501". Note: Case 19 Set buffer "input" to hex value "ea97bb3f392fa668dcda3544dc90fb3 ba2883c1e8918c0e6f6a4ae4958f77ae21871d39b31ae51dcf0c9f48787bebe6 00845638ad5760728caa545ea7fd27ce4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "72be433a13397ce29ee508ce080d3544". Note: Case 20 Set buffer "input" to hex value "cc24d8272d0758077f5853317dd3c85 92487a8cb25e968f26169ee0b30410064800dcee6c0b42936d33e55a8aa62f4b 0ce19410543515955bf41107a0ffa8739". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1897 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "83b7712486975a6aa66131a23e0a559c". Note: Case 21 Set buffer "input" to hex value "c9a846a03a920335e63a0c400252470 2aae356a469ef44245be5e88ae835772967492b8ddfd6675ebde2a6c90d77bc3 c1067d7273b6c972a78d29f0956e8d062". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6f640aa6dbe8e767df77ebc73de0f85a". Note: Case 22 Set buffer "input" to hex value "932166d334a7c5e645095acbe2620a0 328195f6b9889027a477ad80980314726eb717a28bc98ed8ae18ab5df9f73de2 08614411dca234179bac6703f1563bbd8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "55064bbf9f3d013158095e0df1c849b8". Note: Case 23 Baldwin Informational, Expires 12/25/1999 1898 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "b6a993c187ba64a776139ae72462594 aa8fa5ddaae487f3b914bfd7d254fc3e098f97eda62617748751042ef17e9285 48eb24db4c586176947c2029685148629". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "91d744334eeac79f3077826f606cdd4d". Note: Case 24 Set buffer "input" to hex value "087b7496d00935ac5ab8160e9efd2ab 3f4c92bf409a79d6961c261195072200fed93432bf6f0d9b3f06044c56c5b5fb a167d9abcbe4d78d6e4a1bc113552d8df". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "303913114e18b7f5e018ae036ac7d14b". Note: Case 24 Set buffer "input" to hex value "66fd6dc1e670ccbaf6bfb6e47e2f58d e53810ace1cedaee27a8e22773297f352605088ce5f1f965555e5be458bab04d 9042093c9d0ce4bf71e6b10c3fbc8b587". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1899 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "400bb5afb2155800a6201d091b1b0b22". Note: Case 25 Set buffer "input" to hex value "5bd22e093ee43652623c22d02cc6fb0 343b1bec0b81d7c0f9a49dc29a59f3460d29df86f3309f46f26e561d369b1115 abaf8f81f77679f3e2113523aa725ebf4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8793f49736c8c49c6517387a391d3766". Note: Case 26 Set buffer "input" to hex value "4f7712effe29344615adaef2fccb4f0 86c6b3552acb1a89fe102f0ae7b44103b9388dce6fb569319ece74742d10bf17 0f6e57bd5d9fa04ac2f0a5fd48c319f95". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 1900 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "5e265e710100cd0ac296e369b4137f9e". Note: Case 27 Set buffer "input" to hex value "e997d75dbd04deb4b7c342b68a1ae14 6fbfd3b7a8ed25ae31497da80eada2f8666f32c5488f8dc8fbebae2bd2ceee59 d1e2423488a36052ad1209ff0608dbb88". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "633e247830e72cf97a26e0ce8046b5d4". Note: Case 28 Set buffer "input" to hex value "1d13029b610ae79f79254921f44fd0b c8a2f79c6f495828048c56aabdb5f5b0a71c38ec0f26b1c21888070f3e18c667 9fb736d4775b13e83fe1ce84182c9005a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "162e8ba64e3f250ce3fb21babf6eedf1". Note: Case 29 Set buffer "input" to hex value "198fc01736a9ccc9642fa4b6b9394e3 c19ac23daad8633030144f4aadc3a0bef6bf4abb8ea44a01c73fa3a672a009e2 32f5f027866a27da0d222c26990420624". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 1901 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6aa89fe1b73c9c6b31bd291a1cf30f07". Note: Case 30 Set buffer "input" to hex value "4e4bc5a2526127df483c5694911409f 4a55c04651e5536c707385ce7ae9c9265362c11567161188d728507f761277fa 3d72a056f46ac83838d008120fe8b52ee". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "31707231107fff540e4544e0446a94f6". Note: Case 31 Set buffer "input" to hex value "51f6ebd864e75dd8087c8f70bbdbef7 e5903659ab6dbe37d7ad7a17254d3b0d8565662eea07af78c02bbceec2a35228 53dc66eb958001a943e71149d391bd3c9". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1902 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "62638b5ff5084a75b5adba7a47899f1e". Note: Case 32 Set buffer "input" to hex value "f09d1756974c36c3203f4f09b475d27 a2b714606488fd8513183810edf3a735c1bd0bf2556bf5e1abc46d071ab26d98 03de35a621197f72111ff9f7867200049". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4d237176452019ef1bc967f81fb34273". Note: Case 33 Set buffer "input" to hex value "87e66592805a60bf542e27819c07087 067433962436257c4e29cf42060a8e7246057c5bc17382fbc918a457cd527ad7 ce8b52f59bb3be1e939b03452cf7a93b3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "48b23830aa29209980d72ef2d340c859". Note: Case 34 Set buffer "input" to hex value "972692952472c91b4fde13f85660076 Baldwin Informational, Expires 12/25/1999 1903 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 46a88ae3081351c24a74ea6030af1c4b8c318eeb510e58fbd35cd27bd178eef8 09a9096c8a3f4a3a4d5ed45f1343cebbe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d87c86255f9d6b72c188b82e750526a8". Note: Case 35 Set buffer "input" to hex value "43512453a7912d275089b58daf7ef17 37b1c5520dd74e4000b5bd5f87479720510a66191df64e6bf38f82cb96b537e3 65acc082f81a10464d7f2a04707586f41". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b38c429c0207c51eadbbb8e35788ba4d". Note: Case 36 Set buffer "input" to hex value "44d47c9e5d235157156b9eae6ce1a81 663044c2419ec37614e8c4cfda3e426a2bfb15b27ec692c611285bc6ff4f6337 bddb258d1274a393c6fba82263a5bd012". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free Baldwin Informational, Expires 12/25/1999 1904 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e16d6e175139d985cf5838ddf025e2fc". Note: Case 37 Set buffer "input" to hex value "5d4c80792a1490d393e299c07f04016 7b6729a8ba67fb188df8ca4ba7b0be529838707aac1ecf15f45f4a43f4595b3b b8c93f311d63990e36457c3992cbef01a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "be6b131ccfcae8428a9795e09a6849a1". Note: Case 38 Set buffer "input" to hex value "1ee894df9e9746c44f12ca13b226aaa b2373cc197badcb0876f175f9935c74b06a3385659b85228c1e54b689ee00fcc e059a7eb08d556ede505251187eea2c77". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3c482d3122281693dfd01d03982ece0e". Baldwin Informational, Expires 12/25/1999 1905 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 39 Set buffer "input" to hex value "141d6deab6730c237f1e3f8d4ce6aad 719c0469d459c1670354bf0141410ec89c4c3a4d672feb4100ab0e60979b34ef 90f64d99e328b668112942b5dac2d2110". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2603f6f3b43f870400cb07861c71936b". Note: Case 40 Set buffer "input" to hex value "e4a5f61cdbc06a36c124cb530e9ae2d 21cac7ed4fa61a8976cdd100f3737d7b437a807eb7288094be23654934811aac 712a6bc99140cf9b65ec664e7219bb622". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "394e33447bf0bcea9675c0c0ff51d2a4". Note: Case 41 Set buffer "input" to hex value "c4be1013e79ae33fd590358e42bb1ca 376983fcee716ea40978dc12633014fdeb1d995017f6fa693063ab45c1eb5da9 2270af6a14738086b446c22831eda6ede". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1906 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4ac909c527a2280e855a221ff51aed77". Note: Case 42 Set buffer "input" to hex value "e2c742093f46c40feac82da8f45659e b99049ab5f5a96cfeadf711d2cebb09aa19a26f0eae4be7b301b23b4596db0a4 c8caf5236ab51bee4fe705a9f8da1e671". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "985b290488063c198d02039cd49e10ee". Note: Case 43 Set buffer "input" to hex value "b23b07a95d76944413b7f96dc30229d e32276c8600ce0b0b5a8a76878150ab44402b97c9c62437d3bbe26a828a8f823 d9522a7c46480e10624f024ce11037d46". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1907 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b89efba601b5013b524c38baae278e84". Note: Case 44 Set buffer "input" to hex value "cb3252bf102c0109b49b1a4d135b942 ee3f82f49cb068605fc810b4d99eea232b2ae35bc49fe8fa02776dc2ee99a320 5b9c2170a281c06c195cec81900dcbdbb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8a80d62881daee2a00fd410640536c68". Note: Case 45 Set buffer "input" to hex value "40827222755a96e286c2d06612009a3 e521335502793ce5932ecee436400d5c7a9d7dc5acc394c72a51e04f0b5dcc58 5b7c305cc29b75b07826106a940a392dd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "62a3c543d4d0d2fc58c73bbae4b625ce". Note: Case 46 Set buffer "input" to hex value "a99c1b6f0627c4517a1ef59385d8694 69e3168b3a2f2a5430feb2c97538f7c9d7e553aa18c9908260d28468c6907e89 Baldwin Informational, Expires 12/25/1999 1908 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 48fecf1dbefc95976c93c1d3fc66727cf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3edd1c4fcf49a78b309dd1145f0efbb5". Note: Case 47 Set buffer "input" to hex value "2a9fe3bc7cfeaa445492c108a567e0e bcc3d9f699845a6483870c0034bc955e5cae660d778284a273b684e7b52f594f a36341522929454e1fd36a3d1a18fa91c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "eb2f47697197b183dc517424276800d5". Note: Case 48 Set buffer "input" to hex value "81ecfda8f1204e3f7e523285428fe44 5312196e4295c3a7f8107e824f9473add8836e20c4dfa2910f10abee70bf21bd a488658b6141c2fd610ad9587f9d8ca39". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 1909 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "dcdb443751cbb804acefc7d6fbfffc23". Note: Case 49 Set buffer "input" to hex value "7d2900542a3a1ba87c49cba21c707cd 0890c9e9564d48ff8069dde8b086df3967e051b68ce085bea1b6181641187638 11217a04ed512cb2be3e2ded228350372". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "94e7de9eee32d6a1312764f49f39465a". Note: Case 50 Set buffer "input" to hex value "d9ba09ddae4b8bb0ad8bcaf5d32f9c3 d9604fabcacce4926d84fc14c9e48c0240b3a686fb44b14c9568ed933685064c 3826248ee54787e00a64addaf2a3f74a0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6d8253f49dea3d40b239ae57de2e69ca". Baldwin Informational, Expires 12/25/1999 1910 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 51 Set buffer "input" to hex value "bacc561d8de5577764b50385ed5679e d7f4189603e68434f22dd3459e3a9938ca1305f2921321bc953a82b1c70a32d2 d1bf10733566e5e11397aed3a6c5670af". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "eb752ec07a1b16869fab1776f360d442". Note: Case 52 Set buffer "input" to hex value "32bd28458a0c41e43aeba1a06f21d55 bea5fdca06ae0bd540bb818af6deecbb119057cd0e744d68b4d82ff61b0095d3 53deec27de25889b8434ead4c1c59675b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "80af85fd2e76b7ee205a9bf429eac1e4". Note: Case 53 Set buffer "input" to hex value "b68877d25ce6de3c5f049b34053671d 3de610ea51d4434afd2c01304b78a1bc812392685a2d6d8514a2eaca49310459 8ea15054c2a9d5f6e2d64a20248e8d772". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1911 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ae12f074a3af3af72a6df1235be422de". Note: Case 54 Set buffer "input" to hex value "7153a98234fb040cf3db8dc59ccfd00 3f40cbdf6761ac0decdb1d6ed2c9c39b60b3b304839765c902bff78f05aea7be 2215e6d7efa48252c0a012c4ff3ff8fbb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4fbe26c87405ae606dc661dd3ed0cbfb". Note: Case 55 Set buffer "input" to hex value "955aca4fe34e2e534884bd8e914dca5 9a31bc64adf576c9b5478b445a5d4d364aefce6d6b2bf79cddf1013dab3739fd 84b5e3c2ec498c4eaa60fb54962009ea1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1912 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "digest". Check equality of buffer "digest" with hex value "52286b5c11e21427c974b1296d220305". Note: Case 56 Set buffer "input" to hex value "b8199e80a67cdefe5e2d82ee88bb352 c49495cbef35708312c96398349d0cf5a5b2d4b0d080849e490f009ef57318ae bb539b97dd6991c6785471f281b64d66b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "14452b958091cc9b670830209293c1f5". Note: Case 57 Set buffer "input" to hex value "e3672205459f33bdcabeaeebe377669 21c2d117c2a8bfac7e85840efff0f56ea2f4d1f5c2c14cacae22d5b0dfa63550 59c8f830d58d3e204c8807db5e37bf184". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3b92ae86b01ce188e6d6f466266ff25f". Note: Case 58 Set buffer "input" to hex value "ef74619a5ead883c2daf824cd076673 d874099bc4e426ac7db96d05eb9e9f6cd32a6cec13dca5b943191f9fdd374934 79e10074821a1556ae2bbf7c1f74faab8". Baldwin Informational, Expires 12/25/1999 1913 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4c188cf221b669aa9a291799b1b3aa2c". Note: Case 59 Set buffer "input" to hex value "74e6c62fd00c0a129bff6e36c102fe1 da6a03adc130a953ae045bd93c8854aeddfa63d1211efacf0349c26b1e374f41 4889a8ce70ae4939324f48ba6922de0c1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f48fb0a4a6faf63a038734d1a47fda01". Note: Case 60 Set buffer "input" to hex value "b143b3993876d8c640deed9f13f8916 6da579591581d9483a560a5289ce9817ed9de129f816c51951daee1075430dac bff981143b1676856df594d6a14feb207". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1914 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a42ae171665a3e8e3ee7cf9b86e8d3a4". Note: Case 61 Set buffer "input" to hex value "74c7f70742c29f97a0bb1a97f24149b abc739cd39b88cb9822b613ad5110a2d71c56b75bab0bf1e5455c9b03b4ea10b 8f477309964a5f48e8ae07afb5e80b028". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7d05d4d9a416b83715ada66e65b1f148". Note: Case 62 Set buffer "input" to hex value "82480f8d0422ee4ee6cdcc7405ef392 7394a40fbf7a085fbe39918821d1d50f8011b5b1a1f56ac0f8e9160feac36083 5342e429432f834243fa329343787b485". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6d150806710dd9bf37c787469ca6c17d". Note: Case 63 Baldwin Informational, Expires 12/25/1999 1915 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "23303c647bdfeb94edc614b424fc42d 201ac2b6dcf59fca9b679763a1885f55e69b00c01cea033ac15c2b6a8b1881cc b6c533e5f45a674b2c66d0f9f357c0b8a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3d76801a6f4198ce680d244f923bf449". Note: Case 64 Set buffer "input" to hex value "0a3c898d9b5bd775991eaa47c43fa65 8593c24d3f83d8c6d62df499c3a4065f9c5198b2182777ecf2cec627d5fea377 a59a5d132d6756d7555927a5577663748". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0494b89d2cf534aeaea6165dd5226b21". Note: Case 65 Set buffer "input" to hex value "84e29f704f19d06fb01e55f015df07d 714de5027d1b16b9be65e47192f95e43c829a835b4c0072ee3a4fde7854aa937 01cfcb07d81d1da05ef28ab5a3be884ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1916 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "68701bc257598c883e8962af2cf83d17". Note: Case 66 Set buffer "input" to hex value "be705b06fdafdd1d155c5e37b059f7b d345aa7ae8a4d19ed2f0ca4171f26899fc24929843868da3654da28a08ee69dd fb020771d6183bf9ef462e8ab65374fcd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6dbb76310a3905047c19f19ef8b090c3". Note: Case 67 Set buffer "input" to hex value "8f695dbfebc808e11650d66aa15d489 21dd8b7977215f30a4d5c4f3d9d6ac79ad1ba884835f84d61cf833dad5abbb6e 3ee64f6113dab0cf6e729078303520b2b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Baldwin Informational, Expires 12/25/1999 1917 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "digest" with hex value "9c9257f48c9d400b1a684e2fffab224a". Note: Case 68 Set buffer "input" to hex value "969a145660bf6f04daf359b3427ceea adb9587492e0cf72fd905ce709ecfe90ed92e510fc7c5552017835a58d3c0dfe 712ef60331c3100920f138414e4cc84d1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "89adcac535d7b41951e585ea6b30c570". Note: Case 69 Set buffer "input" to hex value "c410252d018299d0673076170a80cd8 c9d8f38ba1777b9baff0b8e47f65fab576e1b6e8be0179da0b4661432efc6070 7ec83c000739957972ab48a4989f064b2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c5af8bd099543d25c29d82e9ca1cbddd". Note: Case 70 Set buffer "input" to hex value "424947698ffe60dcfd54cf08417b164 5065fc4898dbf16a9cb177cc8badf28861a3da66bf3375c5ca46116411f98536 70ab925cb5b3a551e1b418feee3183c7b". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 1918 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "37706dde7ec76ddd2863b742c6db9c68". Note: Case 71 Set buffer "input" to hex value "436035e4990469404c7b3443a9713da 3367ac77e8688e8fedd6c2f865bd56535a4767d41eca632c8842a700d1d04b0a 0a6decdac69e9abfe2ac538b68f580f9c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bf1fd5a80e9f942706abbd9410c9581d". Note: Case 72 Set buffer "input" to hex value "679b0d4c300bfcde4cae1dff8e47ed0 900c08d7aaabad58c6a8a8c99bc8b71b7d7862dd46f48411038018f10439bbb4 1fca383c9be187c8976afed9e59bed042". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1919 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "45ce556ab3d52123343e53210c834df2". Note: Case 73 Set buffer "input" to hex value "c3002ed55d2ebe3868d236c4e7a18b6 dd4829730b0a09d1b6e52cc32583f43004a5e1dc8b52296e966b1db79b6c3503 c088144eb5c2c574e8680bf1a702ef893". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ef1569877e0e152f19d8eaef220ce543". Note: Case 74 Set buffer "input" to hex value "673ba4ed59d01c611b5d339b3775f23 b67cd0f04aeb531029a27bd28912abb8efca578b8d2b5fcbabe56b1fe9070e0b d866e123a25d8557947d8dcb3ce71d5d0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9320c099a1372ddebe78319a7c444be6". Note: Case 75 Baldwin Informational, Expires 12/25/1999 1920 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "2944e16195f38e3a2226f5a3807beed a4fcc2fbc532558349df0e1ae302e4e901aea4a8e9ec099de3b383ac94574f3e 3ebf815572fb50bcc83259d09a5343af3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "983cc88632229b9ea31b2b658c05ce6d". Note: Case 76 Set buffer "input" to hex value "80d5cb8b0f3335ae59b696500b011e4 9291e2d66259f3f46b3b1ad268b4c5ad4a8e14ebe6044c562825ecac7028968f 35eb3523d269ff929cf388d7c92ea981b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bd09d3ede7038a4c407596ec08bfcb0e". Note: Case 77 Set buffer "input" to hex value "12125eef064ae13c1bb0863bdc09de0 fa2ab5ff032c60331d1ccccbe4ec9fe59363bb792d73aca0ec7944feec26ea19 b3b89bb95582e5e1c5c9ac224f4c5f0c1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1921 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8610325db59dcab863264d6291e715fc". Note: Case 78 Set buffer "input" to hex value "04d7bfd047550e476957c6c4272ded8 b7e2081b4c9cd9545a5ea0786257d87e2333b5fd401780eb428b5c4f494c14ec 40e8dd32cce5cbbea3e40a060e2e94c07". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "dbabce0ab545ae1e0511e617d399a8b8". Note: Case 79 Set buffer "input" to hex value "56e3e6ca6d4e5182c0cb5c0b99ac401 cc51c19a345ed920cde09e3228da661517fd8a78acec40c3018bd0b6169330b0 3c4c0fdfef20ffd1878b2262385edcba1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 1922 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "b9ebf0c3b90998b641a42b96dc81fb8b". Note: Case 80 Set buffer "input" to hex value "e63596e76d2a5e8743e41a71bd8cf0a 6ef1702249581d3a44a7d9878acefc621d01e90c655912cb924289f26162ca8b 325788b58dd16b5b497e093fbd8b01721". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e9e9c76b14fd76945fa1818577f69b7d". Note: Case 81 Set buffer "input" to hex value "f67b424092b53bd3972d07c3aedb10a 059149894e986e3af87a4528e70db116082d2136e3b6e9c04d3915ff54ac97b4 acf45fa59115a7ca269099afedad1f073". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ee3d41346bc9371cc057c86a006d33a3". Note: Case 82 Set buffer "input" to hex value "f946a587332c6783841031f869fd621 e3a47ca78a425f87ecc653ed6a5e3eb71863b055e9d1ca39e78235317725982d bcfdf06a31dcd24c845229527820b9e17". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 1923 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "26a7a28afbb201767af6016cd76da7f6". Note: Case 83 Set buffer "input" to hex value "2c780b634a6bea1c6241c5ff71e3cd6 2e17e6d7fd3c69f7d4e512368d8612bb8059c2d6455dfe25042de975107d03bc 88f089988c48a2b96e67b3d05b3973873". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f167297f8b8762e7b011f51f6320415a". Note: Case 84 Set buffer "input" to hex value "46c7bc4ec7e27862d60040128efba8d 7f611e427dde4c8391f6aa67b7abd6893be856eb9debac38690db018302158ab 2fab8aa10b2d7a41fbd210c80c7bcddd2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1924 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "59eb19a4b1c9d203c135bf6758c411b8". Note: Case 85 Set buffer "input" to hex value "9b1be4346df155d1c8446aa245597c9 61c52a89dc7e20abc747081b0ebc62f2735eb6b25c54885921bd0dafe292993d 55650b2866f17edb76080253f2d3311b5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a1991cc8a919647ab38168f54c82701d". Note: Case 86 Set buffer "input" to hex value "293d76ba9ae6f68cdd8b342ba66983b f8cda268592c230b09471bb541770e67a0fbcebdbca00bec6e4f916a3a9dde7d b4bb56ee26d3f92a08356c74953dd3bb5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c43fb5053bb145d6fcc2df3b57ca4da4". Note: Case 87 Set buffer "input" to hex value "56a3408e80db84e53cea63a7b47fcf9 Baldwin Informational, Expires 12/25/1999 1925 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 c58c56d1bd34b07b76f629ca2864d2c0d4e1993ccaab21d1bb52773cce90ef52 ebc2dcd8670e1daaa2abc6a43484aaedc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "333421a70c12cd0747d50d8c658e04c9". Note: Case 88 Set buffer "input" to hex value "b063da46b50720cf13c0e230d5fffd1 16d1b1a9262447a553c0efcf07b369b7b74a306fe728cea9a9088c3ebf244fe8 e584bd14deea967563875c10bf2b68e2b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9d9ca6bf08ce0818c8286eb9e2e1e87b". Note: Case 89 Set buffer "input" to hex value "d03b192739bc99a123d1582a709a747 c4348508c8cddf43f486dca0d9fc220ea227277c0314b43598f2f792b156726e 93a35b12eacb4de49463f3928cde65d35". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free Baldwin Informational, Expires 12/25/1999 1926 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "797be390d4128f9135ff6b2c59d1ec41". Note: Case 90 Set buffer "input" to hex value "75298e5cc59af8ad6a883796113f68f a96c34b87e6895a9671ce964885a87db0ded3c976ce268b3b9d47b1dd140d38f a72f7487d58a23a767720df728e2227a4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bede58395c459ec6dff88667e3163986". Note: Case 91 Set buffer "input" to hex value "29d656955d7cc8b992aa5e2a4d07923 54de07d318057d2224e2ae45b4e3df9687c9f0c8af02c67070a48b1da53a00bd 3db4d419022622fdbc000f96de87a11a5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d1bc91a77613460daf17557d0e4630bb". Baldwin Informational, Expires 12/25/1999 1927 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 92 Set buffer "input" to hex value "a5527c8578551f293638ecd67d2bf50 b787a5d846a9a8665a8be907878ac4e8a9436b8b20f19a108211eafada7aed40 39a2e72a0e4b86b3d1d24ac989951b7ab". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8df1596a99cc2ea5c4a3695b647ee087". Note: Case 93 Set buffer "input" to hex value "8d99c4fb33d171d6b1713e794d698ae d327303d1810929096945cce0840a40fc5150961432764d65cb53f8cc5078ace 2f7c8b31b9dfc7a6dfd380a3d0058c44e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4a6479fef8986648ad6b73af4435d12f". Note: Case 94 Set buffer "input" to hex value "f9ffd620309711cdbba1d88f5e85183 1545f5f032512684f3d311bd7e39f90b35fa638f879c608a9265464d95765c8a b7d5f2afe9d2064e3f8c7f46a493c512f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1928 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3e982a5f9333c17acdbb3d02b1acbc71". Note: Case 95 Set buffer "input" to hex value "502d576540caf10a55f12398c265d53 f1c48b465a1811d9e0018ca9ffb160b5fdbcb1e7ea3328c5694190d50e420149 cc3dd75aace57216eee2e53183b41420f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c498b89a18a99383ab7e042d5d2e7299". Note: Case 96 Set buffer "input" to hex value "81d6b071fc77b43d5efc3af029c4de9 7137a27f225969725af7618cc04fa857a10eb76381477b5c8a7d2681fd852045 6d9b3ae2f3972f117ca0daadd126a3fcf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1929 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c3898e4dfc41546dfba952b0203ebc3f". Note: Case 97 Set buffer "input" to hex value "7ecce551ff50e5179e56c923045811c 4b146b2cc45c932b851665f394c5e4beb690a068b661ec60b3a94f2d9a585f4b f6e152c8130cd32efe2ca68a77c3d1597". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d006fd6ae10df976886516c622c466f6". Note: Case 98 Set buffer "input" to hex value "ba62e4d9f590cd4e89e66658f3de540 fd6a411c711e31d60c8fb7d135bf70fc48fcbc03a454b7b87bc191e6984287e2 04c852b61392b3a03a06804a94c41a5a9". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8d67b69716245de10b4fc85124e62828". Note: Case 99 Set buffer "input" to hex value "8168572d190eb3a86b4ca25e02782ba 22ceb5c1ede921446f01e8bc49321e4d0319318094d331c13f9933bad0bac4e8 Baldwin Informational, Expires 12/25/1999 1930 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 20676a9de2a4af7c5190a92f47b3b21bb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "fa8eb3d74a397977b307c3a2d8fc4b80". Note: Case 100 Set buffer "input" to hex value "7236e7fadfc4936fb010abf9b7b95fa c6857ba48e7782d571017f52f62c45f79f2594121c28de6be4aa3e190f90ab8b 35846254fe2fac07ba9cf2a71d7872eb1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d9611d65c680293b3b831c74b393a466". Note: Case 101 Set buffer "input" to hex value "9e159e0d3c845b02dcb9948dbcab5aa 2ceba5e73b0a874a9b2f6da8a1f98521ad17e0b215d28c995cd7f276a716e399 9ca94f4de8e048bf65ae47af3d7ab3235". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 1931 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "16e9e1be020d8deef759bdbbfbb5bd12". Note: Case 101 Set buffer "input" to hex value "922fb0ce5527e4b9364f7beecaf4a93 3106ffcabb7414f7efd4415a704b5e55b718e56da00edb2741dd8866eb61eed4 f2a1abfa1760b4a0f69f36bbabb7aa947". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "606239243c8559f4f71af73133062e69". Note: Case 102 Set buffer "input" to hex value "4cfa4dc436617dec656e41cdf5a2717 0da830e47920c6564c896041acf60a10b0040ada2edc1e73221949260aabb86a 15c9e99e7c82ac4a556e751e7f9608808". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2e4a889ee475ce4aaed560a9939063b9". Baldwin Informational, Expires 12/25/1999 1932 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 103 Set buffer "input" to hex value "788a31dcbf0a4c83114e6770fe1d88e b685430a0137c6f38c91d6f0f884c80efa7c08beba05e4adac92df48b1264ac3 76d6bbec2c10653ecd138f38316335074". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7a58d8e568ac4460f10b74ceb9b36f4e". Note: Case 104 Set buffer "input" to hex value "fcb9536eed8d3e05c6b5060870179b4 8cf750663526bef2e6c51378c07724df7b745b03469e68bfc98b66344368ec4b d26b098f01c0608afd2cf1e6752198f7f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "baef9e49ce2814f328fe6f944d5e496a". Note: Case 105 Set buffer "input" to hex value "e036e41aa5fb46664b102a1462a9c3d ebfad588826a05d70030f3f28cba38f06539d91048342be6f7a2f1cbbe1f62cb 70f44f255998a2a3077ea110eff59a2a7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1933 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e16e8ae727c60cad9c0bb0ca78373240". Note: Case 106 Set buffer "input" to hex value "1f68377c2aec436e402a9aed5f899cb 575addbb96d6a7c97ba4d09164b0b46c020d3e8507bf0e987f0cb0ca3d879520 cfbd45449705e093ddf2a63531ac668d8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "eafeecb439a859d03dd328f4cb749735". Note: Case 107 Set buffer "input" to hex value "444018bc7308a20dff9129057af5c15 6a8f453c831527003d9594e99b03da69da0d693a2578da14fbbf621d3f90cec8 9f9900c3a084b6d6151705f8bea4ec557". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1934 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "digest". Check equality of buffer "digest" with hex value "8f1d43157e1cd4d134808fc66e3290a1". Note: Case 108 Set buffer "input" to hex value "9cfea0c7e3c7b6a2d2c924065937633 d17a40ed180e333c7c02820dc2c4ddfcc6cf328d08172500c87158e169f8ad80 ecfb403ad9d533df0c0e493676dc82107". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c85f524f0d888982bc9643729608b214". Note: Case 109 Set buffer "input" to hex value "db90bd046a1d8052b9a3ecbf502f93e 2a47b8e245f340fa9603ed3368173129fd6aa6dad1e243cbab73c0cc08255f0b c3cffdf4363113abd3023a9ee0d05bd00". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5fc717288c3371f8ebdfe4fee6b8bf85". Note: Case 110 Set buffer "input" to hex value "ebe625d97fcdcf7dbecb14265c45ac7 951e7672f724b00ade78f25d15ae32076d48933e36f2909a290fb6f2be5b4cc8 690eb00ef3512411c1f2a4c99c31d6340". Baldwin Informational, Expires 12/25/1999 1935 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "eed1bc849b42b371da7aac80f20283a7". Note: Case 111 Set buffer "input" to hex value "7d53f4c64bbae5b0ea65665d1dfaa19 c4b6fb7f397cb801eda3f7765dd8d047f7dc2f498ae2e35fdf8152af896462f5 e73c0569948ccb70d797dbb4dc59424a2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3047c4c6d1746a411cdfe7391f1a7d2a". Note: Case 112 Set buffer "input" to hex value "8c28c9ce68583e9eadc03b87f0db865 39bdf75e3c838890d7468dee36f4aa98ca408499849b3c7986cae75c35d485db a6c61bb57880df0c92ad292c86e20637d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1936 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5d2f6063b5457dd7d5a7a16529a4b51a". Note: Case 113 Set buffer "input" to hex value "dede0f17077f0cfd9075cb2b797b1a0 a3a3b294dc39cf1f78052ca7b1598d5be6d54a8276e133440b658234c7ec0dc7 cfb3d4b537c82aa920173c14e7d4741bd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "89534c7496d5adb0cffde3e15a616c6d". Note: Case 114 Set buffer "input" to hex value "9058e3e6bba94527ceef6189f1091ad acbc8ab4e5787febbb1f7a44f0f05f96ee37b205dd2625d4b4ca9d41aadae361 9b51ae8e10ed4f62499ebf9de5ac48e86". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "491d57a4b9c1eb04236f314f78d86df2". Note: Case 115 Baldwin Informational, Expires 12/25/1999 1937 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "aa2be83649040b6b4725eed4cde35e7 6b182ed965f3db1af3bb58e115f7405191123aca13aa97818ba1bf0234a38582 994f3668ff2cafeb0b946d71c3fb2752e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "63881739387e22278595c7f666a12ce1". Note: Case 116 Set buffer "input" to hex value "01eb8459992a903587662f0598f0af8 4723fb212bc904430b08c30a4e71a4dc89eae336ce78551ab464945d1baee490 fd316d3695541f98fa93173d981ec4e9f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c242a3cb6c7b06f286e546f03623c7f3". Note: Case 117 Set buffer "input" to hex value "2c25c78f8c709d295fd4d3137bf75f6 b730f0eae4aeaf074bf1be1ce54c4e80e67efceb0e7fc3ffd3aa9fceaa47ab26 015ce2d0d91e98d036f76b1f19b3378ad". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1938 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "44aed404a3bb44685987e658f8a028a5". Note: Case 118 Set buffer "input" to hex value "2374db50d6104b3b923f07f285f6f7a 16798ce0fd5a2dc304a925a3b3e3da8ae83cd7e8f7d33eaaf5ed64d9001ab3f9 b6676082c1a0fdef0158681dd9c795484". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9f84fc651625bd33337b793f05b6c05c". Note: Case 119 Set buffer "input" to hex value "7ae545e5638e7fd394f198617625f19 3626a9eff09a8e6fe7b3d08340dde0fefbce4f32eb167a3b13d0e385385b3a14 6b6d104b8e1302e2a7d3e7bb52eecf4ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Baldwin Informational, Expires 12/25/1999 1939 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "digest" with hex value "b20e1d3f23787662ce5dc35b759e6bb3". Note: Case 120 Set buffer "input" to hex value "4e7754e8beea94fbc945282d500b48f cdd03a8834504e6d0434d2771aaf5f98856b22474a7cfa7b1ba7998301906453 9d5507603f2bd51e7d7fbee5dd21c54e7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "00bbbfe8b2230b778cdc34be1d6e25eb". Note: Case 121 Set buffer "input" to hex value "7730d9af33521642242b16405aeb6c0 e64fc3eaba9d25d927c249df8d4f5e35eb49fe458e05a53f10d195043946651d ac0c8c947dc531325f4d42b9581233991". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "eee300c4d4b6d3742faed56b25131194". Note: Case 122 Set buffer "input" to hex value "e7250405b97eee260a643f27bb3b66b e3ce51a3e615b172373c4efbf7af7336058459601f876ca6732e0972d6c14242 0511ca358b4a3e986b35080e5550f4d10". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 1940 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "caeea460263aaebc20bba82d7e09129c". Note: Case 123 Set buffer "input" to hex value "e1adf0c73905afe2f180be19b0f35fc a1586b6fcc1f293c57d4d6b5976fadb52ee42c8f2a02921e8f0834a0e7641252 4958bf0697689cdadd670078eedb7b579". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "457356f0070733dbebf6f44ec156746f". Note: Case 124 Set buffer "input" to hex value "96083455215916bc6cf2f515123b2f3 f7e7fff410cb6cd36c95d3e345b9f567e8a9508f064d4b352a4563ff6b17e127 5a0794f7883247e6a616dac58482c477c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1941 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "573989b5b4534d797641ffe1b1c8201c". Note: Case 125 Set buffer "input" to hex value "edcd8e4446f752c96b2defbe0a89069 88a51eeca816a23467b0f22609db9f15e1e1f0628d7d79dde239bc6dbc71d0a5 321a3a94d32e527080e3d0c77f22505cc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "669b156c5e8fbd5408f663fe7f35c9f9". Note: Case 126 Set buffer "input" to hex value "3c9346447c98bd576025037892bdedc 55ad165f5cc8d6c1565ae4f636b42b4a84c1192dcd125dbf51b90775fe5a6c75 c818c9cd84438b0a09fed6a7c7f322eec". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7753b0653f33ebdf6db1a26f47dc90ea". Note: Case 127 Baldwin Informational, Expires 12/25/1999 1942 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "37ff651514f8dda02fde3c9aca7cd1b 7e0fbc3eec04aa60cafb079be7feb76cb1bcf8a4084bde8589c0bbf599b31f5d 97d922fdd2c5943cac04e9668655fe9a8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7cbc43308574e748d3ee731555948236". Note: Case 128 Set buffer "input" to hex value "3f81d85d75153c6749dca621b570c6a 3c6926261f3b1670af656442a3186e487bb13d97becbb83ecf180b1195466efc 103fc976a3a26d6f27f5ba6f5bdd65935". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "29b59dadf985852d487af1314ce67132". Note: Case 129 Set buffer "input" to hex value "65746dd3452154c188f66a0ebe73b93 b092ce854353eb96fbb53acec47414af6e9e19262107b19520ae21ae5fe4f17d 5cad394ce4f54320ea84351770611ded2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1943 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "581d686c862b3968b394d21a5a5b0d5a". Note: Case 130 Set buffer "input" to hex value "54f6e771c83a2e3ba5261d4f8c4b009 965524f13c506295be39a189be25192baa55751c62a1dbedc23d61eadcbfb1ce ec4ddc1f22d826b28b82da44ebc388e8e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0d4fded7c84ca1dd3b1016d2c9ac8603". Note: Case 131 Set buffer "input" to hex value "78104ca000a890ec840f90cd6ab340e 473817756323118bb451a7648eeb4f0c858857f447199632fa8f6251fe468cd2 e6ebf830a40f5b1034321c46405e890ce". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 1944 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "a5c237ec136fddb524213fbe78e422a0". Note: Case 132 Set buffer "input" to hex value "5d512e140181295d775eea3568a18ce e263136552a9f3fa00c7cb48a0963099243d78057a2495d4478a6fe0e79c010a 0a929a50130b2e69a3936523488318e39". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "968a5d5e0e7b9052df09661c37db41a1". Note: Case 133 Set buffer "input" to hex value "88e9438cfcac063f499e918200122f7 a1491025ed12367a3e5947dd756e238b9c1595e878c9726eb8730b2d81f92ea9 2dcce95ad99b113fc5e67e6d09c59006f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c5952d22f12dde6f79bdfda373d0c76c". Note: Case 134 Set buffer "input" to hex value "29d2ce0307b3ec4b0629793fcdc7af1 b5c48b285061bfe1643acc4c2bb80cc19c14acb1149d65b432a5f91a120f6af6 995889bf384f71ad24716d070e23d2fcc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 1945 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e1457be2c9b4626d887bb41c3538e170". Note: Case 135 Set buffer "input" to hex value "5627efedfeca60437808923c2f880b6 d19b0dbcbd50c3b2577e971f588e254159b9545e41f193aa1d6c123f84362ff1 12093a9ce138239ebbd9ff4ba92feb9fe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5ad03ca0c680d680e8746f039c29a3f6". Note: Case 136 Set buffer "input" to hex value "365e3f9fd8910a6108fa4f05dd08266 768a401a80f93132684836be79960c9655a4dc4bcba5d02143fd509060ead131 0dddef6bbafc222a06360915cb3485fac". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1946 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "87d675dbf17d3a180d5b6e0526505b4a". Note: Case 137 Set buffer "input" to hex value "75dec9a0b31244b4085f2ce193721ff bace0c8c2ff148d87253457cbc7b5935044d84a64cbd2eb6703c2aab0e7f5dc4 07b7ba72faea92f449422f66a8fffb504". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a8b45e9040a12429ceba7ca9e50665e8". Note: Case 138 Set buffer "input" to hex value "6c3f3cc1830063b4e9b9040520e6fb5 6db45f4cfae7a422cd19c9658c30451f76b5a8083cd4a3f3765f9dd996a5acfb bdae6c5b48940ec84435c667ca721b937". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0734f34e3afafada096bf347075d9a53". Note: Case 139 Set buffer "input" to hex value "790b9c8df13d4d7976ea7a1a21bd4a5 Baldwin Informational, Expires 12/25/1999 1947 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 681a2050f0611ff50eff4131a467125c2d739e7d87e23fefc50b59db72dcde1e 0ceb812caf376a8b00fac3dbb0c4cd1c4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "93983bb62d9850d160f9ac485eadf91a". Note: Case 140 Set buffer "input" to hex value "a43337110f60aad787a7e61875e8ce5 76fdd25e5e40b374c0badd614817baba400e08bf65cc70b6eea8cee25c00f05e 64d208ef2055ea7525790e4986ca46557". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "fb60a612440912a15765de81942fe8c0". Note: Case 141 Set buffer "input" to hex value "9ea5748856688be293a5218d0e9b8cf ce3f381c6eac2c8885915dd2ffcf4e53b3f0c568e9dc5662df0a25ac408c8b10 1607d5f0976610a49ea526a5cb9f335ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free Baldwin Informational, Expires 12/25/1999 1948 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3d89600de80c7870999d4d192f4d36d4". Note: Case 142 Set buffer "input" to hex value "08f8067ea8b38e94fea578fa6d3bec6 fb736b4a2c65f50ef163d66fa1c10d78492ae33f06bec97814ad997ad0df0e4d 745734876f4865e535856d8635ce01449". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "db4431f58eb38ca130daf1e8fecf1b50". Note: Case 143 Set buffer "input" to hex value "d1b696cfa0c2cf5823c15ec362acfc4 4344c4e2581cf018886e4ae11a13ccded57a43cc7f42ba4a18b5ae2f36828b1c f9470985fb3bd359bfae91e236a19d70a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "841864fe91c36c292d40b6b408fb81a8". Baldwin Informational, Expires 12/25/1999 1949 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 144 Set buffer "input" to hex value "12c7cc752a4bbb3e05183ea55e3840a 3b1f94ccd8af1e06d9264283a02c77cf3b10616d7e5f026f21f88239e3b51c03 05790682bb60b7db6aeb774df701ac19f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "212593ef7c0f7b615ba9cf035f1a2d1c". Note: Case 145 Set buffer "input" to hex value "24326850aadb4f674bf2f1e563b9919 8d0f86c09313a0f00e0dfbb9a5cb8469e190170c95fba7376f2a8f6ce01cc0ea adf32fbf906123697685f475df862d736". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3ea8c27e5470801a15b2229526887cdf". Note: Case 146 Set buffer "input" to hex value "2c91d81cd831cfe23670949936d4f6d ad8b752aef705f94d9352f4c6c68fa574a525def492fcfd44bf81046aa99e255 fc132e91875192b1f25b88e28cca99625". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1950 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bf31b6732de37e57492edcb19dd0bfea". Note: Case 147 Set buffer "input" to hex value "8a9494baa8ea500b3f6322fae28f30b 3f87ea811d96428c4b26438491d27130d6858ab23015e2316632814eb43ffa03 3fb23c18134b307f5bf354b216d3a8251". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f17f36ba89bcae0d14328d649822ffbd". Note: Case 148 Set buffer "input" to hex value "918eda65fa5ce91d57607c7b4682b82 cd94fdf04a256b97702cb2180624249569d8abe1b61b9e6f610bb086f2f971e6 3fbe5144fa166da64e2e4e6828f5cfadd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1951 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0e626bd6b16bd02a99f830fba58d9ee1". Note: Case 149 Set buffer "input" to hex value "bab23a9a1acb38badb28ceb436f0cde eb6f18faff87bccd46666793d83ee761227dca86e702629637dc9c58477cc540 61bff27f4d6b74bf38fa890259716c41d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6068035c0ff975c32d3189f40e6bf0a3". Note: Case 150 Set buffer "input" to hex value "37e24b4faef87c36dc655ab483076d3 1aaa9bb1fe02eda02b4228f3960ff2f46c5da973e0b9b43bc197244cdf32445e c747765f617066cbe512c2ff605a54784". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "02bc66b0ca81832bd7e625d0367618b4". Note: Case 151 Set buffer "input" to hex value "22fb6a512afffe4cbee11056dcfeeb0 0dc09c852df48eae923cf5e586d8fb6db402b21abaa1ae61836b1ec3a5faf5f4 Baldwin Informational, Expires 12/25/1999 1952 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 cb84dac6d567587836ef35eb34feba6e0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "110dfd5b66045cd7ead1efd3c4e5802c". Note: Case 152 Set buffer "input" to hex value "3e6f42d692adaaf4e78f6706506f974 39aa49a673b57f2ec259400cd84324238319c013f7427d2b9bbf1ddb57ed2646 d4a55fda517fdd81b2578d28d0dfe1c5d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0e9f2fb390c69f829c6561bfd970ec9e". Note: Case 153 Set buffer "input" to hex value "712d545331f05aa05190f32bf1c1813 d31ad160bfc20518365401d969d60c5b97bb473432bf26e76c237fefa1eee114 23414b740daacebc02669a3cc18ae9eac". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 1953 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b79f23f30adf999d965805f9eb3f3aaa". Note: Case 154 Set buffer "input" to hex value "9e91d6cbc99ed92d9e045d5063b67d2 b451387c72716a742978a93b0dd3713c09b906ad44602b4b2d58b5b57041d94b 09dc632edb780bac1c54966bf1fa02a61". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e1eb7c6ceccb6e3e862e289a00e9c725". Note: Case 156 Set buffer "input" to hex value "edc641c013f04abe8b73949ccda2998 fe30479c66c8e5902bcf7b8ebc360371baf8b75e87b556f9c2a43e2912ce5c39 c37128d1d14df7dcbe1ab636e9af1016f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b9f9f4e76279f4324381084451d793b5". Baldwin Informational, Expires 12/25/1999 1954 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 157 Set buffer "input" to hex value "5f3bdd91d276cbaaa54c9f305aa9d84 842a5c7b4566870a740e2e52a7f517440652a4bf42257fc3ab6bff1af313e5b1 922ba0ff7e984d149338a36bf8ed46ae4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9213f518804fd149c981dc7202de12de". Note: Case 158 Set buffer "input" to hex value "fd37ed70fb0fa83cba1dcf712b136a4 3227223f735fe6dc66dd18805142e239a970a0b278f11971be0ecfa40b3da21b 4a9beca53d581c6eeff51337478ff61f9". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "219f1c3cbca2ca7ee33e38afc355650b". Note: Case 159 Set buffer "input" to hex value "e8c4d52ab8812c5af246111218d39e9 68469badcc7f906e03c5aee3999b859dd636c6597b5e3e879493b58bd7e6835e 01077a26d3e8435ef98dde188be6a7ac7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1955 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "458de3d4aa9d1bcc116b4a8ca19dbc86". Note: Case 160 Set buffer "input" to hex value "f51b6b5594522f0987a957ad136c3a8 690de1837ff0359cce939bfa3278c3db86cffa84f114dcc131d7e821150617de f1588b80aecb67f93a7340bfe4186108d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "374a8bdb41317c915e3b4481a5fa2bcf". Note: Case 161 Set buffer "input" to hex value "072e4e8a4aa52a92e10c04a7a7f6623 07cfacd85574bc7802e6f693d1184a9da412c2d66699f647f270925061088ee5 ce9003ff3907039d9b598c41d24086fb5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1956 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "digest". Check equality of buffer "digest" with hex value "761d6a94bd3b1bdb4abc6567df3f0b22". Note: Case 162 Set buffer "input" to hex value "29c9d94535b875109e284738a881a17 1fd52c89e5c33b8f7fd7881c8ae6b6bd8b215edde75f31bda5faa56056d9ca5c 2f6cb6808ff3e7ed2a0da04fc835e424d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "df7feeb62e4111175bdfb8a0496b0f73". Note: Case 163 Set buffer "input" to hex value "96ccd75f6b2eb3580d8db3475508603 d48a4641bec0eedf1d14491f05157d3314b3fab52904f61d0ca201ef665100d2 67cb9e1e4ed63ae790d3866b6b78998bf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ab3d934941b0ca0564cb8b375ea73831". Note: Case 164 Set buffer "input" to hex value "bc707a109a5b5120999ef9a1693c624 7c07a3589c4df1d7e1f0a3159f162f44a2416429b166524a87f30e2caa0da23c 8401baa8f5ce844fd6c7c7f6a2d39dd64". Baldwin Informational, Expires 12/25/1999 1957 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "73d8fc11d609d3c3e40a2c232fe31fc7". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFMD200". This is the start of test case "TFMD201". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Length-based test for MD2 Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD2", "NULL_PTR". Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1958 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD2" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Length-based tests for MD2. Note: 15 buffering only Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "43a1f389c68567808a8bb2a59f36e6b9". Note: 16 transformation only Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 1959 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "494af80d19c095d1b73e14140c5193d1". Note: 17 transformation, then buffering Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f40". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2a455ee396d754bc22f0d5094f541ca7". Note: 1 14 buffering only, with intermediate storage Set buffer "input" to hex value "00". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "0102030405060708090a0b0c0d0e0f1 01112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3 03132333435363738393a3b3c3d3e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1960 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "43a1f389c68567808a8bb2a59f36e6b9". Note: 1 15 buffering, intermediate storage, then transformation Set buffer "input" to hex value "00". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "0102030405060708090a0b0c0d0e0f1 01112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3 03132333435363738393a3b3c3d3e3f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "494af80d19c095d1b73e14140c5193d1". Note: 16 nearby case Set buffer "input" to hex value "00". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "0102030405060708090a0b0c0d0e0f1 01112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3 03132333435363738393a3b3c3d3e3f40". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1961 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2a455ee396d754bc22f0d5094f541ca7". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFMD201". This is the start of test case "TFMD500". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Content-based test for md5. Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5", "NULL_PTR". Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD5" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1962 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1 Set buffer "input" to hex value "4778ec68d5391ec842b6d8b3a61fe02 20a18489854d74fdcdab267cf8a0c0c6efa71fef6f118c1a5b2e2d4ce9b76568 5058e5e6f5a1c3d3a42bb091f6bcc5c69". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "fcdbda2aa67d44c5d7158ea64a87547d". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5" initialized from "NULL_PTR". Baldwin Informational, Expires 12/25/1999 1963 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD5" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2 Set buffer "input" to hex value "f1eccf5e41991fbfb1903324fd32211 9e250c29bcd2e60aa4670b723cccfacfbecd259efba8ed95764a1db939235e76 4b455c258b50d21cb4ae777929cb6d8f4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c97655e75ca1c65f3c016b3929cc2895". Note: Case 3 Set buffer "input" to hex value "0f64a730e0e4ccfbb9960fdb1200e8e 3cb75ead5a0df047918dfd13f30caeb65fb79e2a7f4bce63462a2d13e1af723a d819b50fff33de6e8a207972cb57e8909". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 1964 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "768e69fecc9fb089261fa49201489eac". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD5" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 4 Set buffer "input" to hex value "9c8f9237cde80516a42da869f3e23b9 ee1a0c8a6848be481ee23a4c2ce3e07d4227ea8d719aaa2922eeb8e84f683279 5261adc1d3380bcf476607c2909c71ffe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1965 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9d44a0b5b9c4f798bfeb17f0c3a06e55". Note: Case 5 Set buffer "input" to hex value "6a52db130fc87d7d7550457eef56cc1 a6e8d6422774e665404c8a02c967111b89516984819b594e1555afcdbb68eb73 84f44eec098a138cbcca6a0f703d57ef3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "64784d0b400fe7186170f300bbcb21d7". Note: Case 6 Set buffer "input" to hex value "ffe42622563d86f8a4b6960006e3044 aa085de7e22c9301d939050362848ac2fcfdff29dd032db43b1cd452ff34ef11 2c0921d503bb5587bce215bc0023dee37". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4c49a843240cbdbfef74b818ab5b83ab". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1966 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD5" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 7 Set buffer "input" to hex value "8ce0a4ac1567dbcc4fd9f8261119bef 0033fa49f53427b85e7660e25504375521007a83982fc938f334da72eeac17eb 6cde0aba0a9de70e7dd14572367941090". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "56aee5868cebdd4d4fcd7566c7bd557d". Note: Case 8 Baldwin Informational, Expires 12/25/1999 1967 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "b7b6c149372852c18a895b412d6fea4 8b30488484ad33f6008699d1c12ca50c993a152f63d95fec6dc9999ebce6ce1b 09662da3fae351d2279355376eb7bbc70". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "78ab20e48ab1a1024096e8062853e44b". Note: Case 9 Set buffer "input" to hex value "0459ff5ad334dbb4c2f7e13e8eba485 17b602246223d1d32b1cea86ad7534a55e60894060e8eda3c83c30cdfe4a6ce3 ec7f7715ff81d791b267965229925eb91". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6b9fe1316608476dbfc8faefa45aba65". Note: Case 10 Set buffer "input" to hex value "654ac6466ee8154059d9b7d1495ecb2 744ec8c0510ec39fe7fed783d41062aa8e02448e7670ab4d0e568d547832f994 d1c32a10e36eb2f09c35911ebf0c30dac". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1968 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0a2ca0efd7e81a349639aa82c975ad4d". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD5" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 11 Set buffer "input" to hex value "5e82f7fdf97641a944c46489542fbeb b1295d9e05824452417bf8cf50843c74452e1c80d2d90917f5fe2dd854e4f63f f99dadfc5b3e9d63552608373811a624e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 1969 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "90d8041d39640fab7d162e87f0db6ac1". Note: Case 12 Set buffer "input" to hex value "0be9831b351a352654757ca9318ff1b a9de10452f9a6b7e29d44b61e9b8632fcd0de6be125cd309eb28b953ad983c18 b4e8fbb36bb059b8f612d4a13a1a0e1f2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0da4f4fc594b85f1e73b4fbd28b8be59". Note: Case 13 Set buffer "input" to hex value "cea551ae1c1d1dc52c2dfb9ed336265 1b34ef7b49ad40aba001feda3134dde403ae9a3f6f2f785c9f4701bf1eaa2cc9 aff6cef38fdbdb70b45e1c415eff02643". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1970 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "45fd6c0b740f5a8bae17a78af306f42f". Note: Case 14 Set buffer "input" to hex value "0600ccc6371790794741973a9d0b97c 6b197316073115058aee2b6b57c3ba0859be1d96c95f69ee347b2f5eb1469ab9 84193e42569cdd7cf5423551f84566fd3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3ff9ac1595ffd3c84a589a2577411dc3". Note: Case 15 Set buffer "input" to hex value "c5b900bf1b18693742c3a4f58e38397 77bd3bf6c5addbcfafee277de52c689bd1f802112f9df4b5f7adc03e7a70947e 2dbacd616a3b1d9c2538ac4e1daac1f25". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8c9846d748f9e8edf1481e99aa0c6473". Note: Case 16 Set buffer "input" to hex value "4707af58671d58b6f6f21074ad38513 Baldwin Informational, Expires 12/25/1999 1971 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 04c9ef1473501649f9a04db141a19459c90cac3233da8aaaed47ca5886defe60 a2aa7e467193a945d9b6985768b53383c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2522a7fc255708dcca1022514fb06232". Note: Case 17 Set buffer "input" to hex value "f87f1b89eec701bc7a86257e3e1dbec 4179644336ce6441c6250645febd94392202e84cc6a8ca8f00acc7fc531c6d17 036aeac1acb2bff57aa715d0135e9d4bf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "60665e69d61e04d30444e56a65ff7b26". Note: Case 18 Set buffer "input" to hex value "e8fdddffc3c621db8d3186dbe7f51ff 0caec1e73d4d5b2a74a29d1ba1aa83004f5f5e1fe851f6ca284c6924bd5988b1 c4ad7703ede3f252dbd04dd067ac72c71". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free Baldwin Informational, Expires 12/25/1999 1972 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d4687fcd69835908f63ba146dca82baa". Note: Case 19 Set buffer "input" to hex value "ea97bb3f392fa668dcda3544dc90fb3 ba2883c1e8918c0e6f6a4ae4958f77ae21871d39b31ae51dcf0c9f48787bebe6 00845638ad5760728caa545ea7fd27ce4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9fac26ca95a6185830cf39e10e080ee2". Note: Case 20 Set buffer "input" to hex value "cc24d8272d0758077f5853317dd3c85 92487a8cb25e968f26169ee0b30410064800dcee6c0b42936d33e55a8aa62f4b 0ce19410543515955bf41107a0ffa8739". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c956cebaa25cbd2cadcbe6e7362083c1". Baldwin Informational, Expires 12/25/1999 1973 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 21 Set buffer "input" to hex value "c9a846a03a920335e63a0c400252470 2aae356a469ef44245be5e88ae835772967492b8ddfd6675ebde2a6c90d77bc3 c1067d7273b6c972a78d29f0956e8d062". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1f8540899ce10bd2e6c75973e20be58e". Note: Case 22 Set buffer "input" to hex value "932166d334a7c5e645095acbe2620a0 328195f6b9889027a477ad80980314726eb717a28bc98ed8ae18ab5df9f73de2 08614411dca234179bac6703f1563bbd8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "63077631bd980eb72e78ca946e1af50d". Note: Case 23 Set buffer "input" to hex value "b6a993c187ba64a776139ae72462594 aa8fa5ddaae487f3b914bfd7d254fc3e098f97eda62617748751042ef17e9285 48eb24db4c586176947c2029685148629". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1974 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "76756b3cf0fdde2077efeb67c0e7ff1f". Note: Case 24 Set buffer "input" to hex value "087b7496d00935ac5ab8160e9efd2ab 3f4c92bf409a79d6961c261195072200fed93432bf6f0d9b3f06044c56c5b5fb a167d9abcbe4d78d6e4a1bc113552d8df". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5166c483df31a7fd47b74386673ab283". Note: Case 24 Set buffer "input" to hex value "66fd6dc1e670ccbaf6bfb6e47e2f58d e53810ace1cedaee27a8e22773297f352605088ce5f1f965555e5be458bab04d 9042093c9d0ce4bf71e6b10c3fbc8b587". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1975 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c194f757d5e5ed144bc2dcad28647780". Note: Case 25 Set buffer "input" to hex value "5bd22e093ee43652623c22d02cc6fb0 343b1bec0b81d7c0f9a49dc29a59f3460d29df86f3309f46f26e561d369b1115 abaf8f81f77679f3e2113523aa725ebf4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ce2b39f7d7bd97f24172d994600d23bc". Note: Case 26 Set buffer "input" to hex value "4f7712effe29344615adaef2fccb4f0 86c6b3552acb1a89fe102f0ae7b44103b9388dce6fb569319ece74742d10bf17 0f6e57bd5d9fa04ac2f0a5fd48c319f95". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "eaa12a7e1c0015afcdcc195c09ad0d8e". Note: Case 27 Set buffer "input" to hex value "e997d75dbd04deb4b7c342b68a1ae14 6fbfd3b7a8ed25ae31497da80eada2f8666f32c5488f8dc8fbebae2bd2ceee59 Baldwin Informational, Expires 12/25/1999 1976 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 d1e2423488a36052ad1209ff0608dbb88". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0a5ea499d83e1213fa5715248fecba88". Note: Case 28 Set buffer "input" to hex value "1d13029b610ae79f79254921f44fd0b c8a2f79c6f495828048c56aabdb5f5b0a71c38ec0f26b1c21888070f3e18c667 9fb736d4775b13e83fe1ce84182c9005a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2e28905c559e1a5f0172a9c9a24db235". Note: Case 29 Set buffer "input" to hex value "198fc01736a9ccc9642fa4b6b9394e3 c19ac23daad8633030144f4aadc3a0bef6bf4abb8ea44a01c73fa3a672a009e2 32f5f027866a27da0d222c26990420624". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 1977 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6fc8017d2cf5c5d48e714b707fc4af2d". Note: Case 30 Set buffer "input" to hex value "4e4bc5a2526127df483c5694911409f 4a55c04651e5536c707385ce7ae9c9265362c11567161188d728507f761277fa 3d72a056f46ac83838d008120fe8b52ee". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1989339a12b3202b034aab3160534a85". Note: Case 31 Set buffer "input" to hex value "51f6ebd864e75dd8087c8f70bbdbef7 e5903659ab6dbe37d7ad7a17254d3b0d8565662eea07af78c02bbceec2a35228 53dc66eb958001a943e71149d391bd3c9". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "39deb6a630c6746c65e037bd4d6eb82e". Baldwin Informational, Expires 12/25/1999 1978 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 32 Set buffer "input" to hex value "f09d1756974c36c3203f4f09b475d27 a2b714606488fd8513183810edf3a735c1bd0bf2556bf5e1abc46d071ab26d98 03de35a621197f72111ff9f7867200049". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9a83c35581e4cce05468fb7b91ec868a". Note: Case 33 Set buffer "input" to hex value "87e66592805a60bf542e27819c07087 067433962436257c4e29cf42060a8e7246057c5bc17382fbc918a457cd527ad7 ce8b52f59bb3be1e939b03452cf7a93b3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "12b57b7b78b9dc1415f754e05ec6c767". Note: Case 34 Set buffer "input" to hex value "972692952472c91b4fde13f85660076 46a88ae3081351c24a74ea6030af1c4b8c318eeb510e58fbd35cd27bd178eef8 09a9096c8a3f4a3a4d5ed45f1343cebbe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1979 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "611e7711e14b52cd7afabe7febd1c52f". Note: Case 35 Set buffer "input" to hex value "43512453a7912d275089b58daf7ef17 37b1c5520dd74e4000b5bd5f87479720510a66191df64e6bf38f82cb96b537e3 65acc082f81a10464d7f2a04707586f41". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8d148ac1029f50376008adeabff71ae5". Note: Case 36 Set buffer "input" to hex value "44d47c9e5d235157156b9eae6ce1a81 663044c2419ec37614e8c4cfda3e426a2bfb15b27ec692c611285bc6ff4f6337 bddb258d1274a393c6fba82263a5bd012". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 1980 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "digest". Check equality of buffer "digest" with hex value "3968f1ea03ff8f05c5545a7391fe6f4d". Note: Case 37 Set buffer "input" to hex value "5d4c80792a1490d393e299c07f04016 7b6729a8ba67fb188df8ca4ba7b0be529838707aac1ecf15f45f4a43f4595b3b b8c93f311d63990e36457c3992cbef01a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9e1b32e274c6b08bec2f9c5d6a64bf39". Note: Case 38 Set buffer "input" to hex value "1ee894df9e9746c44f12ca13b226aaa b2373cc197badcb0876f175f9935c74b06a3385659b85228c1e54b689ee00fcc e059a7eb08d556ede505251187eea2c77". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f404f0597f8ad21e61e424134c1a6524". Note: Case 39 Set buffer "input" to hex value "141d6deab6730c237f1e3f8d4ce6aad 719c0469d459c1670354bf0141410ec89c4c3a4d672feb4100ab0e60979b34ef 90f64d99e328b668112942b5dac2d2110". Baldwin Informational, Expires 12/25/1999 1981 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9ba9b8cde0c171de115cb9a8d034384e". Note: Case 40 Set buffer "input" to hex value "e4a5f61cdbc06a36c124cb530e9ae2d 21cac7ed4fa61a8976cdd100f3737d7b437a807eb7288094be23654934811aac 712a6bc99140cf9b65ec664e7219bb622". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6417bd6a4e58deddc7a03864083b7721". Note: Case 41 Set buffer "input" to hex value "c4be1013e79ae33fd590358e42bb1ca 376983fcee716ea40978dc12633014fdeb1d995017f6fa693063ab45c1eb5da9 2270af6a14738086b446c22831eda6ede". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1982 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5a55287e086357092fb64f4897d7f708". Note: Case 42 Set buffer "input" to hex value "e2c742093f46c40feac82da8f45659e b99049ab5f5a96cfeadf711d2cebb09aa19a26f0eae4be7b301b23b4596db0a4 c8caf5236ab51bee4fe705a9f8da1e671". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5ce942c218c58280f8dbe5435e8789f2". Note: Case 43 Set buffer "input" to hex value "b23b07a95d76944413b7f96dc30229d e32276c8600ce0b0b5a8a76878150ab44402b97c9c62437d3bbe26a828a8f823 d9522a7c46480e10624f024ce11037d46". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c7ee14a782058e1568be41fe502e96eb". Note: Case 44 Baldwin Informational, Expires 12/25/1999 1983 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "cb3252bf102c0109b49b1a4d135b942 ee3f82f49cb068605fc810b4d99eea232b2ae35bc49fe8fa02776dc2ee99a320 5b9c2170a281c06c195cec81900dcbdbb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "70797a3ae667f9f7634179e76dac619d". Note: Case 45 Set buffer "input" to hex value "40827222755a96e286c2d06612009a3 e521335502793ce5932ecee436400d5c7a9d7dc5acc394c72a51e04f0b5dcc58 5b7c305cc29b75b07826106a940a392dd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bce279b4fe94c3d5835799b5d8d50301". Note: Case 46 Set buffer "input" to hex value "a99c1b6f0627c4517a1ef59385d8694 69e3168b3a2f2a5430feb2c97538f7c9d7e553aa18c9908260d28468c6907e89 48fecf1dbefc95976c93c1d3fc66727cf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1984 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0d347672e45caa0727a483ac19a05437". Note: Case 47 Set buffer "input" to hex value "2a9fe3bc7cfeaa445492c108a567e0e bcc3d9f699845a6483870c0034bc955e5cae660d778284a273b684e7b52f594f a36341522929454e1fd36a3d1a18fa91c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f276669ad55192a40fbf14320ee872c7". Note: Case 48 Set buffer "input" to hex value "81ecfda8f1204e3f7e523285428fe44 5312196e4295c3a7f8107e824f9473add8836e20c4dfa2910f10abee70bf21bd a488658b6141c2fd610ad9587f9d8ca39". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Baldwin Informational, Expires 12/25/1999 1985 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "digest" with hex value "785149a56b2cb369642a05235fdaa57b". Note: Case 49 Set buffer "input" to hex value "7d2900542a3a1ba87c49cba21c707cd 0890c9e9564d48ff8069dde8b086df3967e051b68ce085bea1b6181641187638 11217a04ed512cb2be3e2ded228350372". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b1462f903ddc4c367568101e164e9c9e". Note: Case 50 Set buffer "input" to hex value "d9ba09ddae4b8bb0ad8bcaf5d32f9c3 d9604fabcacce4926d84fc14c9e48c0240b3a686fb44b14c9568ed933685064c 3826248ee54787e00a64addaf2a3f74a0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e6aa9bc65483044d5cc4e234180adac0". Note: Case 51 Set buffer "input" to hex value "bacc561d8de5577764b50385ed5679e d7f4189603e68434f22dd3459e3a9938ca1305f2921321bc953a82b1c70a32d2 d1bf10733566e5e11397aed3a6c5670af". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 1986 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e400be1e1a92267cd1e8c5a0c7e401f7". Note: Case 52 Set buffer "input" to hex value "32bd28458a0c41e43aeba1a06f21d55 bea5fdca06ae0bd540bb818af6deecbb119057cd0e744d68b4d82ff61b0095d3 53deec27de25889b8434ead4c1c59675b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "256ec5a624ecb78f51261873744b0e87". Note: Case 53 Set buffer "input" to hex value "b68877d25ce6de3c5f049b34053671d 3de610ea51d4434afd2c01304b78a1bc812392685a2d6d8514a2eaca49310459 8ea15054c2a9d5f6e2d64a20248e8d772". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 1987 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2349e57b04f34bc2081ad3fd9ce97240". Note: Case 54 Set buffer "input" to hex value "7153a98234fb040cf3db8dc59ccfd00 3f40cbdf6761ac0decdb1d6ed2c9c39b60b3b304839765c902bff78f05aea7be 2215e6d7efa48252c0a012c4ff3ff8fbb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "49ad9c7c9a3563578697c0b4ddd389f8". Note: Case 55 Set buffer "input" to hex value "955aca4fe34e2e534884bd8e914dca5 9a31bc64adf576c9b5478b445a5d4d364aefce6d6b2bf79cddf1013dab3739fd 84b5e3c2ec498c4eaa60fb54962009ea1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b6a8c8849d1e89796ff4e68cbd619cef". Note: Case 56 Baldwin Informational, Expires 12/25/1999 1988 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "b8199e80a67cdefe5e2d82ee88bb352 c49495cbef35708312c96398349d0cf5a5b2d4b0d080849e490f009ef57318ae bb539b97dd6991c6785471f281b64d66b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "40e47d9be67753bc29159de2380a995d". Note: Case 57 Set buffer "input" to hex value "e3672205459f33bdcabeaeebe377669 21c2d117c2a8bfac7e85840efff0f56ea2f4d1f5c2c14cacae22d5b0dfa63550 59c8f830d58d3e204c8807db5e37bf184". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "120b3a90537dc9b7d3480a529f307c61". Note: Case 58 Set buffer "input" to hex value "ef74619a5ead883c2daf824cd076673 d874099bc4e426ac7db96d05eb9e9f6cd32a6cec13dca5b943191f9fdd374934 79e10074821a1556ae2bbf7c1f74faab8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1989 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "69a5d9d08f1ec4ec90b47e374b134272". Note: Case 59 Set buffer "input" to hex value "74e6c62fd00c0a129bff6e36c102fe1 da6a03adc130a953ae045bd93c8854aeddfa63d1211efacf0349c26b1e374f41 4889a8ce70ae4939324f48ba6922de0c1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "aa56b82776886a5bab96def28d8cff98". Note: Case 60 Set buffer "input" to hex value "b143b3993876d8c640deed9f13f8916 6da579591581d9483a560a5289ce9817ed9de129f816c51951daee1075430dac bff981143b1676856df594d6a14feb207". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 1990 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "0e9e74c2d10cd4b754ca0e146b70055a". Note: Case 61 Set buffer "input" to hex value "74c7f70742c29f97a0bb1a97f24149b abc739cd39b88cb9822b613ad5110a2d71c56b75bab0bf1e5455c9b03b4ea10b 8f477309964a5f48e8ae07afb5e80b028". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0323f3d3c465c74c9d9299fdc95f850e". Note: Case 62 Set buffer "input" to hex value "82480f8d0422ee4ee6cdcc7405ef392 7394a40fbf7a085fbe39918821d1d50f8011b5b1a1f56ac0f8e9160feac36083 5342e429432f834243fa329343787b485". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "efce426e03601a05ffddc251b1ea1099". Note: Case 63 Set buffer "input" to hex value "23303c647bdfeb94edc614b424fc42d 201ac2b6dcf59fca9b679763a1885f55e69b00c01cea033ac15c2b6a8b1881cc b6c533e5f45a674b2c66d0f9f357c0b8a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 1991 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "da224f206c36ccf504fc61425810684d". Note: Case 64 Set buffer "input" to hex value "0a3c898d9b5bd775991eaa47c43fa65 8593c24d3f83d8c6d62df499c3a4065f9c5198b2182777ecf2cec627d5fea377 a59a5d132d6756d7555927a5577663748". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "25c31473a6a65ca0cafb338ace255732". Note: Case 65 Set buffer "input" to hex value "84e29f704f19d06fb01e55f015df07d 714de5027d1b16b9be65e47192f95e43c829a835b4c0072ee3a4fde7854aa937 01cfcb07d81d1da05ef28ab5a3be884ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 1992 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "178c0b2bff855559da28a1a166dea5dc". Note: Case 66 Set buffer "input" to hex value "be705b06fdafdd1d155c5e37b059f7b d345aa7ae8a4d19ed2f0ca4171f26899fc24929843868da3654da28a08ee69dd fb020771d6183bf9ef462e8ab65374fcd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9af792e5f2e42f19e34ddfc841422cb5". Note: Case 67 Set buffer "input" to hex value "8f695dbfebc808e11650d66aa15d489 21dd8b7977215f30a4d5c4f3d9d6ac79ad1ba884835f84d61cf833dad5abbb6e 3ee64f6113dab0cf6e729078303520b2b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "dbb0c10fb9054406916caacdeedb7ac9". Note: Case 68 Set buffer "input" to hex value "969a145660bf6f04daf359b3427ceea Baldwin Informational, Expires 12/25/1999 1993 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 adb9587492e0cf72fd905ce709ecfe90ed92e510fc7c5552017835a58d3c0dfe 712ef60331c3100920f138414e4cc84d1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "fbdc72c885f9aca6378f896c2cada933". Note: Case 69 Set buffer "input" to hex value "c410252d018299d0673076170a80cd8 c9d8f38ba1777b9baff0b8e47f65fab576e1b6e8be0179da0b4661432efc6070 7ec83c000739957972ab48a4989f064b2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8b7a2c28d739da6f5c04643ccb9c0c16". Note: Case 70 Set buffer "input" to hex value "424947698ffe60dcfd54cf08417b164 5065fc4898dbf16a9cb177cc8badf28861a3da66bf3375c5ca46116411f98536 70ab925cb5b3a551e1b418feee3183c7b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free Baldwin Informational, Expires 12/25/1999 1994 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "217a2c157ce9e7ef4837c45b2f8c5ff7". Note: Case 71 Set buffer "input" to hex value "436035e4990469404c7b3443a9713da 3367ac77e8688e8fedd6c2f865bd56535a4767d41eca632c8842a700d1d04b0a 0a6decdac69e9abfe2ac538b68f580f9c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b562f3d6abf0e2b401241e8384025e55". Note: Case 72 Set buffer "input" to hex value "679b0d4c300bfcde4cae1dff8e47ed0 900c08d7aaabad58c6a8a8c99bc8b71b7d7862dd46f48411038018f10439bbb4 1fca383c9be187c8976afed9e59bed042". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "43d1c94f7834d1c8bb1691956e1323e4". Baldwin Informational, Expires 12/25/1999 1995 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 73 Set buffer "input" to hex value "c3002ed55d2ebe3868d236c4e7a18b6 dd4829730b0a09d1b6e52cc32583f43004a5e1dc8b52296e966b1db79b6c3503 c088144eb5c2c574e8680bf1a702ef893". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2dcd07d7e89dd39a5a5fc12317ec7e73". Note: Case 74 Set buffer "input" to hex value "673ba4ed59d01c611b5d339b3775f23 b67cd0f04aeb531029a27bd28912abb8efca578b8d2b5fcbabe56b1fe9070e0b d866e123a25d8557947d8dcb3ce71d5d0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9c0ab4f3ca75a10ea8cfab8b3905ddf9". Note: Case 75 Set buffer "input" to hex value "2944e16195f38e3a2226f5a3807beed a4fcc2fbc532558349df0e1ae302e4e901aea4a8e9ec099de3b383ac94574f3e 3ebf815572fb50bcc83259d09a5343af3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 1996 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7bbe0dbdea56dc842cd179322fe77d10". Note: Case 76 Set buffer "input" to hex value "80d5cb8b0f3335ae59b696500b011e4 9291e2d66259f3f46b3b1ad268b4c5ad4a8e14ebe6044c562825ecac7028968f 35eb3523d269ff929cf388d7c92ea981b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "34fd1ad7e004ac4133a174c9a3026b7f". Note: Case 77 Set buffer "input" to hex value "12125eef064ae13c1bb0863bdc09de0 fa2ab5ff032c60331d1ccccbe4ec9fe59363bb792d73aca0ec7944feec26ea19 b3b89bb95582e5e1c5c9ac224f4c5f0c1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 1997 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3b6a06b5ec2dead596fe4e5cd981c41b". Note: Case 78 Set buffer "input" to hex value "04d7bfd047550e476957c6c4272ded8 b7e2081b4c9cd9545a5ea0786257d87e2333b5fd401780eb428b5c4f494c14ec 40e8dd32cce5cbbea3e40a060e2e94c07". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "af41a2043ada0727704c42f73c637ae4". Note: Case 79 Set buffer "input" to hex value "56e3e6ca6d4e5182c0cb5c0b99ac401 cc51c19a345ed920cde09e3228da661517fd8a78acec40c3018bd0b6169330b0 3c4c0fdfef20ffd1878b2262385edcba1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9218c41aade9d8cc1d37fe0d91d33dda". Note: Case 80 Set buffer "input" to hex value "e63596e76d2a5e8743e41a71bd8cf0a 6ef1702249581d3a44a7d9878acefc621d01e90c655912cb924289f26162ca8b Baldwin Informational, Expires 12/25/1999 1998 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 325788b58dd16b5b497e093fbd8b01721". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "aeb83b46157644906ec1cf5632baaea4". Note: Case 81 Set buffer "input" to hex value "f67b424092b53bd3972d07c3aedb10a 059149894e986e3af87a4528e70db116082d2136e3b6e9c04d3915ff54ac97b4 acf45fa59115a7ca269099afedad1f073". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "93cd281d8ebe0fce2dd8b07de81d360a". Note: Case 82 Set buffer "input" to hex value "f946a587332c6783841031f869fd621 e3a47ca78a425f87ecc653ed6a5e3eb71863b055e9d1ca39e78235317725982d bcfdf06a31dcd24c845229527820b9e17". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 1999 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1bf650e34df2dae0417313237c2a12e3". Note: Case 83 Set buffer "input" to hex value "2c780b634a6bea1c6241c5ff71e3cd6 2e17e6d7fd3c69f7d4e512368d8612bb8059c2d6455dfe25042de975107d03bc 88f089988c48a2b96e67b3d05b3973873". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3b2fe21b7a394a68213f204027c1d20a". Note: Case 84 Set buffer "input" to hex value "46c7bc4ec7e27862d60040128efba8d 7f611e427dde4c8391f6aa67b7abd6893be856eb9debac38690db018302158ab 2fab8aa10b2d7a41fbd210c80c7bcddd2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "aad3888db15e2d16d5451a62d271fddf". Baldwin Informational, Expires 12/25/1999 2000 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 85 Set buffer "input" to hex value "9b1be4346df155d1c8446aa245597c9 61c52a89dc7e20abc747081b0ebc62f2735eb6b25c54885921bd0dafe292993d 55650b2866f17edb76080253f2d3311b5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "60f149ca0bcbc6855ccc5fb37235795d". Note: Case 86 Set buffer "input" to hex value "293d76ba9ae6f68cdd8b342ba66983b f8cda268592c230b09471bb541770e67a0fbcebdbca00bec6e4f916a3a9dde7d b4bb56ee26d3f92a08356c74953dd3bb5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bdb882366af89a039a685467a66ea66b". Note: Case 87 Set buffer "input" to hex value "56a3408e80db84e53cea63a7b47fcf9 c58c56d1bd34b07b76f629ca2864d2c0d4e1993ccaab21d1bb52773cce90ef52 ebc2dcd8670e1daaa2abc6a43484aaedc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2001 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c6a843a6b471dededa912d58290e220b". Note: Case 88 Set buffer "input" to hex value "b063da46b50720cf13c0e230d5fffd1 16d1b1a9262447a553c0efcf07b369b7b74a306fe728cea9a9088c3ebf244fe8 e584bd14deea967563875c10bf2b68e2b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d8fbb5659dd62cd9221615b3c07f8514". Note: Case 89 Set buffer "input" to hex value "d03b192739bc99a123d1582a709a747 c4348508c8cddf43f486dca0d9fc220ea227277c0314b43598f2f792b156726e 93a35b12eacb4de49463f3928cde65d35". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 2002 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "digest". Check equality of buffer "digest" with hex value "49f8dfd27ba0d6c10a9b5a29e8538410". Note: Case 90 Set buffer "input" to hex value "75298e5cc59af8ad6a883796113f68f a96c34b87e6895a9671ce964885a87db0ded3c976ce268b3b9d47b1dd140d38f a72f7487d58a23a767720df728e2227a4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "af4680fa27d59eeb8fae6daaee076b82". Note: Case 91 Set buffer "input" to hex value "29d656955d7cc8b992aa5e2a4d07923 54de07d318057d2224e2ae45b4e3df9687c9f0c8af02c67070a48b1da53a00bd 3db4d419022622fdbc000f96de87a11a5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "28e484e252edb3dba15250e51a4f7581". Note: Case 92 Set buffer "input" to hex value "a5527c8578551f293638ecd67d2bf50 b787a5d846a9a8665a8be907878ac4e8a9436b8b20f19a108211eafada7aed40 39a2e72a0e4b86b3d1d24ac989951b7ab". Baldwin Informational, Expires 12/25/1999 2003 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "735b8370677eadd751c7faa13c5d686f". Note: Case 93 Set buffer "input" to hex value "8d99c4fb33d171d6b1713e794d698ae d327303d1810929096945cce0840a40fc5150961432764d65cb53f8cc5078ace 2f7c8b31b9dfc7a6dfd380a3d0058c44e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3fb35742637f8e63c913370c5ae2153d". Note: Case 94 Set buffer "input" to hex value "f9ffd620309711cdbba1d88f5e85183 1545f5f032512684f3d311bd7e39f90b35fa638f879c608a9265464d95765c8a b7d5f2afe9d2064e3f8c7f46a493c512f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2004 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1f8bea584cf0eda0ddfc0e2bf83c6d42". Note: Case 95 Set buffer "input" to hex value "502d576540caf10a55f12398c265d53 f1c48b465a1811d9e0018ca9ffb160b5fdbcb1e7ea3328c5694190d50e420149 cc3dd75aace57216eee2e53183b41420f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0d96976a8206fb2299468592d93c9efe". Note: Case 96 Set buffer "input" to hex value "81d6b071fc77b43d5efc3af029c4de9 7137a27f225969725af7618cc04fa857a10eb76381477b5c8a7d2681fd852045 6d9b3ae2f3972f117ca0daadd126a3fcf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "fab81988fc967212261cc064924107e2". Note: Case 97 Baldwin Informational, Expires 12/25/1999 2005 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "7ecce551ff50e5179e56c923045811c 4b146b2cc45c932b851665f394c5e4beb690a068b661ec60b3a94f2d9a585f4b f6e152c8130cd32efe2ca68a77c3d1597". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7efa1b83c14e8927ebec34afce2cceff". Note: Case 98 Set buffer "input" to hex value "ba62e4d9f590cd4e89e66658f3de540 fd6a411c711e31d60c8fb7d135bf70fc48fcbc03a454b7b87bc191e6984287e2 04c852b61392b3a03a06804a94c41a5a9". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d9b6131b125e816afac9713f3632e955". Note: Case 99 Set buffer "input" to hex value "8168572d190eb3a86b4ca25e02782ba 22ceb5c1ede921446f01e8bc49321e4d0319318094d331c13f9933bad0bac4e8 20676a9de2a4af7c5190a92f47b3b21bb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2006 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4e9f760e3b773fae7d62c4e0cdcf9f75". Note: Case 100 Set buffer "input" to hex value "7236e7fadfc4936fb010abf9b7b95fa c6857ba48e7782d571017f52f62c45f79f2594121c28de6be4aa3e190f90ab8b 35846254fe2fac07ba9cf2a71d7872eb1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "71924aff7eff2e6af0aca93614133fe4". Note: Case 101 Set buffer "input" to hex value "9e159e0d3c845b02dcb9948dbcab5aa 2ceba5e73b0a874a9b2f6da8a1f98521ad17e0b215d28c995cd7f276a716e399 9ca94f4de8e048bf65ae47af3d7ab3235". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Baldwin Informational, Expires 12/25/1999 2007 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "digest" with hex value "a3371b0f38ed7d2155aeb4ed03df8e23". Note: Case 101 Set buffer "input" to hex value "922fb0ce5527e4b9364f7beecaf4a93 3106ffcabb7414f7efd4415a704b5e55b718e56da00edb2741dd8866eb61eed4 f2a1abfa1760b4a0f69f36bbabb7aa947". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c622489d876f2b5f9a05bb6d75a90ca7". Note: Case 102 Set buffer "input" to hex value "4cfa4dc436617dec656e41cdf5a2717 0da830e47920c6564c896041acf60a10b0040ada2edc1e73221949260aabb86a 15c9e99e7c82ac4a556e751e7f9608808". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e0c2b2914a09e23b7aac812f6d7b5aeb". Note: Case 103 Set buffer "input" to hex value "788a31dcbf0a4c83114e6770fe1d88e b685430a0137c6f38c91d6f0f884c80efa7c08beba05e4adac92df48b1264ac3 76d6bbec2c10653ecd138f38316335074". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 2008 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8070c244612ced743bd2084fa0965af6". Note: Case 104 Set buffer "input" to hex value "fcb9536eed8d3e05c6b5060870179b4 8cf750663526bef2e6c51378c07724df7b745b03469e68bfc98b66344368ec4b d26b098f01c0608afd2cf1e6752198f7f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1393d31185e6bda4bbb5790bdb940ba1". Note: Case 105 Set buffer "input" to hex value "e036e41aa5fb46664b102a1462a9c3d ebfad588826a05d70030f3f28cba38f06539d91048342be6f7a2f1cbbe1f62cb 70f44f255998a2a3077ea110eff59a2a7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2009 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5eb70f192469003e23c7096e8e5658b0". Note: Case 106 Set buffer "input" to hex value "1f68377c2aec436e402a9aed5f899cb 575addbb96d6a7c97ba4d09164b0b46c020d3e8507bf0e987f0cb0ca3d879520 cfbd45449705e093ddf2a63531ac668d8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0c70691525b6488b83b9b51aefc9ac72". Note: Case 107 Set buffer "input" to hex value "444018bc7308a20dff9129057af5c15 6a8f453c831527003d9594e99b03da69da0d693a2578da14fbbf621d3f90cec8 9f9900c3a084b6d6151705f8bea4ec557". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b362fd0f5ed9f1d943ad25c5e1b99a4b". Note: Case 108 Baldwin Informational, Expires 12/25/1999 2010 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "9cfea0c7e3c7b6a2d2c924065937633 d17a40ed180e333c7c02820dc2c4ddfcc6cf328d08172500c87158e169f8ad80 ecfb403ad9d533df0c0e493676dc82107". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c05ef1e5047d484e889586191ae6161a". Note: Case 109 Set buffer "input" to hex value "db90bd046a1d8052b9a3ecbf502f93e 2a47b8e245f340fa9603ed3368173129fd6aa6dad1e243cbab73c0cc08255f0b c3cffdf4363113abd3023a9ee0d05bd00". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "789d66a784642af6843fdfbf072f7416". Note: Case 110 Set buffer "input" to hex value "ebe625d97fcdcf7dbecb14265c45ac7 951e7672f724b00ade78f25d15ae32076d48933e36f2909a290fb6f2be5b4cc8 690eb00ef3512411c1f2a4c99c31d6340". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2011 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1feffbaa91140ac37e21ef4e278c898c". Note: Case 111 Set buffer "input" to hex value "7d53f4c64bbae5b0ea65665d1dfaa19 c4b6fb7f397cb801eda3f7765dd8d047f7dc2f498ae2e35fdf8152af896462f5 e73c0569948ccb70d797dbb4dc59424a2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "201a3a0aba91fcd6b5f825e09d62d4d7". Note: Case 112 Set buffer "input" to hex value "8c28c9ce68583e9eadc03b87f0db865 39bdf75e3c838890d7468dee36f4aa98ca408499849b3c7986cae75c35d485db a6c61bb57880df0c92ad292c86e20637d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 2012 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "40f59b3a5a8cdb46eb3f9b708090ebd0". Note: Case 113 Set buffer "input" to hex value "dede0f17077f0cfd9075cb2b797b1a0 a3a3b294dc39cf1f78052ca7b1598d5be6d54a8276e133440b658234c7ec0dc7 cfb3d4b537c82aa920173c14e7d4741bd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bbad799327716243ca4f25d5176ed6c0". Note: Case 114 Set buffer "input" to hex value "9058e3e6bba94527ceef6189f1091ad acbc8ab4e5787febbb1f7a44f0f05f96ee37b205dd2625d4b4ca9d41aadae361 9b51ae8e10ed4f62499ebf9de5ac48e86". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b9b7f52c1400f1c7520be99aec69ffee". Note: Case 115 Set buffer "input" to hex value "aa2be83649040b6b4725eed4cde35e7 6b182ed965f3db1af3bb58e115f7405191123aca13aa97818ba1bf0234a38582 994f3668ff2cafeb0b946d71c3fb2752e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 2013 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3c9db1033a40b412d33193126fbceb71". Note: Case 116 Set buffer "input" to hex value "01eb8459992a903587662f0598f0af8 4723fb212bc904430b08c30a4e71a4dc89eae336ce78551ab464945d1baee490 fd316d3695541f98fa93173d981ec4e9f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d02d2399810743a0e013193171f2f957". Note: Case 117 Set buffer "input" to hex value "2c25c78f8c709d295fd4d3137bf75f6 b730f0eae4aeaf074bf1be1ce54c4e80e67efceb0e7fc3ffd3aa9fceaa47ab26 015ce2d0d91e98d036f76b1f19b3378ad". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2014 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9126ceb72488ac26f0681518b1c31d93". Note: Case 118 Set buffer "input" to hex value "2374db50d6104b3b923f07f285f6f7a 16798ce0fd5a2dc304a925a3b3e3da8ae83cd7e8f7d33eaaf5ed64d9001ab3f9 b6676082c1a0fdef0158681dd9c795484". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e0fe33ec61ac0521a1a4a612152692ae". Note: Case 119 Set buffer "input" to hex value "7ae545e5638e7fd394f198617625f19 3626a9eff09a8e6fe7b3d08340dde0fefbce4f32eb167a3b13d0e385385b3a14 6b6d104b8e1302e2a7d3e7bb52eecf4ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a6643e48233a95b6fe1f141d5b8b31a3". Note: Case 120 Set buffer "input" to hex value "4e7754e8beea94fbc945282d500b48f Baldwin Informational, Expires 12/25/1999 2015 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 cdd03a8834504e6d0434d2771aaf5f98856b22474a7cfa7b1ba7998301906453 9d5507603f2bd51e7d7fbee5dd21c54e7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "570b77ec7c68b2352e833cb570ae1541". Note: Case 121 Set buffer "input" to hex value "7730d9af33521642242b16405aeb6c0 e64fc3eaba9d25d927c249df8d4f5e35eb49fe458e05a53f10d195043946651d ac0c8c947dc531325f4d42b9581233991". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "44ba14db2997d078534f60a04fc1d61f". Note: Case 122 Set buffer "input" to hex value "e7250405b97eee260a643f27bb3b66b e3ce51a3e615b172373c4efbf7af7336058459601f876ca6732e0972d6c14242 0511ca358b4a3e986b35080e5550f4d10". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free Baldwin Informational, Expires 12/25/1999 2016 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "53449056794551d8fb467b311e42c127". Note: Case 123 Set buffer "input" to hex value "e1adf0c73905afe2f180be19b0f35fc a1586b6fcc1f293c57d4d6b5976fadb52ee42c8f2a02921e8f0834a0e7641252 4958bf0697689cdadd670078eedb7b579". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "64e73899765aac1a1ee24d5041665231". Note: Case 124 Set buffer "input" to hex value "96083455215916bc6cf2f515123b2f3 f7e7fff410cb6cd36c95d3e345b9f567e8a9508f064d4b352a4563ff6b17e127 5a0794f7883247e6a616dac58482c477c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a983b0c047cc454de9a9c804aacd5a01". Baldwin Informational, Expires 12/25/1999 2017 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 125 Set buffer "input" to hex value "edcd8e4446f752c96b2defbe0a89069 88a51eeca816a23467b0f22609db9f15e1e1f0628d7d79dde239bc6dbc71d0a5 321a3a94d32e527080e3d0c77f22505cc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "06c2698c6fe954c65a93f64602812233". Note: Case 126 Set buffer "input" to hex value "3c9346447c98bd576025037892bdedc 55ad165f5cc8d6c1565ae4f636b42b4a84c1192dcd125dbf51b90775fe5a6c75 c818c9cd84438b0a09fed6a7c7f322eec". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "39b1ec007ea276cc95ba59023f6e59d8". Note: Case 127 Set buffer "input" to hex value "37ff651514f8dda02fde3c9aca7cd1b 7e0fbc3eec04aa60cafb079be7feb76cb1bcf8a4084bde8589c0bbf599b31f5d 97d922fdd2c5943cac04e9668655fe9a8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2018 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b053a29e976a7f54d55d33f728fc8b90". Note: Case 128 Set buffer "input" to hex value "3f81d85d75153c6749dca621b570c6a 3c6926261f3b1670af656442a3186e487bb13d97becbb83ecf180b1195466efc 103fc976a3a26d6f27f5ba6f5bdd65935". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7bfa87e8d68d6dc596bc0596aacf99a0". Note: Case 129 Set buffer "input" to hex value "65746dd3452154c188f66a0ebe73b93 b092ce854353eb96fbb53acec47414af6e9e19262107b19520ae21ae5fe4f17d 5cad394ce4f54320ea84351770611ded2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2019 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "52a7407e37dc1c15844d013969239531". Note: Case 130 Set buffer "input" to hex value "54f6e771c83a2e3ba5261d4f8c4b009 965524f13c506295be39a189be25192baa55751c62a1dbedc23d61eadcbfb1ce ec4ddc1f22d826b28b82da44ebc388e8e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9d30e5634aa8712442dac643aa167fd2". Note: Case 131 Set buffer "input" to hex value "78104ca000a890ec840f90cd6ab340e 473817756323118bb451a7648eeb4f0c858857f447199632fa8f6251fe468cd2 e6ebf830a40f5b1034321c46405e890ce". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "08c3b87d2f91e23c788830a210c395dd". Note: Case 132 Set buffer "input" to hex value "5d512e140181295d775eea3568a18ce e263136552a9f3fa00c7cb48a0963099243d78057a2495d4478a6fe0e79c010a Baldwin Informational, Expires 12/25/1999 2020 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 0a929a50130b2e69a3936523488318e39". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c046a628ac22872f270389a3703b775f". Note: Case 133 Set buffer "input" to hex value "88e9438cfcac063f499e918200122f7 a1491025ed12367a3e5947dd756e238b9c1595e878c9726eb8730b2d81f92ea9 2dcce95ad99b113fc5e67e6d09c59006f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c1e89f5085cee317055a8112f58428c2". Note: Case 134 Set buffer "input" to hex value "29d2ce0307b3ec4b0629793fcdc7af1 b5c48b285061bfe1643acc4c2bb80cc19c14acb1149d65b432a5f91a120f6af6 995889bf384f71ad24716d070e23d2fcc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 2021 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "46df74ce967f9a0c0fc2b8b02ff9385d". Note: Case 135 Set buffer "input" to hex value "5627efedfeca60437808923c2f880b6 d19b0dbcbd50c3b2577e971f588e254159b9545e41f193aa1d6c123f84362ff1 12093a9ce138239ebbd9ff4ba92feb9fe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d4b1012c6d3749a67ac72f6f1a63d93d". Note: Case 136 Set buffer "input" to hex value "365e3f9fd8910a6108fa4f05dd08266 768a401a80f93132684836be79960c9655a4dc4bcba5d02143fd509060ead131 0dddef6bbafc222a06360915cb3485fac". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "411ce1b8d777e7846e0ca9c181d11514". Baldwin Informational, Expires 12/25/1999 2022 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 137 Set buffer "input" to hex value "75dec9a0b31244b4085f2ce193721ff bace0c8c2ff148d87253457cbc7b5935044d84a64cbd2eb6703c2aab0e7f5dc4 07b7ba72faea92f449422f66a8fffb504". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e118e8284406454fa8acdea2d73c8f2c". Note: Case 138 Set buffer "input" to hex value "6c3f3cc1830063b4e9b9040520e6fb5 6db45f4cfae7a422cd19c9658c30451f76b5a8083cd4a3f3765f9dd996a5acfb bdae6c5b48940ec84435c667ca721b937". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "dc8f1e3997e5c9ea8184eadde714fc8a". Note: Case 139 Set buffer "input" to hex value "790b9c8df13d4d7976ea7a1a21bd4a5 681a2050f0611ff50eff4131a467125c2d739e7d87e23fefc50b59db72dcde1e 0ceb812caf376a8b00fac3dbb0c4cd1c4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2023 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f317f4e503cf5c3470bedfa79cb172c1". Note: Case 140 Set buffer "input" to hex value "a43337110f60aad787a7e61875e8ce5 76fdd25e5e40b374c0badd614817baba400e08bf65cc70b6eea8cee25c00f05e 64d208ef2055ea7525790e4986ca46557". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0d85293cdb32e4f356f8805637ecc687". Note: Case 141 Set buffer "input" to hex value "9ea5748856688be293a5218d0e9b8cf ce3f381c6eac2c8885915dd2ffcf4e53b3f0c568e9dc5662df0a25ac408c8b10 1607d5f0976610a49ea526a5cb9f335ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 2024 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "digest". Check equality of buffer "digest" with hex value "306ad3a1e3c78798532d8c5169662f62". Note: Case 142 Set buffer "input" to hex value "08f8067ea8b38e94fea578fa6d3bec6 fb736b4a2c65f50ef163d66fa1c10d78492ae33f06bec97814ad997ad0df0e4d 745734876f4865e535856d8635ce01449". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d2a82917d3dd3c16d3e5369d63c6da7b". Note: Case 143 Set buffer "input" to hex value "d1b696cfa0c2cf5823c15ec362acfc4 4344c4e2581cf018886e4ae11a13ccded57a43cc7f42ba4a18b5ae2f36828b1c f9470985fb3bd359bfae91e236a19d70a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "79c0c659334ff58191a5079140596099". Note: Case 144 Set buffer "input" to hex value "12c7cc752a4bbb3e05183ea55e3840a 3b1f94ccd8af1e06d9264283a02c77cf3b10616d7e5f026f21f88239e3b51c03 05790682bb60b7db6aeb774df701ac19f". Baldwin Informational, Expires 12/25/1999 2025 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a88736defdbcc88cec9fb2f3611a3f87". Note: Case 145 Set buffer "input" to hex value "24326850aadb4f674bf2f1e563b9919 8d0f86c09313a0f00e0dfbb9a5cb8469e190170c95fba7376f2a8f6ce01cc0ea adf32fbf906123697685f475df862d736". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f053d7f91d0e41e6ecfa26e423bcd43e". Note: Case 146 Set buffer "input" to hex value "2c91d81cd831cfe23670949936d4f6d ad8b752aef705f94d9352f4c6c68fa574a525def492fcfd44bf81046aa99e255 fc132e91875192b1f25b88e28cca99625". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2026 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3755795682f9dfadc3fb147c4dcff271". Note: Case 147 Set buffer "input" to hex value "8a9494baa8ea500b3f6322fae28f30b 3f87ea811d96428c4b26438491d27130d6858ab23015e2316632814eb43ffa03 3fb23c18134b307f5bf354b216d3a8251". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2da326e08d13412e54f42a6614d0ddf3". Note: Case 148 Set buffer "input" to hex value "918eda65fa5ce91d57607c7b4682b82 cd94fdf04a256b97702cb2180624249569d8abe1b61b9e6f610bb086f2f971e6 3fbe5144fa166da64e2e4e6828f5cfadd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4a0c0f2c79e7912c15109b9f78a273e6". Note: Case 149 Baldwin Informational, Expires 12/25/1999 2027 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "bab23a9a1acb38badb28ceb436f0cde eb6f18faff87bccd46666793d83ee761227dca86e702629637dc9c58477cc540 61bff27f4d6b74bf38fa890259716c41d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "05421613cc5983cc4fb6d6e934df6a45". Note: Case 150 Set buffer "input" to hex value "37e24b4faef87c36dc655ab483076d3 1aaa9bb1fe02eda02b4228f3960ff2f46c5da973e0b9b43bc197244cdf32445e c747765f617066cbe512c2ff605a54784". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "22fea8f24d1d90b867500cad64620d39". Note: Case 151 Set buffer "input" to hex value "22fb6a512afffe4cbee11056dcfeeb0 0dc09c852df48eae923cf5e586d8fb6db402b21abaa1ae61836b1ec3a5faf5f4 cb84dac6d567587836ef35eb34feba6e0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2028 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0a63819b6b9de6552a0cc6a304bb389a". Note: Case 152 Set buffer "input" to hex value "3e6f42d692adaaf4e78f6706506f974 39aa49a673b57f2ec259400cd84324238319c013f7427d2b9bbf1ddb57ed2646 d4a55fda517fdd81b2578d28d0dfe1c5d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0e7b4c9a5aa5706f57fc14aed91de7fc". Note: Case 153 Set buffer "input" to hex value "712d545331f05aa05190f32bf1c1813 d31ad160bfc20518365401d969d60c5b97bb473432bf26e76c237fefa1eee114 23414b740daacebc02669a3cc18ae9eac". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Baldwin Informational, Expires 12/25/1999 2029 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "digest" with hex value "cc11351361272eb5304bcfe9758299d6". Note: Case 154 Set buffer "input" to hex value "9e91d6cbc99ed92d9e045d5063b67d2 b451387c72716a742978a93b0dd3713c09b906ad44602b4b2d58b5b57041d94b 09dc632edb780bac1c54966bf1fa02a61". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2d5bedf9cf26ada151f779a0c58f5318". Note: Case 156 Set buffer "input" to hex value "edc641c013f04abe8b73949ccda2998 fe30479c66c8e5902bcf7b8ebc360371baf8b75e87b556f9c2a43e2912ce5c39 c37128d1d14df7dcbe1ab636e9af1016f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "64823a594b5b356d9596b9019c3e286c". Note: Case 157 Set buffer "input" to hex value "5f3bdd91d276cbaaa54c9f305aa9d84 842a5c7b4566870a740e2e52a7f517440652a4bf42257fc3ab6bff1af313e5b1 922ba0ff7e984d149338a36bf8ed46ae4". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 2030 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bc28bb0d2eb1028892e6ab52c2ac3d5f". Note: Case 158 Set buffer "input" to hex value "fd37ed70fb0fa83cba1dcf712b136a4 3227223f735fe6dc66dd18805142e239a970a0b278f11971be0ecfa40b3da21b 4a9beca53d581c6eeff51337478ff61f9". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9a77a1afdf38fffe1ff975a7a3c60ff5". Note: Case 159 Set buffer "input" to hex value "e8c4d52ab8812c5af246111218d39e9 68469badcc7f906e03c5aee3999b859dd636c6597b5e3e879493b58bd7e6835e 01077a26d3e8435ef98dde188be6a7ac7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2031 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5994614dc1b85b503a20f97d645aab94". Note: Case 160 Set buffer "input" to hex value "f51b6b5594522f0987a957ad136c3a8 690de1837ff0359cce939bfa3278c3db86cffa84f114dcc131d7e821150617de f1588b80aecb67f93a7340bfe4186108d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "49c9429e54ac158d39af82a6730aaf8f". Note: Case 161 Set buffer "input" to hex value "072e4e8a4aa52a92e10c04a7a7f6623 07cfacd85574bc7802e6f693d1184a9da412c2d66699f647f270925061088ee5 ce9003ff3907039d9b598c41d24086fb5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bffd709a6bce603aa5b0250d6727e020". Note: Case 162 Baldwin Informational, Expires 12/25/1999 2032 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "29c9d94535b875109e284738a881a17 1fd52c89e5c33b8f7fd7881c8ae6b6bd8b215edde75f31bda5faa56056d9ca5c 2f6cb6808ff3e7ed2a0da04fc835e424d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a5ca42b760609c7d6ae13adb05e3b66a". Note: Case 163 Set buffer "input" to hex value "96ccd75f6b2eb3580d8db3475508603 d48a4641bec0eedf1d14491f05157d3314b3fab52904f61d0ca201ef665100d2 67cb9e1e4ed63ae790d3866b6b78998bf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "39f33de99dfff8b717783ae0870582a4". Note: Case 164 Set buffer "input" to hex value "bc707a109a5b5120999ef9a1693c624 7c07a3589c4df1d7e1f0a3159f162f44a2416429b166524a87f30e2caa0da23c 8401baa8f5ce844fd6c7c7f6a2d39dd64". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2033 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "07c7333fb04d61fa23d3a9d325443fee". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFMD500". This is the start of test case "TFMD501". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Length-based test for MD5 Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5", "NULL_PTR". Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MD5" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2034 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: 55 short padding Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f30313233343536". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6912ee65fff2d9f9ce2508cddf8bcda0". Note: 56 long padding (including transformation) Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f3031323334353637". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "51fdd1acda72405dfdfa03fcb85896d7". Note: 57 nearby case Baldwin Informational, Expires 12/25/1999 2035 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5320ef4c17ef34a0cf2db763338d25eb". Note: 63 buffering only Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "48a6295221902e8e0938f773a7185e72". Note: 64 transformation only Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2036 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b2d3f56bc197fd985d5965079b5e7148". Note: 65 transformation, then buffering Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f40". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8bd7053801c768420faf816fadba971c". Note: 1 62 buffering only, with intermediate storage Set buffer "input" to hex value "00". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "0102030405060708090a0b0c0d0e0f1 01112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3 03132333435363738393a3b3c3d3e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 2037 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "48a6295221902e8e0938f773a7185e72". Note: 1 63 buffering, intermediate storage, then transformation Set buffer "input" to hex value "00". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "0102030405060708090a0b0c0d0e0f1 01112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3 03132333435363738393a3b3c3d3e3f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b2d3f56bc197fd985d5965079b5e7148". Note: 1 64 nearby case Set buffer "input" to hex value "00". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "0102030405060708090a0b0c0d0e0f1 01112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3 03132333435363738393a3b3c3d3e3f40". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2038 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8bd7053801c768420faf816fadba971c". Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFMD501". This is the start of test case "TFRC400". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test AI_RC4 Note: This script will operate in a loop to test rc4 encryption Note: for key lengths Note: of 1 to 256 bytes. Note: Each iteration of the loop will do the following: Note: Increment the key length by one. Note: Encrypt input1, then encrypt input2 and input3, compare Note: the two outputs. Note: they should be the same. Note: Next decrypt the two outputs from above and compare the Note: results with Note: input1. Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC4_ENCRYPT", "AM_RC4_DECRYPT", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 2039 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "input1" of decimal value "100" bytes. Create buffer "input2" of decimal value "100" bytes. Create buffer "input3" of decimal value "100" bytes. Create buffer "output1" of decimal value "100" bytes. Create buffer "output2" of decimal value "100" bytes. Create buffer "result1" of decimal value "100" bytes. Create buffer "result2" of decimal value "100" bytes. Create buffer "key" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "10" bytes. Set buffer "input1" to hex value "aabbccddeeff001122334455667788 9912233445566778". Set buffer "input2" to hex value "aabbccddeeff001122334455667788 99". Set buffer "input3" to hex value "12233445566778". Set buffer "key" to hex value "aabbccddeeff00112233445566778899a bbacddceffe011023324554677689980123456789abcdef0f1e2d3c4b5a69781 032547698badcfef0e1d2c3b4a59687f00ff00ff00ff00ff00ff00ff00ff00ff fffffffffffffff0000000000000000aabbccddeeff00112233445566778899a bbacddceffe011023324554677689980123456789abcdef0f1e2d3c4b5a69781 032547698badcfef0e1d2c3b4a59687f00ff00ff00ff00ff00ff00ff00ff00ff fffffffffffffff0000000000000000aabbccddeeff00112233445566778899a bbacddceffe011023324554677689980123456789abcdef0f1e2d3c4b5a69781 032547698badcfef0e1d2c3b4a59687". Set buffer "keyLen" to hex value "00". Create algorithm object "encryptionAlg". Call B_CreateAlgorithmObject passing "encryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionAlg". Call B_CreateAlgorithmObject passing "decryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptionAlg" and "AI_RC4" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptionAlg" and "AI_RC4" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2040 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Start the loop Begin a loop of decimal value "256" iterations. Increment buffer "keyLen" by decimal value "1". Create key object "keyObj". Call B_CreateKeyObject passing "keyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "key" to contents of buffer "keyLen". Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "key". Call B_SetKeyInfo passing "keyObj" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptFinal passing "encryptionAlg" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Finalize buffer "output1". Call Call B_EncryptInit passing "encryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and address of first initialized byte in buffer "input1" and length of initialized bytes in buffer "input1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2041 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Call B_EncryptFinal passing "encryptionAlg" and address of next free byte in buffer "output1" and address of "_OutputLen" and length of free bytes in buffer "output1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output1" by "_OutputLen". Finalize buffer "output1". Call Call B_EncryptInit passing "encryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input2" and length of initialized bytes in buffer "input2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and address of first initialized byte in buffer "input3" and length of initialized bytes in buffer "input3" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Call B_EncryptFinal passing "encryptionAlg" and address of next free byte in buffer "output2" and address of "_OutputLen" and length of free bytes in buffer "output2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output2" by "_OutputLen". Finalize buffer "output2". Check equality of buffer "output2" with contents of buffer "output1". Call Call B_DecryptInit passing "decryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2042 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result1" and address of "_OutputLen" and length of free bytes in buffer "result1" and address of first initialized byte in buffer "output1" and length of initialized bytes in buffer "output1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result1" by "_OutputLen". Call B_DecryptFinal passing "decryptionAlg" and address of next free byte in buffer "result1" and address of "_OutputLen" and length of free bytes in buffer "result1" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result1" by "_OutputLen". Finalize buffer "result1". Call Call B_DecryptInit passing "decryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result2" and address of "_OutputLen" and length of free bytes in buffer "result2" and address of first initialized byte in buffer "output2" and length of initialized bytes in buffer "output2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result2" by "_OutputLen". Call B_DecryptFinal passing "decryptionAlg" and address of next free byte in buffer "result2" and address of "_OutputLen" and length of free bytes in buffer "result2" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result2" by "_OutputLen". Finalize buffer "result2". Check equality of buffer "result1" with contents of buffer "input1". Check equality of buffer "result2" with contents of buffer "input1". Baldwin Informational, Expires 12/25/1999 2043 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyKeyObject passing "keyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. This is the end of test case "TFRC400". This is the start of test case "TFRC401". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Length-based test for RC4 Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC4_ENCRYPT", "AM_RC4_DECRYPT", "NULL_PTR". Create buffer "input" of decimal value "100" bytes. Create buffer "output" of decimal value "100" bytes. Create buffer "result" of decimal value "100" bytes. Create buffer "key" of decimal value "32" bytes. Create algorithm object "encryptionAlg". Call B_CreateAlgorithmObject passing "encryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionAlg". Call B_CreateAlgorithmObject passing "decryptionAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptionAlg" and "AI_RC4" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC4" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptionAlg" and "AI_RC4" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 2044 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "keyObj". Call B_CreateKeyObject passing "keyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "key" to hex value "01020304050607080910111213141516" . Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "16". Call B_SetKeyInfo passing "keyObj" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: 1 byte Set buffer "input" to hex value "00". Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Baldwin Informational, Expires 12/25/1999 2045 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "output" with hex value "97". Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Call B_DecryptFinal passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Finalize buffer "result". Check equality of buffer "result" with hex value "00". Note: 7 bytes Call Call B_EncryptInit passing "encryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "01020304050607". Set length of buffer "output" to decimal value "0". Set length of buffer "result" to decimal value "0". Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Check equality of buffer "output" with hex value "962e46564698c2". Baldwin Informational, Expires 12/25/1999 2046 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Display buffer "result". Check equality of buffer "result" with hex value "01020304050607". Note: 8 bytes Set buffer "input" to hex value "0809101112131415". Set length of buffer "output" to decimal value "0". Set length of buffer "result" to decimal value "0". Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "bb1006b7a26dc893". Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Call B_DecryptFinal passing "decryptionAlg" and address of next Baldwin Informational, Expires 12/25/1999 2047 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Finalize buffer "result". Display buffer "result". Check equality of buffer "result" with hex value "0809101112131415". Note: 9 bytes Call Call B_EncryptInit passing "encryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "161718192021222324". Set length of buffer "output" to decimal value "0". Set length of buffer "result" to decimal value "0". Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Check equality of buffer "output" with hex value "813b5d4b63bfe7903d". Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Check equality of buffer "result" with hex value Baldwin Informational, Expires 12/25/1999 2048 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "161718192021222324". Note: 15 bytes Set buffer "input" to hex value "252627282930313233343536373839" . Set length of buffer "output" to decimal value "0". Set length of buffer "result" to decimal value "0". Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Check equality of buffer "output" with hex value "33809756f5b6638c0abc5da074e1db". Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Check equality of buffer "result" with hex value "252627282930313233343536373839". Note: 16 bytes Set buffer "input" to hex value "4041424344454647484950515253545 5". Set length of buffer "output" to decimal value "0". Set length of buffer "result" to decimal value "0". Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptionAlg" and address of next Baldwin Informational, Expires 12/25/1999 2049 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "d5c97c00d4c76a73171bfd92d4237ca8". Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Call B_DecryptFinal passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Finalize buffer "result". Check equality of buffer "result" with hex value "40414243444546474849505152535455". Note: 17 bytes Call Call B_EncryptInit passing "encryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionAlg" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "5657585960616263646566676869707 172". Set length of buffer "output" to decimal value "0". Set length of buffer "result" to decimal value "0". Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 2050 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Check equality of buffer "output" with hex value "c17b1d0b23ffa7d07d73c0d716b5f623cc". Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Check equality of buffer "result" with hex value "5657585960616263646566676869707172". Note: 23 bytes Set buffer "input" to hex value "7374757677787980818283848586878 889909192939495". Set length of buffer "output" to decimal value "0". Set length of buffer "result" to decimal value "0". Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Check equality of buffer "output" with hex value "4afc1de034a19b1509bcc01407aab3d7db3d5214e3bc68". Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2051 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "result" by "_OutputLen". Check equality of buffer "result" with hex value "7374757677787980818283848586878889909192939495". Note: 24 bytes Set buffer "input" to hex value "7273747576777879808182838485868 78889909192939495". Set length of buffer "output" to decimal value "0". Set length of buffer "result" to decimal value "0". Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Check equality of buffer "output" with hex value "aca898e0c46bd2ba768a48fe2d82683627b958d4147aedbc". Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Check equality of buffer "result" with hex value "727374757677787980818283848586878889909192939495". Note: 25 bytes Set buffer "input" to hex value "7273747576777879808182838485868 7888990919293949596". Set length of buffer "output" to decimal value "0". Set length of buffer "result" to decimal value "0". Call B_EncryptUpdate passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2052 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptionAlg" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with hex value "720c2466888e65f3e0f319db2c52f476f335528accc58f24da". Call B_DecryptUpdate passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Call B_DecryptFinal passing "decryptionAlg" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Finalize buffer "result". Check equality of buffer "result" with hex value "72737475767778798081828384858687888990919293949596". This is the end of test case "TFRC401". This is the start of test case "TFSHA00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Content-based test for sha1 Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_SHA", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 2053 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1 Set buffer "input" to hex value "4778ec68d5391ec842b6d8b3a61fe02 20a18489854d74fdcdab267cf8a0c0c6efa71fef6f118c1a5b2e2d4ce9b76568 5058e5e6f5a1c3d3a42bb091f6bcc5c69". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d820db5881539cf5e85552b9b37a1dfefe2bc959". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2054 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2 Set buffer "input" to hex value "f1eccf5e41991fbfb1903324fd32211 9e250c29bcd2e60aa4670b723cccfacfbecd259efba8ed95764a1db939235e76 4b455c258b50d21cb4ae777929cb6d8f4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "747bf146c12c8cc1adc2b0800fefc6ae1d76f2b3". Note: Case 3 Set buffer "input" to hex value "0f64a730e0e4ccfbb9960fdb1200e8e 3cb75ead5a0df047918dfd13f30caeb65fb79e2a7f4bce63462a2d13e1af723a Baldwin Informational, Expires 12/25/1999 2055 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 d819b50fff33de6e8a207972cb57e8909". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d7e29c087ef3de0d396c27ed6a1f4f8250213833". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 4 Baldwin Informational, Expires 12/25/1999 2056 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "9c8f9237cde80516a42da869f3e23b9 ee1a0c8a6848be481ee23a4c2ce3e07d4227ea8d719aaa2922eeb8e84f683279 5261adc1d3380bcf476607c2909c71ffe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0ebc1e19d5eeb406af867c12f32583e457926a0c". Note: Case 5 Set buffer "input" to hex value "6a52db130fc87d7d7550457eef56cc1 a6e8d6422774e665404c8a02c967111b89516984819b594e1555afcdbb68eb73 84f44eec098a138cbcca6a0f703d57ef3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d4245f20b929bc6e901cdb2d74a6823f6447abb5". Note: Case 6 Set buffer "input" to hex value "ffe42622563d86f8a4b6960006e3044 aa085de7e22c9301d939050362848ac2fcfdff29dd032db43b1cd452ff34ef11 2c0921d503bb5587bce215bc0023dee37". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2057 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "acc4d2fb8f15abc4fa2779a27e724c64fb8c0765". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_SHA1" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 7 Set buffer "input" to hex value "8ce0a4ac1567dbcc4fd9f8261119bef 0033fa49f53427b85e7660e25504375521007a83982fc938f334da72eeac17eb 6cde0aba0a9de70e7dd14572367941090". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 2058 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e8ced961f5f6e611207c6231433535eae665dc7a". Note: Case 8 Set buffer "input" to hex value "b7b6c149372852c18a895b412d6fea4 8b30488484ad33f6008699d1c12ca50c993a152f63d95fec6dc9999ebce6ce1b 09662da3fae351d2279355376eb7bbc70". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a370e1f83106bb5d0546b6cbd2b4110325b6be20". Note: Case 9 Set buffer "input" to hex value "0459ff5ad334dbb4c2f7e13e8eba485 17b602246223d1d32b1cea86ad7534a55e60894060e8eda3c83c30cdfe4a6ce3 ec7f7715ff81d791b267965229925eb91". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2059 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f8c5f9472a566c5729351d24180b2c49ada4c48f". Note: Case 10 Set buffer "input" to hex value "654ac6466ee8154059d9b7d1495ecb2 744ec8c0510ec39fe7fed783d41062aa8e02448e7670ab4d0e568d547832f994 d1c32a10e36eb2f09c35911ebf0c30dac". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d61ab8a4b7553ae634382e8c6aae445950bacd52". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "20" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_SHA1" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_SHA1" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 2060 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 11 Set buffer "input" to hex value "5e82f7fdf97641a944c46489542fbeb b1295d9e05824452417bf8cf50843c74452e1c80d2d90917f5fe2dd854e4f63f f99dadfc5b3e9d63552608373811a624e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "700b8b3b7461e1c56e18a505327f2ab9728e9d01". Note: Case 12 Set buffer "input" to hex value "0be9831b351a352654757ca9318ff1b a9de10452f9a6b7e29d44b61e9b8632fcd0de6be125cd309eb28b953ad983c18 b4e8fbb36bb059b8f612d4a13a1a0e1f2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "08ac2d573e266dce5e3109ed9ff446060be812e8". Baldwin Informational, Expires 12/25/1999 2061 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 13 Set buffer "input" to hex value "cea551ae1c1d1dc52c2dfb9ed336265 1b34ef7b49ad40aba001feda3134dde403ae9a3f6f2f785c9f4701bf1eaa2cc9 aff6cef38fdbdb70b45e1c415eff02643". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "075eb8e9ddba48222384cf8cc95160e7c8f93568". Note: Case 14 Set buffer "input" to hex value "0600ccc6371790794741973a9d0b97c 6b197316073115058aee2b6b57c3ba0859be1d96c95f69ee347b2f5eb1469ab9 84193e42569cdd7cf5423551f84566fd3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2d1a1982d71b64ed010481f36bb45ed5920232bb". Note: Case 15 Set buffer "input" to hex value "c5b900bf1b18693742c3a4f58e38397 77bd3bf6c5addbcfafee277de52c689bd1f802112f9df4b5f7adc03e7a70947e 2dbacd616a3b1d9c2538ac4e1daac1f25". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2062 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "548e05b221c6523660a0708ce3d9b8fa1429362f". Note: Case 16 Set buffer "input" to hex value "4707af58671d58b6f6f21074ad38513 04c9ef1473501649f9a04db141a19459c90cac3233da8aaaed47ca5886defe60 a2aa7e467193a945d9b6985768b53383c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5bf2b3ff6638049d7f75e0feb3cfac63445ea670". Note: Case 17 Set buffer "input" to hex value "f87f1b89eec701bc7a86257e3e1dbec 4179644336ce6441c6250645febd94392202e84cc6a8ca8f00acc7fc531c6d17 036aeac1acb2bff57aa715d0135e9d4bf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 2063 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "digest". Check equality of buffer "digest" with hex value "02f880c4f1b5f762120d3d857624519f56e817de". Note: Case 18 Set buffer "input" to hex value "e8fdddffc3c621db8d3186dbe7f51ff 0caec1e73d4d5b2a74a29d1ba1aa83004f5f5e1fe851f6ca284c6924bd5988b1 c4ad7703ede3f252dbd04dd067ac72c71". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2eb199a610fce0a81f1976bf78e41ba93bc10c69". Note: Case 19 Set buffer "input" to hex value "ea97bb3f392fa668dcda3544dc90fb3 ba2883c1e8918c0e6f6a4ae4958f77ae21871d39b31ae51dcf0c9f48787bebe6 00845638ad5760728caa545ea7fd27ce4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b8776aa26feb3b88da799bca642b787e3acd54e1". Note: Case 20 Set buffer "input" to hex value "cc24d8272d0758077f5853317dd3c85 92487a8cb25e968f26169ee0b30410064800dcee6c0b42936d33e55a8aa62f4b 0ce19410543515955bf41107a0ffa8739". Baldwin Informational, Expires 12/25/1999 2064 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "df59ba3c153d53ffe03704abf1f91be897945235". Note: Case 21 Set buffer "input" to hex value "c9a846a03a920335e63a0c400252470 2aae356a469ef44245be5e88ae835772967492b8ddfd6675ebde2a6c90d77bc3 c1067d7273b6c972a78d29f0956e8d062". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f8063c4a12b377acc5fbf71fb41273f88a13614c". Note: Case 22 Set buffer "input" to hex value "932166d334a7c5e645095acbe2620a0 328195f6b9889027a477ad80980314726eb717a28bc98ed8ae18ab5df9f73de2 08614411dca234179bac6703f1563bbd8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2065 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "cff83f265c520ab113583c983abd214e8cb1188f". Note: Case 23 Set buffer "input" to hex value "b6a993c187ba64a776139ae72462594 aa8fa5ddaae487f3b914bfd7d254fc3e098f97eda62617748751042ef17e9285 48eb24db4c586176947c2029685148629". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9abd5b4bcffcb284ea654004342a60a56a78be22". Note: Case 24 Set buffer "input" to hex value "087b7496d00935ac5ab8160e9efd2ab 3f4c92bf409a79d6961c261195072200fed93432bf6f0d9b3f06044c56c5b5fb a167d9abcbe4d78d6e4a1bc113552d8df". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5e7f49063bd9c97644e99b8a44ea780d23fda417". Note: Case 24 Baldwin Informational, Expires 12/25/1999 2066 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "66fd6dc1e670ccbaf6bfb6e47e2f58d e53810ace1cedaee27a8e22773297f352605088ce5f1f965555e5be458bab04d 9042093c9d0ce4bf71e6b10c3fbc8b587". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c27d806e251b2d2d58724bfa5968b82116088303". Note: Case 25 Set buffer "input" to hex value "5bd22e093ee43652623c22d02cc6fb0 343b1bec0b81d7c0f9a49dc29a59f3460d29df86f3309f46f26e561d369b1115 abaf8f81f77679f3e2113523aa725ebf4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3995b00b5d0bb9b76634b7d9a360aef7c67bdc33". Note: Case 26 Set buffer "input" to hex value "4f7712effe29344615adaef2fccb4f0 86c6b3552acb1a89fe102f0ae7b44103b9388dce6fb569319ece74742d10bf17 0f6e57bd5d9fa04ac2f0a5fd48c319f95". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2067 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0b484105be047dc8aa677c04e3c4b49e6b40cf65". Note: Case 27 Set buffer "input" to hex value "e997d75dbd04deb4b7c342b68a1ae14 6fbfd3b7a8ed25ae31497da80eada2f8666f32c5488f8dc8fbebae2bd2ceee59 d1e2423488a36052ad1209ff0608dbb88". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "711913a36defed9ade3281e60b4d6e303f1ec6db". Note: Case 28 Set buffer "input" to hex value "1d13029b610ae79f79254921f44fd0b c8a2f79c6f495828048c56aabdb5f5b0a71c38ec0f26b1c21888070f3e18c667 9fb736d4775b13e83fe1ce84182c9005a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Baldwin Informational, Expires 12/25/1999 2068 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "digest" with hex value "7ebf3ff820c0184c83bbd113b7513364f2bdf502". Note: Case 29 Set buffer "input" to hex value "198fc01736a9ccc9642fa4b6b9394e3 c19ac23daad8633030144f4aadc3a0bef6bf4abb8ea44a01c73fa3a672a009e2 32f5f027866a27da0d222c26990420624". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b3788457568e4ba27e244426104ad0e6f8bd1400". Note: Case 30 Set buffer "input" to hex value "4e4bc5a2526127df483c5694911409f 4a55c04651e5536c707385ce7ae9c9265362c11567161188d728507f761277fa 3d72a056f46ac83838d008120fe8b52ee". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "405b01daa2fe3bf6692465544dd2d57dbb54fe8b". Note: Case 31 Set buffer "input" to hex value "51f6ebd864e75dd8087c8f70bbdbef7 e5903659ab6dbe37d7ad7a17254d3b0d8565662eea07af78c02bbceec2a35228 53dc66eb958001a943e71149d391bd3c9". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 2069 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "281b0f46c6c5442ade637ce640bcee96ab72a9ae". Note: Case 32 Set buffer "input" to hex value "f09d1756974c36c3203f4f09b475d27 a2b714606488fd8513183810edf3a735c1bd0bf2556bf5e1abc46d071ab26d98 03de35a621197f72111ff9f7867200049". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2737bd72cb7b2348552ab9f2cb1be9cfd0a47c92". Note: Case 33 Set buffer "input" to hex value "87e66592805a60bf542e27819c07087 067433962436257c4e29cf42060a8e7246057c5bc17382fbc918a457cd527ad7 ce8b52f59bb3be1e939b03452cf7a93b3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2070 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c6cb2fe38984b4f817469fe87d54eccfd1a10975". Note: Case 34 Set buffer "input" to hex value "972692952472c91b4fde13f85660076 46a88ae3081351c24a74ea6030af1c4b8c318eeb510e58fbd35cd27bd178eef8 09a9096c8a3f4a3a4d5ed45f1343cebbe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a8dd318766657816325a95cdbb0eacd7170f3da0". Note: Case 35 Set buffer "input" to hex value "43512453a7912d275089b58daf7ef17 37b1c5520dd74e4000b5bd5f87479720510a66191df64e6bf38f82cb96b537e3 65acc082f81a10464d7f2a04707586f41". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a347dad75cdb47af6b8a89c0d256912e802dbf4f". Note: Case 36 Baldwin Informational, Expires 12/25/1999 2071 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "44d47c9e5d235157156b9eae6ce1a81 663044c2419ec37614e8c4cfda3e426a2bfb15b27ec692c611285bc6ff4f6337 bddb258d1274a393c6fba82263a5bd012". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5337c9c51f6d404ddc87b5657a8ca9c2bbc2f732". Note: Case 37 Set buffer "input" to hex value "5d4c80792a1490d393e299c07f04016 7b6729a8ba67fb188df8ca4ba7b0be529838707aac1ecf15f45f4a43f4595b3b b8c93f311d63990e36457c3992cbef01a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d767b64b239c5771651d6e8c6cf3a58f1a0adc34". Note: Case 38 Set buffer "input" to hex value "1ee894df9e9746c44f12ca13b226aaa b2373cc197badcb0876f175f9935c74b06a3385659b85228c1e54b689ee00fcc e059a7eb08d556ede505251187eea2c77". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2072 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a272c3254c45e7252908b5860a250bfdac26546a". Note: Case 39 Set buffer "input" to hex value "141d6deab6730c237f1e3f8d4ce6aad 719c0469d459c1670354bf0141410ec89c4c3a4d672feb4100ab0e60979b34ef 90f64d99e328b668112942b5dac2d2110". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6fa8d731461ef2937e5aae14d19944c94fe065a9". Note: Case 40 Set buffer "input" to hex value "e4a5f61cdbc06a36c124cb530e9ae2d 21cac7ed4fa61a8976cdd100f3737d7b437a807eb7288094be23654934811aac 712a6bc99140cf9b65ec664e7219bb622". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 2073 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "e612a7c1ba6361636c4c5f16cdfce0c69024531f". Note: Case 41 Set buffer "input" to hex value "c4be1013e79ae33fd590358e42bb1ca 376983fcee716ea40978dc12633014fdeb1d995017f6fa693063ab45c1eb5da9 2270af6a14738086b446c22831eda6ede". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "76edce7dbe42288e7517905024034b1885762a62". Note: Case 42 Set buffer "input" to hex value "e2c742093f46c40feac82da8f45659e b99049ab5f5a96cfeadf711d2cebb09aa19a26f0eae4be7b301b23b4596db0a4 c8caf5236ab51bee4fe705a9f8da1e671". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "315be67696dd3f5ee697e65fc8ca3789ca33689b". Note: Case 43 Set buffer "input" to hex value "b23b07a95d76944413b7f96dc30229d e32276c8600ce0b0b5a8a76878150ab44402b97c9c62437d3bbe26a828a8f823 d9522a7c46480e10624f024ce11037d46". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 2074 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f90743987e3738436bba335e552a34f9cfb3f37d". Note: Case 44 Set buffer "input" to hex value "cb3252bf102c0109b49b1a4d135b942 ee3f82f49cb068605fc810b4d99eea232b2ae35bc49fe8fa02776dc2ee99a320 5b9c2170a281c06c195cec81900dcbdbb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6868c8508ee55e276946532deae980006307c667". Note: Case 45 Set buffer "input" to hex value "40827222755a96e286c2d06612009a3 e521335502793ce5932ecee436400d5c7a9d7dc5acc394c72a51e04f0b5dcc58 5b7c305cc29b75b07826106a940a392dd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2075 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0ff9f731186560dde0c7db2395b0f753b0dd6faf". Note: Case 46 Set buffer "input" to hex value "a99c1b6f0627c4517a1ef59385d8694 69e3168b3a2f2a5430feb2c97538f7c9d7e553aa18c9908260d28468c6907e89 48fecf1dbefc95976c93c1d3fc66727cf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ed71578ba0c2d05e30c6a168d6571b2ddcb75561". Note: Case 47 Set buffer "input" to hex value "2a9fe3bc7cfeaa445492c108a567e0e bcc3d9f699845a6483870c0034bc955e5cae660d778284a273b684e7b52f594f a36341522929454e1fd36a3d1a18fa91c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f337f544e657db1e9ca8f6c669bcee070f3a8078". Note: Case 48 Set buffer "input" to hex value "81ecfda8f1204e3f7e523285428fe44 Baldwin Informational, Expires 12/25/1999 2076 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 5312196e4295c3a7f8107e824f9473add8836e20c4dfa2910f10abee70bf21bd a488658b6141c2fd610ad9587f9d8ca39". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9371e8b08c07fbc37add8a8cb9ae35f014ec66d8". Note: Case 49 Set buffer "input" to hex value "7d2900542a3a1ba87c49cba21c707cd 0890c9e9564d48ff8069dde8b086df3967e051b68ce085bea1b6181641187638 11217a04ed512cb2be3e2ded228350372". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3e2187fb9057439148f22cfb4249f8bbff39be45". Note: Case 50 Set buffer "input" to hex value "d9ba09ddae4b8bb0ad8bcaf5d32f9c3 d9604fabcacce4926d84fc14c9e48c0240b3a686fb44b14c9568ed933685064c 3826248ee54787e00a64addaf2a3f74a0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free Baldwin Informational, Expires 12/25/1999 2077 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2d472df2ed38fe422fa90c29167a45ebf3a21066". Note: Case 51 Set buffer "input" to hex value "bacc561d8de5577764b50385ed5679e d7f4189603e68434f22dd3459e3a9938ca1305f2921321bc953a82b1c70a32d2 d1bf10733566e5e11397aed3a6c5670af". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b6653ba7a5e48b24030aa05bf977ba46d09e8523". Note: Case 52 Set buffer "input" to hex value "32bd28458a0c41e43aeba1a06f21d55 bea5fdca06ae0bd540bb818af6deecbb119057cd0e744d68b4d82ff61b0095d3 53deec27de25889b8434ead4c1c59675b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1532f3c03d999659b59cd7312a24793637b2e943". Baldwin Informational, Expires 12/25/1999 2078 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 53 Set buffer "input" to hex value "b68877d25ce6de3c5f049b34053671d 3de610ea51d4434afd2c01304b78a1bc812392685a2d6d8514a2eaca49310459 8ea15054c2a9d5f6e2d64a20248e8d772". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8507eb9f4fbb688dbd7d27a41836dfe1a8df483c". Note: Case 54 Set buffer "input" to hex value "7153a98234fb040cf3db8dc59ccfd00 3f40cbdf6761ac0decdb1d6ed2c9c39b60b3b304839765c902bff78f05aea7be 2215e6d7efa48252c0a012c4ff3ff8fbb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "557a97c4d89aee22fa5ba1fa3ffa440c50d4c176". Note: Case 55 Set buffer "input" to hex value "955aca4fe34e2e534884bd8e914dca5 9a31bc64adf576c9b5478b445a5d4d364aefce6d6b2bf79cddf1013dab3739fd 84b5e3c2ec498c4eaa60fb54962009ea1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2079 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "dc27c3aafeede804ff83c33f869c6bcaa15dd47f". Note: Case 56 Set buffer "input" to hex value "b8199e80a67cdefe5e2d82ee88bb352 c49495cbef35708312c96398349d0cf5a5b2d4b0d080849e490f009ef57318ae bb539b97dd6991c6785471f281b64d66b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6bbc75a280c6864cbce8b26e7906672257f0297a". Note: Case 57 Set buffer "input" to hex value "e3672205459f33bdcabeaeebe377669 21c2d117c2a8bfac7e85840efff0f56ea2f4d1f5c2c14cacae22d5b0dfa63550 59c8f830d58d3e204c8807db5e37bf184". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2080 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "949aa301fe30c99ee8a4c445054b205d6b7b0dda". Note: Case 58 Set buffer "input" to hex value "ef74619a5ead883c2daf824cd076673 d874099bc4e426ac7db96d05eb9e9f6cd32a6cec13dca5b943191f9fdd374934 79e10074821a1556ae2bbf7c1f74faab8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ebc5b4ba0d2f15ed35caf8797a73fdccac5f2c4b". Note: Case 59 Set buffer "input" to hex value "74e6c62fd00c0a129bff6e36c102fe1 da6a03adc130a953ae045bd93c8854aeddfa63d1211efacf0349c26b1e374f41 4889a8ce70ae4939324f48ba6922de0c1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "aeb09884b4e95f486f40e1599530f477439b41a8". Note: Case 60 Set buffer "input" to hex value "b143b3993876d8c640deed9f13f8916 6da579591581d9483a560a5289ce9817ed9de129f816c51951daee1075430dac Baldwin Informational, Expires 12/25/1999 2081 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bff981143b1676856df594d6a14feb207". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "444d4166cf2707dd2a5d171892ee4f7fc67df0c0". Note: Case 61 Set buffer "input" to hex value "74c7f70742c29f97a0bb1a97f24149b abc739cd39b88cb9822b613ad5110a2d71c56b75bab0bf1e5455c9b03b4ea10b 8f477309964a5f48e8ae07afb5e80b028". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "70ff1eb83520c5b87ee003cd1cc31a8d1f5c46a6". Note: Case 62 Set buffer "input" to hex value "82480f8d0422ee4ee6cdcc7405ef392 7394a40fbf7a085fbe39918821d1d50f8011b5b1a1f56ac0f8e9160feac36083 5342e429432f834243fa329343787b485". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 2082 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f1849fdf6f9d8945689e27b714f9832b9f0b3e11". Note: Case 63 Set buffer "input" to hex value "23303c647bdfeb94edc614b424fc42d 201ac2b6dcf59fca9b679763a1885f55e69b00c01cea033ac15c2b6a8b1881cc b6c533e5f45a674b2c66d0f9f357c0b8a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "5682268494f042043fd9de43c0cf031f8e5ac857". Note: Case 64 Set buffer "input" to hex value "0a3c898d9b5bd775991eaa47c43fa65 8593c24d3f83d8c6d62df499c3a4065f9c5198b2182777ecf2cec627d5fea377 a59a5d132d6756d7555927a5577663748". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8504a7d45a5ddd43ebf31e36d8b67bb022f0a8c0". Baldwin Informational, Expires 12/25/1999 2083 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 65 Set buffer "input" to hex value "84e29f704f19d06fb01e55f015df07d 714de5027d1b16b9be65e47192f95e43c829a835b4c0072ee3a4fde7854aa937 01cfcb07d81d1da05ef28ab5a3be884ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "2e526163bb06d02f5aecab907f9d02a459af2bbb". Note: Case 66 Set buffer "input" to hex value "be705b06fdafdd1d155c5e37b059f7b d345aa7ae8a4d19ed2f0ca4171f26899fc24929843868da3654da28a08ee69dd fb020771d6183bf9ef462e8ab65374fcd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "44ef1ad85e7bd32bdf4510f4901fd55aca1b1c57". Note: Case 67 Set buffer "input" to hex value "8f695dbfebc808e11650d66aa15d489 21dd8b7977215f30a4d5c4f3d9d6ac79ad1ba884835f84d61cf833dad5abbb6e 3ee64f6113dab0cf6e729078303520b2b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2084 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f69d5dbabcb519c7e016ec05d68fc89cded36ffd". Note: Case 68 Set buffer "input" to hex value "969a145660bf6f04daf359b3427ceea adb9587492e0cf72fd905ce709ecfe90ed92e510fc7c5552017835a58d3c0dfe 712ef60331c3100920f138414e4cc84d1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c6dc2b95513174f740c1b5ad951696683fcacee4". Note: Case 69 Set buffer "input" to hex value "c410252d018299d0673076170a80cd8 c9d8f38ba1777b9baff0b8e47f65fab576e1b6e8be0179da0b4661432efc6070 7ec83c000739957972ab48a4989f064b2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 2085 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "digest". Check equality of buffer "digest" with hex value "f67cd4ca8e6d03caaf502023fea17b1712654972". Note: Case 70 Set buffer "input" to hex value "424947698ffe60dcfd54cf08417b164 5065fc4898dbf16a9cb177cc8badf28861a3da66bf3375c5ca46116411f98536 70ab925cb5b3a551e1b418feee3183c7b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ce5944851df76f929e60ae01c3201bd64e071a98". Note: Case 71 Set buffer "input" to hex value "436035e4990469404c7b3443a9713da 3367ac77e8688e8fedd6c2f865bd56535a4767d41eca632c8842a700d1d04b0a 0a6decdac69e9abfe2ac538b68f580f9c". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "4ea960fb8c85205241cc9f0a5bf9a320e7302dfe". Note: Case 72 Set buffer "input" to hex value "679b0d4c300bfcde4cae1dff8e47ed0 900c08d7aaabad58c6a8a8c99bc8b71b7d7862dd46f48411038018f10439bbb4 1fca383c9be187c8976afed9e59bed042". Baldwin Informational, Expires 12/25/1999 2086 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ca083511709b3a0d08d412689252d1c37f8f46d7". Note: Case 73 Set buffer "input" to hex value "c3002ed55d2ebe3868d236c4e7a18b6 dd4829730b0a09d1b6e52cc32583f43004a5e1dc8b52296e966b1db79b6c3503 c088144eb5c2c574e8680bf1a702ef893". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "30106e8b6f8da9721e29b5980f2e9338cd3f25a3". Note: Case 74 Set buffer "input" to hex value "673ba4ed59d01c611b5d339b3775f23 b67cd0f04aeb531029a27bd28912abb8efca578b8d2b5fcbabe56b1fe9070e0b d866e123a25d8557947d8dcb3ce71d5d0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2087 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "88e142591336ce2ce972628e2ff14faf978f286b". Note: Case 75 Set buffer "input" to hex value "2944e16195f38e3a2226f5a3807beed a4fcc2fbc532558349df0e1ae302e4e901aea4a8e9ec099de3b383ac94574f3e 3ebf815572fb50bcc83259d09a5343af3". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "85e0e5ac9a2287fdb122d2793850042ccc7ad3a2". Note: Case 76 Set buffer "input" to hex value "80d5cb8b0f3335ae59b696500b011e4 9291e2d66259f3f46b3b1ad268b4c5ad4a8e14ebe6044c562825ecac7028968f 35eb3523d269ff929cf388d7c92ea981b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ee5e8391e132805cf011547eb2816c485b03b335". Note: Case 77 Baldwin Informational, Expires 12/25/1999 2088 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "12125eef064ae13c1bb0863bdc09de0 fa2ab5ff032c60331d1ccccbe4ec9fe59363bb792d73aca0ec7944feec26ea19 b3b89bb95582e5e1c5c9ac224f4c5f0c1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "02156bc26778b5703395ff2700927cb136d31c44". Note: Case 78 Set buffer "input" to hex value "04d7bfd047550e476957c6c4272ded8 b7e2081b4c9cd9545a5ea0786257d87e2333b5fd401780eb428b5c4f494c14ec 40e8dd32cce5cbbea3e40a060e2e94c07". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "fe06e76663b68bdb8eaa7437f50586d907e67625". Note: Case 79 Set buffer "input" to hex value "56e3e6ca6d4e5182c0cb5c0b99ac401 cc51c19a345ed920cde09e3228da661517fd8a78acec40c3018bd0b6169330b0 3c4c0fdfef20ffd1878b2262385edcba1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2089 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "036396b73ba06cce525bef57101e561dd2dcf4eb". Note: Case 80 Set buffer "input" to hex value "e63596e76d2a5e8743e41a71bd8cf0a 6ef1702249581d3a44a7d9878acefc621d01e90c655912cb924289f26162ca8b 325788b58dd16b5b497e093fbd8b01721". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d6cbfb9829439115fb2488315b0de8482df0d2ef". Note: Case 81 Set buffer "input" to hex value "f67b424092b53bd3972d07c3aedb10a 059149894e986e3af87a4528e70db116082d2136e3b6e9c04d3915ff54ac97b4 acf45fa59115a7ca269099afedad1f073". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Baldwin Informational, Expires 12/25/1999 2090 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "digest" with hex value "dda0f408d41e653c3e5bed0237b8af2638bb943f". Note: Case 82 Set buffer "input" to hex value "f946a587332c6783841031f869fd621 e3a47ca78a425f87ecc653ed6a5e3eb71863b055e9d1ca39e78235317725982d bcfdf06a31dcd24c845229527820b9e17". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "38c6fd811b49fc96ea79812f37c1f4dfc4f4e9b9". Note: Case 83 Set buffer "input" to hex value "2c780b634a6bea1c6241c5ff71e3cd6 2e17e6d7fd3c69f7d4e512368d8612bb8059c2d6455dfe25042de975107d03bc 88f089988c48a2b96e67b3d05b3973873". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3b881d6fc9e1b2bfc7075a01c0328d6b2edbef11". Note: Case 84 Set buffer "input" to hex value "46c7bc4ec7e27862d60040128efba8d 7f611e427dde4c8391f6aa67b7abd6893be856eb9debac38690db018302158ab 2fab8aa10b2d7a41fbd210c80c7bcddd2". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 2091 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a9fbbbc3e9333e5e22612d812a8a35d5c603925f". Note: Case 85 Set buffer "input" to hex value "9b1be4346df155d1c8446aa245597c9 61c52a89dc7e20abc747081b0ebc62f2735eb6b25c54885921bd0dafe292993d 55650b2866f17edb76080253f2d3311b5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ec9f9fb19d87f40fc68784b6f4963f28ab0600e3". Note: Case 86 Set buffer "input" to hex value "293d76ba9ae6f68cdd8b342ba66983b f8cda268592c230b09471bb541770e67a0fbcebdbca00bec6e4f916a3a9dde7d b4bb56ee26d3f92a08356c74953dd3bb5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2092 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b16a89303d0e2085fe27353a86667c999bb488ac". Note: Case 87 Set buffer "input" to hex value "56a3408e80db84e53cea63a7b47fcf9 c58c56d1bd34b07b76f629ca2864d2c0d4e1993ccaab21d1bb52773cce90ef52 ebc2dcd8670e1daaa2abc6a43484aaedc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a5167497789d2a7ba8f5c285392fe17a0da64330". Note: Case 88 Set buffer "input" to hex value "b063da46b50720cf13c0e230d5fffd1 16d1b1a9262447a553c0efcf07b369b7b74a306fe728cea9a9088c3ebf244fe8 e584bd14deea967563875c10bf2b68e2b". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9ec05b12efa4467150ac8e3b2ed25f61476b1595". Note: Case 89 Baldwin Informational, Expires 12/25/1999 2093 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "d03b192739bc99a123d1582a709a747 c4348508c8cddf43f486dca0d9fc220ea227277c0314b43598f2f792b156726e 93a35b12eacb4de49463f3928cde65d35". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a027c5e95fa1f1f138c5a414458790be82823a35". Note: Case 90 Set buffer "input" to hex value "75298e5cc59af8ad6a883796113f68f a96c34b87e6895a9671ce964885a87db0ded3c976ce268b3b9d47b1dd140d38f a72f7487d58a23a767720df728e2227a4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "22543cce1b1a48bef487ca183216fe8495c8fff3". Note: Case 91 Set buffer "input" to hex value "29d656955d7cc8b992aa5e2a4d07923 54de07d318057d2224e2ae45b4e3df9687c9f0c8af02c67070a48b1da53a00bd 3db4d419022622fdbc000f96de87a11a5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2094 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d633c246d61df3e8911d04a9640cfb10cde236e4". Note: Case 92 Set buffer "input" to hex value "a5527c8578551f293638ecd67d2bf50 b787a5d846a9a8665a8be907878ac4e8a9436b8b20f19a108211eafada7aed40 39a2e72a0e4b86b3d1d24ac989951b7ab". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "8caf750700736350e1ea7e9ae3ffae2e666214cf". Note: Case 93 Set buffer "input" to hex value "8d99c4fb33d171d6b1713e794d698ae d327303d1810929096945cce0840a40fc5150961432764d65cb53f8cc5078ace 2f7c8b31b9dfc7a6dfd380a3d0058c44e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 2095 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "1437923e1e59002e734e97a1ca32b3f1afa89fb2". Note: Case 94 Set buffer "input" to hex value "f9ffd620309711cdbba1d88f5e85183 1545f5f032512684f3d311bd7e39f90b35fa638f879c608a9265464d95765c8a b7d5f2afe9d2064e3f8c7f46a493c512f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "27130e47c922da62df793f74b528c7f9fd759688". Note: Case 95 Set buffer "input" to hex value "502d576540caf10a55f12398c265d53 f1c48b465a1811d9e0018ca9ffb160b5fdbcb1e7ea3328c5694190d50e420149 cc3dd75aace57216eee2e53183b41420f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "69b5948264b05f03086a01e79cbfe1e7bcf707c8". Note: Case 96 Set buffer "input" to hex value "81d6b071fc77b43d5efc3af029c4de9 7137a27f225969725af7618cc04fa857a10eb76381477b5c8a7d2681fd852045 6d9b3ae2f3972f117ca0daadd126a3fcf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 2096 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "647c8ef6af324ce411f061484851b71f9209b0d6". Note: Case 97 Set buffer "input" to hex value "7ecce551ff50e5179e56c923045811c 4b146b2cc45c932b851665f394c5e4beb690a068b661ec60b3a94f2d9a585f4b f6e152c8130cd32efe2ca68a77c3d1597". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3759614e61240811c7afeedf1c7e2ecf330c81fb". Note: Case 98 Set buffer "input" to hex value "ba62e4d9f590cd4e89e66658f3de540 fd6a411c711e31d60c8fb7d135bf70fc48fcbc03a454b7b87bc191e6984287e2 04c852b61392b3a03a06804a94c41a5a9". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2097 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "45dc3078c1e548cafd56b6a03fa781f4261e1e82". Note: Case 99 Set buffer "input" to hex value "8168572d190eb3a86b4ca25e02782ba 22ceb5c1ede921446f01e8bc49321e4d0319318094d331c13f9933bad0bac4e8 20676a9de2a4af7c5190a92f47b3b21bb". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c05c7d3315b8dc0742795db1c3ee73109004c482". Note: Case 100 Set buffer "input" to hex value "7236e7fadfc4936fb010abf9b7b95fa c6857ba48e7782d571017f52f62c45f79f2594121c28de6be4aa3e190f90ab8b 35846254fe2fac07ba9cf2a71d7872eb1". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "013df5148d8134c0cab89b8c03e8a8a9bc0b49f2". Note: Case 101 Set buffer "input" to hex value "9e159e0d3c845b02dcb9948dbcab5aa Baldwin Informational, Expires 12/25/1999 2098 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 2ceba5e73b0a874a9b2f6da8a1f98521ad17e0b215d28c995cd7f276a716e399 9ca94f4de8e048bf65ae47af3d7ab3235". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "03718e5954e09d9b47290defaf44a84f8abb4140". Note: Case 101 Set buffer "input" to hex value "922fb0ce5527e4b9364f7beecaf4a93 3106ffcabb7414f7efd4415a704b5e55b718e56da00edb2741dd8866eb61eed4 f2a1abfa1760b4a0f69f36bbabb7aa947". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1f5dc8bc8bd5b8e60ea22e53f2a65b32f530bc30". Note: Case 102 Set buffer "input" to hex value "4cfa4dc436617dec656e41cdf5a2717 0da830e47920c6564c896041acf60a10b0040ada2edc1e73221949260aabb86a 15c9e99e7c82ac4a556e751e7f9608808". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free Baldwin Informational, Expires 12/25/1999 2099 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "72dd3fd7b36c637476e5d2bf3559576fe86dba8d". Note: Case 103 Set buffer "input" to hex value "788a31dcbf0a4c83114e6770fe1d88e b685430a0137c6f38c91d6f0f884c80efa7c08beba05e4adac92df48b1264ac3 76d6bbec2c10653ecd138f38316335074". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b976e15fab8271dedcf4176b57b91aa023c92fde". Note: Case 104 Set buffer "input" to hex value "fcb9536eed8d3e05c6b5060870179b4 8cf750663526bef2e6c51378c07724df7b745b03469e68bfc98b66344368ec4b d26b098f01c0608afd2cf1e6752198f7f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d05a0f51ff936ba133a89542c5eacc6eb032aa0e". Baldwin Informational, Expires 12/25/1999 2100 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 105 Set buffer "input" to hex value "e036e41aa5fb46664b102a1462a9c3d ebfad588826a05d70030f3f28cba38f06539d91048342be6f7a2f1cbbe1f62cb 70f44f255998a2a3077ea110eff59a2a7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b53d3b52d6d714f0e267fee9b1505038303758cc". Note: Case 106 Set buffer "input" to hex value "1f68377c2aec436e402a9aed5f899cb 575addbb96d6a7c97ba4d09164b0b46c020d3e8507bf0e987f0cb0ca3d879520 cfbd45449705e093ddf2a63531ac668d8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "17a4e9cbff3e1eeb090e6ab96320541f8e2caa9b". Note: Case 107 Set buffer "input" to hex value "444018bc7308a20dff9129057af5c15 6a8f453c831527003d9594e99b03da69da0d693a2578da14fbbf621d3f90cec8 9f9900c3a084b6d6151705f8bea4ec557". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2101 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "070eb348601313b3c8c113e7314421d5d32aeff5". Note: Case 108 Set buffer "input" to hex value "9cfea0c7e3c7b6a2d2c924065937633 d17a40ed180e333c7c02820dc2c4ddfcc6cf328d08172500c87158e169f8ad80 ecfb403ad9d533df0c0e493676dc82107". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "37a72fa3157a0cec505eba2550a4c26adb4e649f". Note: Case 109 Set buffer "input" to hex value "db90bd046a1d8052b9a3ecbf502f93e 2a47b8e245f340fa9603ed3368173129fd6aa6dad1e243cbab73c0cc08255f0b c3cffdf4363113abd3023a9ee0d05bd00". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2102 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f8aeb74dfeb760b64a80ce14de615fb262720777". Note: Case 110 Set buffer "input" to hex value "ebe625d97fcdcf7dbecb14265c45ac7 951e7672f724b00ade78f25d15ae32076d48933e36f2909a290fb6f2be5b4cc8 690eb00ef3512411c1f2a4c99c31d6340". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3a09762081c39d91127c517bc1605e084b210b42". Note: Case 111 Set buffer "input" to hex value "7d53f4c64bbae5b0ea65665d1dfaa19 c4b6fb7f397cb801eda3f7765dd8d047f7dc2f498ae2e35fdf8152af896462f5 e73c0569948ccb70d797dbb4dc59424a2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9b83c8ddc43323e625669fabb9c89ce3909b1040". Note: Case 112 Set buffer "input" to hex value "8c28c9ce68583e9eadc03b87f0db865 39bdf75e3c838890d7468dee36f4aa98ca408499849b3c7986cae75c35d485db Baldwin Informational, Expires 12/25/1999 2103 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 a6c61bb57880df0c92ad292c86e20637d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f2093b0df434b85acf31ba88c05dab1e55622b9c". Note: Case 113 Set buffer "input" to hex value "dede0f17077f0cfd9075cb2b797b1a0 a3a3b294dc39cf1f78052ca7b1598d5be6d54a8276e133440b658234c7ec0dc7 cfb3d4b537c82aa920173c14e7d4741bd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e2ea0b8733b508e63b875f29c08bf154edbfddf0". Note: Case 114 Set buffer "input" to hex value "9058e3e6bba94527ceef6189f1091ad acbc8ab4e5787febbb1f7a44f0f05f96ee37b205dd2625d4b4ca9d41aadae361 9b51ae8e10ed4f62499ebf9de5ac48e86". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length Baldwin Informational, Expires 12/25/1999 2104 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "45abcbde35629a219e18378d3495c929348062f0". Note: Case 115 Set buffer "input" to hex value "aa2be83649040b6b4725eed4cde35e7 6b182ed965f3db1af3bb58e115f7405191123aca13aa97818ba1bf0234a38582 994f3668ff2cafeb0b946d71c3fb2752e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0556406d8f4410d479d537ed0525debb9caf9b89". Note: Case 116 Set buffer "input" to hex value "01eb8459992a903587662f0598f0af8 4723fb212bc904430b08c30a4e71a4dc89eae336ce78551ab464945d1baee490 fd316d3695541f98fa93173d981ec4e9f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "dc8a8764d6ef7bac30a818ebb20f80bc62bfb274". Baldwin Informational, Expires 12/25/1999 2105 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 117 Set buffer "input" to hex value "2c25c78f8c709d295fd4d3137bf75f6 b730f0eae4aeaf074bf1be1ce54c4e80e67efceb0e7fc3ffd3aa9fceaa47ab26 015ce2d0d91e98d036f76b1f19b3378ad". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b553c31cc37f156e9bd87c1cd681846b40e3eeaa". Note: Case 118 Set buffer "input" to hex value "2374db50d6104b3b923f07f285f6f7a 16798ce0fd5a2dc304a925a3b3e3da8ae83cd7e8f7d33eaaf5ed64d9001ab3f9 b6676082c1a0fdef0158681dd9c795484". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ce8c79ff69a42f0e6583762dc2da75cbbdd04ed7". Note: Case 119 Set buffer "input" to hex value "7ae545e5638e7fd394f198617625f19 3626a9eff09a8e6fe7b3d08340dde0fefbce4f32eb167a3b13d0e385385b3a14 6b6d104b8e1302e2a7d3e7bb52eecf4ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2106 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "65cc20cafe5d7c217d9509bc8e52bcd0e830333d". Note: Case 120 Set buffer "input" to hex value "4e7754e8beea94fbc945282d500b48f cdd03a8834504e6d0434d2771aaf5f98856b22474a7cfa7b1ba7998301906453 9d5507603f2bd51e7d7fbee5dd21c54e7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "466ecdd464aa94f4fbefb83792431929b6dd0b1f". Note: Case 121 Set buffer "input" to hex value "7730d9af33521642242b16405aeb6c0 e64fc3eaba9d25d927c249df8d4f5e35eb49fe458e05a53f10d195043946651d ac0c8c947dc531325f4d42b9581233991". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 2107 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "digest". Check equality of buffer "digest" with hex value "8fd1b8093175f8ba7e06f281f7528ed025f0630e". Note: Case 122 Set buffer "input" to hex value "e7250405b97eee260a643f27bb3b66b e3ce51a3e615b172373c4efbf7af7336058459601f876ca6732e0972d6c14242 0511ca358b4a3e986b35080e5550f4d10". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "35c505785dc51a58e7d0abd48ce00cfd370acee6". Note: Case 123 Set buffer "input" to hex value "e1adf0c73905afe2f180be19b0f35fc a1586b6fcc1f293c57d4d6b5976fadb52ee42c8f2a02921e8f0834a0e7641252 4958bf0697689cdadd670078eedb7b579". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "59d94b725c4a120759560e20f612659cb739b888". Note: Case 124 Set buffer "input" to hex value "96083455215916bc6cf2f515123b2f3 f7e7fff410cb6cd36c95d3e345b9f567e8a9508f064d4b352a4563ff6b17e127 5a0794f7883247e6a616dac58482c477c". Baldwin Informational, Expires 12/25/1999 2108 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "dc0314dc7503a92d63efd494c80b1003241e773e". Note: Case 125 Set buffer "input" to hex value "edcd8e4446f752c96b2defbe0a89069 88a51eeca816a23467b0f22609db9f15e1e1f0628d7d79dde239bc6dbc71d0a5 321a3a94d32e527080e3d0c77f22505cc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "9d0fd516d019bce4ed7cd755a9f13e78f745c9fe". Note: Case 126 Set buffer "input" to hex value "3c9346447c98bd576025037892bdedc 55ad165f5cc8d6c1565ae4f636b42b4a84c1192dcd125dbf51b90775fe5a6c75 c818c9cd84438b0a09fed6a7c7f322eec". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2109 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "aabfeb8427a01ac6fcbf6eeac2c1469e8a19bb5c". Note: Case 127 Set buffer "input" to hex value "37ff651514f8dda02fde3c9aca7cd1b 7e0fbc3eec04aa60cafb079be7feb76cb1bcf8a4084bde8589c0bbf599b31f5d 97d922fdd2c5943cac04e9668655fe9a8". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "78f582a2f8d4edf4cdf70dbadbe5a479196c8223". Note: Case 128 Set buffer "input" to hex value "3f81d85d75153c6749dca621b570c6a 3c6926261f3b1670af656442a3186e487bb13d97becbb83ecf180b1195466efc 103fc976a3a26d6f27f5ba6f5bdd65935". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "010526a3ffe045ac4761654ed60a18b1f40e7c06". Note: Case 129 Baldwin Informational, Expires 12/25/1999 2110 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "65746dd3452154c188f66a0ebe73b93 b092ce854353eb96fbb53acec47414af6e9e19262107b19520ae21ae5fe4f17d 5cad394ce4f54320ea84351770611ded2". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "adf81813000810609c1b945b48cb338076095940". Note: Case 130 Set buffer "input" to hex value "54f6e771c83a2e3ba5261d4f8c4b009 965524f13c506295be39a189be25192baa55751c62a1dbedc23d61eadcbfb1ce ec4ddc1f22d826b28b82da44ebc388e8e". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "c94b8391f336ed0d8259659a21efefc553315f11". Note: Case 131 Set buffer "input" to hex value "78104ca000a890ec840f90cd6ab340e 473817756323118bb451a7648eeb4f0c858857f447199632fa8f6251fe468cd2 e6ebf830a40f5b1034321c46405e890ce". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2111 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "60ad486158486089fb3483274678631eeb438a02". Note: Case 132 Set buffer "input" to hex value "5d512e140181295d775eea3568a18ce e263136552a9f3fa00c7cb48a0963099243d78057a2495d4478a6fe0e79c010a 0a929a50130b2e69a3936523488318e39". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7925d1a5305f87cad8e16fe68a1b61e0ca297a91". Note: Case 133 Set buffer "input" to hex value "88e9438cfcac063f499e918200122f7 a1491025ed12367a3e5947dd756e238b9c1595e878c9726eb8730b2d81f92ea9 2dcce95ad99b113fc5e67e6d09c59006f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Baldwin Informational, Expires 12/25/1999 2112 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of buffer "digest" with hex value "0d8b7e6fea16be1188ab6dec131d275c4e3e28c2". Note: Case 134 Set buffer "input" to hex value "29d2ce0307b3ec4b0629793fcdc7af1 b5c48b285061bfe1643acc4c2bb80cc19c14acb1149d65b432a5f91a120f6af6 995889bf384f71ad24716d070e23d2fcc". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "15c6b057e693e4a81dcc92301288ceca6b88d627". Note: Case 135 Set buffer "input" to hex value "5627efedfeca60437808923c2f880b6 d19b0dbcbd50c3b2577e971f588e254159b9545e41f193aa1d6c123f84362ff1 12093a9ce138239ebbd9ff4ba92feb9fe". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d076f204ff3ed1a55b8285cf4af14e8ce2f92ed3". Note: Case 136 Set buffer "input" to hex value "365e3f9fd8910a6108fa4f05dd08266 768a401a80f93132684836be79960c9655a4dc4bcba5d02143fd509060ead131 0dddef6bbafc222a06360915cb3485fac". Call B_DigestUpdate passing "digestAlg" and address of first Baldwin Informational, Expires 12/25/1999 2113 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "14fb82d0ed1411304ab70e2dd14c308cb83654a5". Note: Case 137 Set buffer "input" to hex value "75dec9a0b31244b4085f2ce193721ff bace0c8c2ff148d87253457cbc7b5935044d84a64cbd2eb6703c2aab0e7f5dc4 07b7ba72faea92f449422f66a8fffb504". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "ac248f52cc79f00bf35c3af6620bd0338da5d90b". Note: Case 138 Set buffer "input" to hex value "6c3f3cc1830063b4e9b9040520e6fb5 6db45f4cfae7a422cd19c9658c30451f76b5a8083cd4a3f3765f9dd996a5acfb bdae6c5b48940ec84435c667ca721b937". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2114 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "90fd61fab92631e8032db6891aa27e042c73f633". Note: Case 139 Set buffer "input" to hex value "790b9c8df13d4d7976ea7a1a21bd4a5 681a2050f0611ff50eff4131a467125c2d739e7d87e23fefc50b59db72dcde1e 0ceb812caf376a8b00fac3dbb0c4cd1c4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "46e0491f7da6a950327cc71793b03f89dfe01984". Note: Case 140 Set buffer "input" to hex value "a43337110f60aad787a7e61875e8ce5 76fdd25e5e40b374c0badd614817baba400e08bf65cc70b6eea8cee25c00f05e 64d208ef2055ea7525790e4986ca46557". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0f065e87e05c54386cf7819575a085d5c56cea27". Note: Case 141 Baldwin Informational, Expires 12/25/1999 2115 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "input" to hex value "9ea5748856688be293a5218d0e9b8cf ce3f381c6eac2c8885915dd2ffcf4e53b3f0c568e9dc5662df0a25ac408c8b10 1607d5f0976610a49ea526a5cb9f335ca". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3bc18dc07194c0c6b94c3b623396f2e38288dd09". Note: Case 142 Set buffer "input" to hex value "08f8067ea8b38e94fea578fa6d3bec6 fb736b4a2c65f50ef163d66fa1c10d78492ae33f06bec97814ad997ad0df0e4d 745734876f4865e535856d8635ce01449". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "1ea2b1bab4d4f27ab272f139091f61d03bbf4304". Note: Case 143 Set buffer "input" to hex value "d1b696cfa0c2cf5823c15ec362acfc4 4344c4e2581cf018886e4ae11a13ccded57a43cc7f42ba4a18b5ae2f36828b1c f9470985fb3bd359bfae91e236a19d70a". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2116 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "bf47edf3faaf7906b220cfa4c9a11f571b3e28d0". Note: Case 144 Set buffer "input" to hex value "12c7cc752a4bbb3e05183ea55e3840a 3b1f94ccd8af1e06d9264283a02c77cf3b10616d7e5f026f21f88239e3b51c03 05790682bb60b7db6aeb774df701ac19f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "a97317acb618e7e69e3b5a380ca7d1fd405c8bf6". Note: Case 145 Set buffer "input" to hex value "24326850aadb4f674bf2f1e563b9919 8d0f86c09313a0f00e0dfbb9a5cb8469e190170c95fba7376f2a8f6ce01cc0ea adf32fbf906123697685f475df862d736". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value Baldwin Informational, Expires 12/25/1999 2117 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "2acb8377b350d5ec65d591af0379d615113f472b". Note: Case 146 Set buffer "input" to hex value "2c91d81cd831cfe23670949936d4f6d ad8b752aef705f94d9352f4c6c68fa574a525def492fcfd44bf81046aa99e255 fc132e91875192b1f25b88e28cca99625". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "6008b59f3e2abf6130b60b30b3b79145f67697f3". Note: Case 147 Set buffer "input" to hex value "8a9494baa8ea500b3f6322fae28f30b 3f87ea811d96428c4b26438491d27130d6858ab23015e2316632814eb43ffa03 3fb23c18134b307f5bf354b216d3a8251". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "eec4945e2776b049bc17b2e8c62d7a661ed9d333". Note: Case 148 Set buffer "input" to hex value "918eda65fa5ce91d57607c7b4682b82 cd94fdf04a256b97702cb2180624249569d8abe1b61b9e6f610bb086f2f971e6 3fbe5144fa166da64e2e4e6828f5cfadd". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized Baldwin Informational, Expires 12/25/1999 2118 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f848f4b56c005456f144aeaab108372f2659678c". Note: Case 149 Set buffer "input" to hex value "bab23a9a1acb38badb28ceb436f0cde eb6f18faff87bccd46666793d83ee761227dca86e702629637dc9c58477cc540 61bff27f4d6b74bf38fa890259716c41d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "d56b210c853d8179f808524f46b45ed9a02677fc". Note: Case 150 Set buffer "input" to hex value "37e24b4faef87c36dc655ab483076d3 1aaa9bb1fe02eda02b4228f3960ff2f46c5da973e0b9b43bc197244cdf32445e c747765f617066cbe512c2ff605a54784". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2119 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "67c73490a7d4b4b2e8d96a2f081598e2557588c2". Note: Case 151 Set buffer "input" to hex value "22fb6a512afffe4cbee11056dcfeeb0 0dc09c852df48eae923cf5e586d8fb6db402b21abaa1ae61836b1ec3a5faf5f4 cb84dac6d567587836ef35eb34feba6e0". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "3ae5c869d30f1f3b4bd7930bcf2d4e35ad4f6ff3". Note: Case 152 Set buffer "input" to hex value "3e6f42d692adaaf4e78f6706506f974 39aa49a673b57f2ec259400cd84324238319c013f7427d2b9bbf1ddb57ed2646 d4a55fda517fdd81b2578d28d0dfe1c5d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "486a00aade6ebe65649d89e57db19b523f62cfef". Note: Case 153 Set buffer "input" to hex value "712d545331f05aa05190f32bf1c1813 Baldwin Informational, Expires 12/25/1999 2120 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 d31ad160bfc20518365401d969d60c5b97bb473432bf26e76c237fefa1eee114 23414b740daacebc02669a3cc18ae9eac". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "cb7a49ed8f961e2a36caa4d28712abc68ea880ca". Note: Case 154 Set buffer "input" to hex value "9e91d6cbc99ed92d9e045d5063b67d2 b451387c72716a742978a93b0dd3713c09b906ad44602b4b2d58b5b57041d94b 09dc632edb780bac1c54966bf1fa02a61". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "0e2b917045ed62141b1c301003bdd2f232046b05". Note: Case 156 Set buffer "input" to hex value "edc641c013f04abe8b73949ccda2998 fe30479c66c8e5902bcf7b8ebc360371baf8b75e87b556f9c2a43e2912ce5c39 c37128d1d14df7dcbe1ab636e9af1016f". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free Baldwin Informational, Expires 12/25/1999 2121 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "e1882607a5a897f2e597c2aec458291d953f6c44". Note: Case 157 Set buffer "input" to hex value "5f3bdd91d276cbaaa54c9f305aa9d84 842a5c7b4566870a740e2e52a7f517440652a4bf42257fc3ab6bff1af313e5b1 922ba0ff7e984d149338a36bf8ed46ae4". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7ed9094655f1179f36864724377bbb6bbdd60f8f". Note: Case 158 Set buffer "input" to hex value "fd37ed70fb0fa83cba1dcf712b136a4 3227223f735fe6dc66dd18805142e239a970a0b278f11971be0ecfa40b3da21b 4a9beca53d581c6eeff51337478ff61f9". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "073b0931d5c956fcc132cee39e046d757f491341". Baldwin Informational, Expires 12/25/1999 2122 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 159 Set buffer "input" to hex value "e8c4d52ab8812c5af246111218d39e9 68469badcc7f906e03c5aee3999b859dd636c6597b5e3e879493b58bd7e6835e 01077a26d3e8435ef98dde188be6a7ac7". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "25c98fc9fc4f8fbbc605988aba5334b4f5a3ffc9". Note: Case 160 Set buffer "input" to hex value "f51b6b5594522f0987a957ad136c3a8 690de1837ff0359cce939bfa3278c3db86cffa84f114dcc131d7e821150617de f1588b80aecb67f93a7340bfe4186108d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "06e8d4a82d592e3f5e49f5d48b363b15b49f59aa". Note: Case 161 Set buffer "input" to hex value "072e4e8a4aa52a92e10c04a7a7f6623 07cfacd85574bc7802e6f693d1184a9da412c2d66699f647f270925061088ee5 ce9003ff3907039d9b598c41d24086fb5". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2123 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "f1138f8bb4c4d75f988b92dd30d81092c75674c6". Note: Case 162 Set buffer "input" to hex value "29c9d94535b875109e284738a881a17 1fd52c89e5c33b8f7fd7881c8ae6b6bd8b215edde75f31bda5faa56056d9ca5c 2f6cb6808ff3e7ed2a0da04fc835e424d". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "25ec82914a584c8dd1cea709344948db6f679d7a". Note: Case 163 Set buffer "input" to hex value "96ccd75f6b2eb3580d8db3475508603 d48a4641bec0eedf1d14491f05157d3314b3fab52904f61d0ca201ef665100d2 67cb9e1e4ed63ae790d3866b6b78998bf". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2124 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "7721433636596dd7c1528f52cf307775d3803e9c". Note: Case 164 Set buffer "input" to hex value "bc707a109a5b5120999ef9a1693c624 7c07a3589c4df1d7e1f0a3159f162f44a2416429b166524a87f30e2caa0da23c 8401baa8f5ce844fd6c7c7f6a2d39dd64". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Check equality of buffer "digest" with hex value "b2c665b6902d0f8ab25249e90fcd1dbc3529f57a". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFSHA00". This is the start of test case "TEMAC00". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Content-based test for mac Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Baldwin Informational, Expires 12/25/1999 2125 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "AM_MAC", "NULL_PTR". Note: Create & Initialize Create buffer "input" of decimal value "80" bytes. Create buffer "digest" of decimal value "16" bytes. Create algorithm object "digestAlg". Call B_CreateAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_ALGORITHM_INFO". Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "1". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MAC" initialized from "17". Call B_SetAlgorithmInfo passing "digestAlg" and "AI_MAC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DigestInit passing "digestAlg" and "NULL_PTR" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "input" to hex value "4778ec68d5391ec842b6d8b3a61fe02 20a18489854d74fdcdab267cf8a0c0c6efa71fef6f118c1a5b2e2d4ce9b76568 5058e5e6f5a1c3d3a42bb091f6bcc5c69". Call B_DigestUpdate passing "digestAlg" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_OUTPUT_LEN". Call B_DigestFinal passing "digestAlg" and address of next free byte in buffer "digest" and address of "_OutputLen" and length of free bytes in buffer "digest" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2126 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "digest" by "_OutputLen". Finalize buffer "digest". Note: Clean up Call Call B_DestroyAlgorithmObject passing "digestAlg". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TEMAC00". This is the start of test case "TLRSA01". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests, RSA key generation, raw RSA operations, Note: PKCS Note: RSA signatures and PKCS encryption and decryption. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RSA_KEY_GEN", "AM_RSA_ENCRYPT", "AM_RSA_DECRYPT", "AM_RSA_CRT_ENCRYPT", "AM_RSA_CRT_DECRYPT", "AM_MD2", "NULL_PTR". Note: Use the following random algorithm throughout. Create buffer "seed" of decimal value "1" bytes. Set buffer "seed" to hex value "00". Create algorithm object "randomObj". Call B_CreateAlgorithmObject passing "randomObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Baldwin Informational, Expires 12/25/1999 2127 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_SetAlgorithmInfo passing "randomObj" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomObj" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Set the following data object big enough to hold the Note: largest Note: possible input, which would be input for a 2048-bit key. Create buffer "inputZero" of decimal value "256" bytes. Set buffer "inputZero" to hex value "000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000". Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate an RSA key, then do some encryption and Note: decryption. Create buffer "modSize" of decimal value "2" bytes. Create buffer "inputSize" of decimal value "2" bytes. Create buffer "input" of decimal value "256" bytes. Create buffer "output" of decimal value "256" bytes. Create buffer "unput" of decimal value "256" bytes. Note: Initialize modulus size to 360 bits (minimum for digital Note: signatures). Note: Each loop will increment it by 1. Set buffer "modSize" to hex value "0168". Note: Since the modulus size is initialized at 360 bits, the Baldwin Informational, Expires 12/25/1999 2128 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: size of the Note: data should start at (360 / 8) bytes. Each eighth loop Note: will increment Note: it by 1. Set buffer "inputSize" to hex value "2d". Note: The outer loop's limit is 211. Begin a loop of decimal value "211" iterations. Increment buffer "inputSize" by decimal value "1". Note: The inner loop count must be 8. Begin a loop of decimal value "8" iterations. Increment buffer "modSize" by decimal value "1". Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "keyGen". Call B_CreateAlgorithmObject passing "keyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAKeyGen" initialized from contents of buffer "modSize", "010001". Call B_SetAlgorithmInfo passing "keyGen" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "keyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate the keypair. Call Call B_GenerateKeypair passing "keyGen" and "publicKey" and "privateKey" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2129 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Get the modulus, then subtract by 1. Encrypt and decrypt Note: this value Note: using raw RSA, the result should be modulus - 1. Set "_InfoPointer" to address of info structure for "KI_RSAPublic". Call B_GetKeyInfo passing "_InfoPointer" and "publicKey" and "KI_RSAPublic". Load buffer "input" from info structure for "KI_RSAPublic". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Decrement buffer "input" by decimal value "1". Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt with the public key Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Baldwin Informational, Expires 12/25/1999 2130 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Decrypt with the public key Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: Destroy the objects for the next test. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt with the private key Baldwin Informational, Expires 12/25/1999 2131 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: Decrypt with the private key Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2132 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: Destroy the objects for the next test. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Create a data object that contains the number 1 with Note: sufficient Note: leading zeros. Set buffer "input" to contents of buffer "inputZero". Set length of buffer "input" to contents of buffer "inputSize". Increment buffer "input" by decimal value "1". Note: Raw RSA Note: Encrypt that data with the public key. The result should Note: be 1. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2133 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: Raw RSA Note: Decrypt the data with the private key. The result should Note: be 1. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2134 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Check equality of buffer "output" with contents of buffer "input". Note: Destroy the objects for the next test. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate some random bytes Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomObj" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Note: PKCS RSA Note: Encrypt that data with the public key. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2135 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_PKCS_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: PKCS RSA Note: Decrypt the output with the private key. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next Baldwin Informational, Expires 12/25/1999 2136 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "unput" with contents of buffer "input". Note: Use AI_MD2WithRSAEncryption Create algorithm object "signObj". Call B_CreateAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "signObj" and "AI_MD2WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_SignInit passing "signObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignUpdate passing "signObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_SignFinal passing "signObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 2137 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "output". Create algorithm object "verifyObj". Call B_CreateAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD2WithRSAEncryption" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "verifyObj" and "AI_MD2WithRSAEncryption" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_VerifyInit passing "verifyObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyUpdate passing "verifyObj" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_VerifyFinal passing "verifyObj" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Destroy the objects for next loop. Call Call B_DestroyAlgorithmObject passing "signObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "verifyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "keyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2138 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TLRSA01". This is the start of test case "TLRSA02". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests, RSA key generation and PKCS RSA Note: encryption and Note: decryption. Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RSA_KEY_GEN", "AM_RSA_ENCRYPT", "AM_RSA_CRT_DECRYPT", "NULL_PTR". Note: Use the following random algorithm throughout. Create buffer "seed" of decimal value "1" bytes. Set buffer "seed" to hex value "ff". Create algorithm object "randomObj". Call B_CreateAlgorithmObject passing "randomObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "randomObj" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2139 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "randomObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_RandomUpdate passing "randomObj" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-1 Note: Generate an RSA key, then do some encryption and Note: decryption. Create buffer "modSize" of decimal value "2" bytes. Create buffer "input" of decimal value "16" bytes. Note: Set the following data objects big enough to hold the Note: largest Note: possible output, which would be output for a 2048-bit Note: key. Create buffer "output" of decimal value "256" bytes. Create buffer "unput" of decimal value "256" bytes. Note: Initialize modulus size to 255 bits. Each loop will Note: increment Note: it by 1. Set buffer "modSize" to hex value "0100". Note: The loop's limit is 2048 - 256 = 1792 iterations. Begin a loop of decimal value "1792" iterations. Increment buffer "modSize" by decimal value "1". Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "keyGen". Baldwin Informational, Expires 12/25/1999 2140 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "keyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RSAKeyGen" initialized from contents of buffer "modSize", "010001". Call B_SetAlgorithmInfo passing "keyGen" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "keyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate the keypair. Call Call B_GenerateKeypair passing "keyGen" and "publicKey" and "privateKey" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate some random bytes to encrypt Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomObj" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Note: PKCS RSA Note: Encrypt that data with the public key. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_PKCS_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2141 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: PKCS RSA Note: Decrypt the output with the private key. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 2142 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "unput" with contents of buffer "input". Note: Destroy the objects for the next test. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "keyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: perform the same test with a public exponent of 3 Create key object "publicKey". Call B_CreateKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "privateKey". Call B_CreateKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "keyGen". Call B_CreateAlgorithmObject passing "keyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 2143 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_RSAKeyGen" initialized from contents of buffer "modSize", "03". Call B_SetAlgorithmInfo passing "keyGen" and "AI_RSAKeyGen" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_GenerateInit passing "keyGen" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate the keypair. Call Call B_GenerateKeypair passing "keyGen" and "publicKey" and "privateKey" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Generate some random bytes to encrypt Set "_OutputLen" to decimal value "16". Call B_GenerateRandomBytes passing "randomObj" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Note: PKCS RSA Note: Encrypt that data with the public key. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPublic" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_PKCS_RSAPublic" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "publicKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2144 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "randomObj" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: PKCS RSA Note: Decrypt the output with the private key. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_PKCS_RSAPrivate" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_PKCS_RSAPrivate" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "privateKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2145 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Check equality of buffer "unput" with contents of buffer "input". Note: Destroy the objects for the next loop. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "keyGen". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "publicKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "privateKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TLRSA02". This is the start of test case "TFRC500". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional test for AI_RC5_CBCPadBER Note: ------------------------------------------------------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_RC5_CBC_ENCRYPT", "AM_RC5_CBC_DECRYPT", "NULL_PTR". Baldwin Informational, Expires 12/25/1999 2146 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Initialize, set up data Create buffer "inputData" of decimal value "100" bytes. Create buffer "cypherText" of decimal value "100" bytes. Create buffer "plainText" of decimal value "100" bytes. Create buffer "iv" of decimal value "8" bytes. Create buffer "newiv" of decimal value "8" bytes. Create buffer "key" of decimal value "8" bytes. Note: vector data Set buffer "inputData" to hex value "000102030405060708091011121 314151617181920212223". Set buffer "iv" to hex value "0011223344556677". Set buffer "newiv" to hex value "7766554433221100". Set buffer "key" to hex value "1234567890123456". Note: global key object Create key object "keyObj". Call B_CreateKeyObject passing "keyObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "key". Call B_SetKeyInfo passing "keyObj" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case: AI_RC5_CBCPad Note: Case 0: Check the output of the base algorithm Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: AI_RC5_CBCPadBER Note: 30 1f Note: 06 08 2a 86 48 86 f7 0d 03 09 Baldwin Informational, Expires 12/25/1999 2147 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: 30 13 Note: 02 01 10 Note: 02 01 0c Note: 02 01 40 Note: 04 08 77 66 55 44 33 22 11 00 Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301 302011002010c02014004087766554433221100". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_RC5_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301 302011002010c02014004087766554433221100". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC5_CBCPadBER" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301302011002010c02014004087766554433221 100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPadBER". Check equality of info structure for "AI_RC5_CBCPadBER" with expected info structure for "AI_RC5_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301302011002010c02014004087766554433221 100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPadBER". Check equality of info structure for "AI_RC5_CBCPadBER" with expected info structure for "AI_RC5_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 2148 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "211394f772f9b728a2649d018de1d2aee8c3ee063507136f27e98e494564787 Baldwin Informational, Expires 12/25/1999 2149 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1: use the initial iv Note: 30 1f Note: 06 08 2a 86 48 86 f7 0d 03 09 Note: 30 13 Note: 02 01 10 Note: 02 01 0c Note: 02 01 40 Note: 04 08 00 11 22 33 44 55 66 77 Create algorithm object "encryptionObj". Call B_CreateAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decryptionObj". Call B_CreateAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2150 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_RC5_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_RC5_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301302011002010c02014004080011223344556 677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPadBER". Check equality of info structure for "AI_RC5_CBCPadBER" with expected info structure for "AI_RC5_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301302011002010c02014004080011223344556 677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPadBER". Check equality of info structure for "AI_RC5_CBCPadBER" with expected info structure for "AI_RC5_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2151 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call Call B_EncryptInit passing "encryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "53decc19ee94e6d0fb497ee707bfff094dba7e93ebe17981da1a461100f42dc 6". Call B_DecryptUpdate passing "decryptionObj" and address of Baldwin Informational, Expires 12/25/1999 2152 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 2: give the new iv to the algorithm; however, the Note: encryption Note: and decryption operation still use the initial iv Note: since final already calls. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "newiv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301302011002010c02014004080011223344556 677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPadBER". Check equality of info structure for "AI_RC5_CBCPadBER" with expected info structure for "AI_RC5_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2153 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301302011002010c02014004080011223344556 677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPadBER". Check equality of info structure for "AI_RC5_CBCPadBER" with expected info structure for "AI_RC5_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next Baldwin Informational, Expires 12/25/1999 2154 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "53decc19ee94e6d0fb497ee707bfff094dba7e93ebe17981da1a461100f42dc 6". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: Case 3: Final was call, so the new iv will start taking Note: effect; Note: therefore, the algorithm will return with the new iv Note: Update the algorithm with new IV8 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301302011002010c02014004087766554433221 100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPadBER". Check equality of info structure for "AI_RC5_CBCPadBER" with expected info structure for "AI_RC5_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2155 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301302011002010c02014004087766554433221 100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPadBER". Check equality of info structure for "AI_RC5_CBCPadBER" with expected info structure for "AI_RC5_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "7766554433221100". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set length of buffer "cypherText" to decimal value "0". Set length of buffer "plainText" to decimal value "0". Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" Baldwin Informational, Expires 12/25/1999 2156 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "211394f772f9b728a2649d018de1d2aee8c3ee063507136f27e98e494564787 9". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Note: case 4: Set the algorithm with the new IV like case 2, Note: but now calling the Note: init right away. The new iv will take effect right away. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "encryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_CBC_IV8" initialized from contents of buffer "iv". Call B_SetAlgorithmInfo passing "decryptionObj" and "AI_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptionObj" and "keyObj" Baldwin Informational, Expires 12/25/1999 2157 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptionObj" and "keyObj" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301302011002010c02014004080011223344556 677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPadBER". Check equality of info structure for "AI_RC5_CBCPadBER" with expected info structure for "AI_RC5_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPadBER" initialized from "301f06082a864886f70d0309301302011002010c02014004080011223344556 677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPadBER". Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPadBER". Check equality of info structure for "AI_RC5_CBCPadBER" with expected info structure for "AI_RC5_CBCPadBER". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Call B_GetAlgorithmInfo passing "_InfoPointer" and "encryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "AI_RC5_CBCPad" initialized from "10", "12", "32", "0011223344556677". Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad". Baldwin Informational, Expires 12/25/1999 2158 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetAlgorithmInfo passing "_InfoPointer" and "decryptionObj" and "AI_RC5_CBCPad". Check equality of info structure for "AI_RC5_CBCPad" with expected info structure for "AI_RC5_CBCPad". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and address of first initialized byte in buffer "inputData" and length of initialized bytes in buffer "inputData" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Call B_EncryptFinal passing "encryptionObj" and address of next free byte in buffer "cypherText" and address of "_OutputLen" and length of free bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "cypherText" by "_OutputLen". Finalize buffer "cypherText". Check equality of buffer "cypherText" with hex value "53decc19ee94e6d0fb497ee707bfff094dba7e93ebe17981da1a461100f42dc 6". Call B_DecryptUpdate passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and address of first initialized byte in buffer "cypherText" and length of initialized bytes in buffer "cypherText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Call B_DecryptFinal passing "decryptionObj" and address of next free byte in buffer "plainText" and address of "_OutputLen" and length of free bytes in buffer "plainText" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "plainText" by "_OutputLen". Finalize buffer "plainText". Check equality of buffer "plainText" with contents of buffer "inputData". Baldwin Informational, Expires 12/25/1999 2159 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyAlgorithmObject passing "encryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptionObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TFRC500". This is the start of test case "TLRC501". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests, RC5 encryption and decryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RC5_CBC_ENCRYPT", "AM_RC5_CBC_DECRYPT", "NULL_PTR". Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in Baldwin Informational, Expires 12/25/1999 2160 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "8" bytes. Create buffer "output" of decimal value "8" bytes. Create buffer "unput" of decimal value "8" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "2" bytes. Create buffer "rounds" of decimal value "2" bytes. Create buffer "wordSize" of decimal value "2" bytes. Create buffer "wordIncrement" of decimal value "2" bytes. Set buffer "wordSize" to hex value "10". Set buffer "wordIncrement" to hex value "10". Note: The maximum outer loop count is 3. It changes the word Note: size. Note: As of Oct. 25, 1995, BSAFE 3.0 only accepts a word size Note: of 32. Increment buffer "wordSize" by contents of buffer "wordIncrement". Begin a loop of decimal value "1" iterations. Set buffer "rounds" to hex value "00". Note: The maximum inner loop count is 256. It is for round Note: count. Begin a loop of decimal value "256" iterations. Set buffer "keyLen" to hex value "00". Note: The maximum inner-inner loop count is 256. It is for key Note: length. Begin a loop of decimal value "256" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Baldwin Informational, Expires 12/25/1999 2161 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Display buffer "keyLen". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", contents of buffer "rounds", contents of buffer "wordSize", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RC5_CBC" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 2162 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", contents of buffer "rounds", contents of buffer "wordSize", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2163 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Increment buffer "keyLen" by decimal value "1". End the loop and display execution times. Increment buffer "rounds" by decimal value "1". End the loop and display execution times. Increment buffer "wordSize" by contents of buffer "wordIncrement". Increment buffer "wordIncrement" by decimal value "16". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TLRC501". This is the start of test case "TLRC502". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2164 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests, RC5 encryption and decryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RC5_CBC_ENCRYPT", "AM_RC5_CBC_DECRYPT", "NULL_PTR". Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Baldwin Informational, Expires 12/25/1999 2165 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "inputZero" of decimal value "2" bytes. Create buffer "input" of decimal value "300" bytes. Create buffer "inputLen" of decimal value "2" bytes. Create buffer "output" of decimal value "300" bytes. Create buffer "unput" of decimal value "300" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "2" bytes. Create buffer "rounds" of decimal value "2" bytes. Create buffer "wordSize" of decimal value "2" bytes. Create buffer "wordIncrement" of decimal value "2" bytes. Set buffer "inputZero" to hex value "". Set buffer "wordSize" to hex value "10". Set buffer "wordIncrement" to hex value "10". Note: The maximum outer loop count is 3. It changes the word Note: size. Note: As of Oct. 25, 1995, BSAFE 3.0 only accepts a word size Note: of 32. Increment buffer "wordSize" by contents of buffer "wordIncrement". Begin a loop of decimal value "1" iterations. Set buffer "rounds" to hex value "00". Note: The maximum inner loop count is 256. It is for round Note: count. Begin a loop of decimal value "256" iterations. Set buffer "keyLen" to hex value "00". Note: The maximum inner-inner loop count is 256. It is for key Note: length. Set buffer "inputLen" to hex value "00". Begin a loop of decimal value "256" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Increment buffer "inputLen" by decimal value "1". Set "_OutputLen" to contents of buffer "inputLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next Baldwin Informational, Expires 12/25/1999 2166 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Display buffer "keyLen". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Input data of length 0, then the input, then Note: data of length Note: zero again. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad" initialized from "10", contents of buffer "rounds", contents of buffer "wordSize", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RC5_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next Baldwin Informational, Expires 12/25/1999 2167 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "inputZero" and length of initialized bytes in buffer "inputZero" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "inputZero" and length of initialized bytes in buffer "inputZero" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad" initialized from "10", contents of buffer "rounds", contents of buffer "wordSize", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RC5_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2168 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Increment buffer "keyLen" by decimal value "1". End the loop and display execution times. Increment buffer "rounds" by decimal value "1". End the loop and display execution times. Increment buffer "wordSize" by contents of buffer "wordIncrement". Baldwin Informational, Expires 12/25/1999 2169 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment buffer "wordIncrement" by decimal value "16". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TLRC502". This is the start of test case "TP3DES". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Performance tests, Triple DES Set "_Chooser" to "AM_DES_EDE3_CBC_ENCRYPT", "AM_DES_EDE3_CBC_DECRYPT", "NULL_PTR". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from "6d716590f1296b50d69b37c67a456b80856d1166c58a2d 01". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2170 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from "c617d76c9002eb8b". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_EDE3_CBC_IV8" initialized from "c617d76c9002eb8b". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_EDE3_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "input" of decimal value "2048" bytes. Create buffer "output" of decimal value "2048" bytes. Create buffer "unput" of decimal value "2048" bytes. Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 Baldwin Informational, Expires 12/25/1999 2171 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff". Note: ---------------------------------------------------------- Note: -- Note: Timing test 1 Note: Report under the category Note: key setup (microseconds) Note: Triple DES Note: Use the number following "in microseconds :" Note: two significant digits Baldwin Informational, Expires 12/25/1999 2172 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Begin a loop of decimal value "500000" iterations. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Note: ---------------------------------------------------------- Note: -- Note: Timing test 2 Note: Report under the category Note: encrypt (bytes/sec) Note: Triple DES Note: Use the number following "kilobytes per second :" Note: Keep digits left of the decimal point Note: then multiply by 1,000 Begin a loop of decimal value "35000" iterations. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: ---------------------------------------------------------- Note: -- Note: Timing test 2 Note: Report under the category Note: decrypt (bytes/sec) Note: Triple DES Note: Use the number following "kilobytes per second :" Note: Keep digits left of the decimal point Note: then multiply by 1,000 Baldwin Informational, Expires 12/25/1999 2173 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Begin a loop of decimal value "35000" iterations. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: ---------------------------------------------------------- Note: -- This is the end of test case "TP3DES". This is the start of test case "TPDES". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Performance tests, DES Set "_Chooser" to "AM_DES_CBC_ENCRYPT", "AM_DES_CBC_DECRYPT", "NULL_PTR". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_DES8" initialized from "0110233245546776". Call B_SetKeyInfo passing "key" and "KI_DES8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Baldwin Informational, Expires 12/25/1999 2174 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from "0011223344556677". Call B_SetAlgorithmInfo passing "encrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_DES_CBC_IV8" initialized from "0011223344556677". Call B_SetAlgorithmInfo passing "decrypter" and "AI_DES_CBC_IV8" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "input" of decimal value "2048" bytes. Create buffer "output" of decimal value "2048" bytes. Create buffer "unput" of decimal value "2048" bytes. Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec Baldwin Informational, Expires 12/25/1999 2175 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff". Note: ---------------------------------------------------------- Baldwin Informational, Expires 12/25/1999 2176 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: -- Note: Timing test 1 Note: Report under the category Note: key setup (microseconds) Note: DES Note: Use the number following "in microseconds :" Note: two significant digits Begin a loop of decimal value "2000000" iterations. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Note: ---------------------------------------------------------- Note: -- Note: Timing test 2 Note: Report under the category Note: encrypt (bytes/sec) Note: DES Note: Use the number following "kilobytes per second :" Note: Keep digits left of the decimal point Note: then multiply by 1,000 Begin a loop of decimal value "80000" iterations. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: ---------------------------------------------------------- Note: -- Baldwin Informational, Expires 12/25/1999 2177 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Timing test 3 Note: Report under the category Note: decrypt (bytes/sec) Note: DES Note: Use the number following "kilobytes per second :" Note: Keep digits left of the decimal point Note: then multiply by 1,000 Begin a loop of decimal value "80000" iterations. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: ---------------------------------------------------------- Note: -- This is the end of test case "TPDES". This is the start of test case "TPRC2". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Performance tests, RC2 Set "_Chooser" to "AM_RC2_CBC_ENCRYPT", "AM_RC2_CBC_DECRYPT", "NULL_PTR". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2178 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "0110233245546776fedc". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "80", "0011223344556677". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC2_CBC" initialized from "80", "0011223344556677". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC2_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "input" of decimal value "2048" bytes. Create buffer "output" of decimal value "2048" bytes. Create buffer "result" of decimal value "2048" bytes. Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 Baldwin Informational, Expires 12/25/1999 2179 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 Baldwin Informational, Expires 12/25/1999 2180 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff". Note: ---------------------------------------------------------- Note: -- Note: Timing test 1 Note: Report under the category Note: key setup (microseconds) Note: RC2 Note: Use the number following "in microseconds :" Note: two significant digits Begin a loop of decimal value "500000" iterations. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Note: ---------------------------------------------------------- Note: -- Note: Timing test 2 Note: Report under the category Note: encrypt (bytes/sec) Note: RC2 Note: Use the number following "kilobytes per second :" Note: keep digits left of the decimal point Note: then multiply by 1,000 Begin a loop of decimal value "150000" iterations. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "output" and address of "_OutputLen" and Baldwin Informational, Expires 12/25/1999 2181 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: ---------------------------------------------------------- Note: -- Note: Timing test 3 Note: Report under the category Note: decrypt (bytes/sec) Note: RC2 Note: Use the number following "kilobytes per second :" Note: multiply by 1,000 Note: keep digits left of the decimal point Note: then multiply by 1,000 Begin a loop of decimal value "150000" iterations. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Increment length of buffer "result" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "result" and address of "_OutputLen" and length of free bytes in buffer "result" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "result" by "_OutputLen". Finalize buffer "result". Note: ---------------------------------------------------------- Note: -- This is the end of test case "TPRC2". This is the start of test case "TPRC5". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Baldwin Informational, Expires 12/25/1999 2182 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Performance tests, RC5 Set "_Chooser" to "AM_RC5_CBC_ENCRYPT", "AM_RC5_CBC_DECRYPT", "NULL_PTR". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "01102332455676891486". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "encrypter". Call B_CreateAlgorithmObject passing "encrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create algorithm object "decrypter". Call B_CreateAlgorithmObject passing "decrypter". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0102030405060708". Call B_SetAlgorithmInfo passing "encrypter" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0102030405060708". Call B_SetAlgorithmInfo passing "decrypter" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decrypter" and "key" and Baldwin Informational, Expires 12/25/1999 2183 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "input" of decimal value "2048" bytes. Create buffer "output" of decimal value "2048" bytes. Create buffer "unput" of decimal value "2048" bytes. Set buffer "input" to hex value "000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 Baldwin Informational, Expires 12/25/1999 2184 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff000102030405060708090a0b0c0d0e0 f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2 f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4 f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6 f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8 f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaea fb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcec fd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeee ff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff". Note: ---------------------------------------------------------- Note: -- Note: Timing test 1 Note: Report under the category Note: key setup (microseconds) Note: RC5 Note: Use the number following "in microseconds :" Note: two significant digits Begin a loop of decimal value "500000" iterations. Call Call B_EncryptInit passing "encrypter" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Note: ---------------------------------------------------------- Note: -- Note: Timing test 2 Note: Report under the category Note: encrypt (bytes/sec) Note: RC5 Note: Use the number following "kilobytes per second :" Note: keep digits left of the decimal point Note: then multiply by 1,000 Baldwin Informational, Expires 12/25/1999 2185 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Begin a loop of decimal value "150000" iterations. Call B_EncryptUpdate passing "encrypter" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encrypter" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: ---------------------------------------------------------- Note: -- Note: Timing test 3 Note: Report under the category Note: decrypt (bytes/sec) Note: RC4 Note: Use the number following "kilobytes per second :" Note: multiply by 1,000 Note: keep digits left of the decimal point Note: then multiply by 1,000 Begin a loop of decimal value "150000" iterations. Call B_DecryptUpdate passing "decrypter" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. End the loop and display execution times. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decrypter" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 2186 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Finalize buffer "unput". Note: ---------------------------------------------------------- Note: -- This is the end of test case "TPRC5". This is the start of test case "TQRC501". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests, RC5 encryption and decryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RC5_CBC_ENCRYPT", "AM_RC5_CBC_DECRYPT", "NULL_PTR". Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2187 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "8" bytes. Create buffer "output" of decimal value "8" bytes. Create buffer "unput" of decimal value "8" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "2" bytes. Create buffer "rounds" of decimal value "2" bytes. Create buffer "wordSize" of decimal value "2" bytes. Create buffer "wordIncrement" of decimal value "2" bytes. Set buffer "wordSize" to hex value "10". Set buffer "wordIncrement" to hex value "10". Note: The maximum outer loop count is 3. It changes the word Note: size. Note: As of Oct. 25, 1995, BSAFE 3.0 only accepts a word size Note: of 32. Increment buffer "wordSize" by contents of buffer "wordIncrement". Begin a loop of decimal value "1" iterations. Set buffer "rounds" to hex value "00". Note: The maximum inner loop count is 256. It is for round Note: count. Begin a loop of decimal value "15" iterations. Set buffer "keyLen" to hex value "00". Note: The maximum inner-inner loop count is 256. It is for key Note: length. Begin a loop of decimal value "15" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2188 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Display buffer "keyLen". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", contents of buffer "rounds", contents of buffer "wordSize", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Baldwin Informational, Expires 12/25/1999 2189 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", contents of buffer "rounds", contents of buffer "wordSize", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next Baldwin Informational, Expires 12/25/1999 2190 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Increment buffer "keyLen" by decimal value "16". End the loop and display execution times. Increment buffer "rounds" by decimal value "16". End the loop and display execution times. Increment buffer "wordSize" by contents of buffer "wordIncrement". Increment buffer "wordIncrement" by decimal value "16". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TQRC501". This is the start of test case "TQRC502". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Functional tests, RC5 encryption and decryption Baldwin Informational, Expires 12/25/1999 2191 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: Start with GlobalInit for code resource Set "_Chooser" to "AM_MD5_RANDOM", "AM_RC5_CBC_ENCRYPT", "AM_RC5_CBC_DECRYPT", "NULL_PTR". Note: Use the following random object throughout. Create algorithm object "random". Call B_CreateAlgorithmObject passing "random". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_MD5Random" initialized from "NULL_PTR". Call B_SetAlgorithmInfo passing "random" and "AI_MD5Random" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_RandomInit passing "random" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create buffer "seed" of decimal value "8" bytes. Set buffer "seed" to hex value "1122". Call B_RandomUpdate passing "random" and address of first initialized byte in "seed" and length of initialized bytes in "seed" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-1 Note: Generate random input data, encrypt it, decrypt that Note: output and Note: compare the decryption result with the original input. Do Note: this with Note: various round counts and word sizes. Create buffer "input" of decimal value "300" bytes. Create buffer "inputLen" of decimal value "2" bytes. Create buffer "output" of decimal value "300" bytes. Baldwin Informational, Expires 12/25/1999 2192 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Create buffer "unput" of decimal value "300" bytes. Create buffer "initVector" of decimal value "8" bytes. Create buffer "keyData" of decimal value "256" bytes. Create buffer "keyLen" of decimal value "2" bytes. Create buffer "rounds" of decimal value "2" bytes. Create buffer "wordSize" of decimal value "2" bytes. Create buffer "wordIncrement" of decimal value "2" bytes. Set buffer "wordSize" to hex value "10". Set buffer "wordIncrement" to hex value "10". Note: The maximum outer loop count is 3. It changes the word Note: size. Note: As of Oct. 25, 1995, BSAFE 3.0 only accepts a word size Note: of 32. Increment buffer "wordSize" by contents of buffer "wordIncrement". Begin a loop of decimal value "1" iterations. Set buffer "rounds" to hex value "00". Note: The inner loop is for round count. Begin a loop of decimal value "15" iterations. Set buffer "keyLen" to hex value "00". Note: The inner-inner loop is for key length. Set buffer "inputLen" to hex value "00". Begin a loop of decimal value "15" iterations. Note: Generate random input bytes, a random init vector, and a Note: random key. Increment buffer "inputLen" by decimal value "1". Set "_OutputLen" to contents of buffer "inputLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "input" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "input" by "_OutputLen". Finalize "input". Set "_OutputLen" to decimal value "8". Call B_GenerateRandomBytes passing "random" and address of next free byte in "initVector" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "initVector" by "_OutputLen". Finalize "initVector". Baldwin Informational, Expires 12/25/1999 2193 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display buffer "keyLen". Set "_OutputLen" to contents of buffer "keyLen". Call B_GenerateRandomBytes passing "random" and address of next free byte in "keyData" and "_OutputLen" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of "keyData" by "_OutputLen". Finalize "keyData". Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "key" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObj". Call B_CreateAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad" initialized from "10", contents of buffer "rounds", contents of buffer "wordSize", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "encryptObj" and "AI_RC5_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObj" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObj" and address of next Baldwin Informational, Expires 12/25/1999 2194 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Note: Decrypt. Create algorithm object "decryptObj". Call B_CreateAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBCPad" initialized from "10", contents of buffer "rounds", contents of buffer "wordSize", contents of buffer "initVector". Call B_SetAlgorithmInfo passing "decryptObj" and "AI_RC5_CBCPad" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObj" and "key" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and address of first initialized byte in buffer "output" and length of initialized bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Call B_DecryptFinal passing "decryptObj" and address of next free byte in buffer "unput" and address of "_OutputLen" and length of free bytes in buffer "unput" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "unput" by "_OutputLen". Finalize buffer "unput". Note: Check the result. Check equality of buffer "input" with contents of buffer "unput". Baldwin Informational, Expires 12/25/1999 2195 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Destroy the key, encryption and decryption objects. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "encryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyAlgorithmObject passing "decryptObj". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Use a larger key. Increment buffer "keyLen" by decimal value "16". End the loop and display execution times. Increment buffer "rounds" by decimal value "16". End the loop and display execution times. Increment buffer "wordSize" by contents of buffer "wordIncrement". Increment buffer "wordIncrement" by decimal value "16". End the loop and display execution times. Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TQRC502". This is the start of test case "TVDESWK". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Test vectors for DES weak key. Note: KI_DES8Strong and KI_DES24Strong Note: 01 01 01 01 01 01 01 01 Note: FE FE FE FE FE FE FE FE Note: 1F 1F 1F 1F 1F 1F 1F 1F Note: E0 E0 E0 E0 E0 E0 E0 E0 Note: /* semi-weak keys */ Note: 01 FE 01 FE 01 FE 01 FE Note: FE 01 FE 01 FE 01 FE 01 Note: 1F E0 1F E0 0E F1 0E F1 Note: E0 1F E0 1F F1 0E F1 0E Note: 01 E0 01 E0 01 F1 01 F1 Note: E0 01 E0 01 F1 01 F1 01 Baldwin Informational, Expires 12/25/1999 2196 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: 1F FE 1F FE 0E FE 0E FE Note: FE 1F FE 1F FE 0E FE 0E Note: 01 1F 01 1F 01 0E 01 0E Note: 1F 01 1F 01 0E 01 0E 01 Note: E0 FE E0 FE F1 FE F1 FE Note: FE E0 FE E0 FE F1 FE F1 Note: ------------------------------------------------------- Note: Setup Key object Create buffer "keydata" of decimal value "8" bytes. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-0: Test the DES weak key and semi-weak key for Note: KI_DES8Strong Set buffer "keydata" to hex value "FEFEFEFEFEFEFEFE". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "0101010101010101". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FEFEFEFEFEFEFEFE". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1F1F1F1F1F1F1F1F". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 2197 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E0E0E0E0E0E0E0E0". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "01FE01FE01FE01FE". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FE01FE01FE01FE01". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1FE01FE00EF10EF1". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E01FE01FF10EF10E". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 2198 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "01E001E001F101F1". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E001E001F101F101". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1FFE1FFE0EFE0EFE". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FE1FFE1FFE0EFE0E". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "011F011F010E010E". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2199 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keydata" to hex value "1F011F010E010E01". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E0FEE0FEF1FEF1FE". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FEE0FEE0FEF1FEF1". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-1: Set with KI_DES8Strong and get with other KI_ Set buffer "keydata" to hex value "12345678901a1b1c". Set "_InfoPointer" to address of info structure for "KI_DES8Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES8Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8Strong" initialized from "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Check equality of info structure for "KI_DES8Strong" with expected info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2200 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES_BSAFE1" initialized from "42560400312e300042430100024241010020424c020000004b5608001334577 9911a1a1c4d410800d19af2de03e676c43000534552534146". Set "_InfoPointer" to address of info structure for "KI_DES_BSAFE1". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES_BSAFE1". Check equality of info structure for "KI_DES_BSAFE1" with expected info structure for "KI_DES_BSAFE1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-2: Set with KI_8Byte and get with other KI_ Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2201 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES_BSAFE1" initialized from "42560400312e300042430100024241010020424c020000004b5608001334577 9911a1a1c4d410800d19af2de03e676c43000534552534146". Set "_InfoPointer" to address of info structure for "KI_DES_BSAFE1". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES_BSAFE1". Check equality of info structure for "KI_DES_BSAFE1" with expected info structure for "KI_DES_BSAFE1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2202 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8Strong" initialized from "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Check equality of info structure for "KI_DES8Strong" with expected info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-3: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES_BSAFE1, KI_DES8 and KI_DES8Strong since the 8byte Note: is not parity Note: adjust Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "12345678901a1b1c". Set "_InfoPointer" to address of info structure for "KI_8Byte". Baldwin Informational, Expires 12/25/1999 2203 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "12345678901a1b1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Set "_InfoPointer" to address of info structure for "KI_DES_BSAFE1". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES_BSAFE1". Display info structure for "KI_DES_BSAFE1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Display info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2204 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Case 1-4: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "0101010101010101". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "0101010101010101". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "0101010101010101". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "0101010101010101". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info Baldwin Informational, Expires 12/25/1999 2205 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 structure for "KI_DES_BSAFE1" initialized from "42560400312e300042430100024241010020424c020000004b5608000101010 1010101014d410800c3afa4a693fd6d263000534552534146". Set "_InfoPointer" to address of info structure for "KI_DES_BSAFE1". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES_BSAFE1". Check equality of info structure for "KI_DES_BSAFE1" with expected info structure for "KI_DES_BSAFE1". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-5: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FEFEFEFEFEFEFEFE". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "FEFEFEFEFEFEFEFE". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected Baldwin Informational, Expires 12/25/1999 2206 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "FEFEFEFEFEFEFEFE". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "FEFEFEFEFEFEFEFE". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-6: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1F1F1F1F1F1F1F1F". Baldwin Informational, Expires 12/25/1999 2207 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "1F1F1F1F1F1F1F1F". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "1F1F1F1F1F1F1F1F". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "1F1F1F1F1F1F1F1F". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2208 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-7: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E0E0E0E0E0E0E0E0". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "E0E0E0E0E0E0E0E0". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "E0E0E0E0E0E0E0E0". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "E0E0E0E0E0E0E0E0". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2209 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-8: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "01FE01FE01FE01FE". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "01FE01FE01FE01FE". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "01FE01FE01FE01FE". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected Baldwin Informational, Expires 12/25/1999 2210 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "01FE01FE01FE01FE". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-9: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FE01FE01FE01FE01". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "FE01FE01FE01FE01". Set "_InfoPointer" to address of info structure for "KI_8Byte". Baldwin Informational, Expires 12/25/1999 2211 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "FE01FE01FE01FE01". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "FE01FE01FE01FE01". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-10: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2212 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1FE01FE00EF10EF1". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "1FE01FE00EF10EF1". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "1FE01FE00EF10EF1". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "1FE01FE00EF10EF1". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2213 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-11: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E01FE01FF10EF10E". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "E01FE01FF10EF10E". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "E01FE01FF10EF10E". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "E01FE01FF10EF10E". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected Baldwin Informational, Expires 12/25/1999 2214 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-12: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "01E001E001F101F1". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "01E001E001F101F1". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "01E001E001F101F1". Set "_InfoPointer" to address of info structure for "KI_Item". Baldwin Informational, Expires 12/25/1999 2215 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "01E001E001F101F1". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-13: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E001E001F101F101". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2216 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "E001E001F101F101". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "E001E001F101F101". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "E001E001F101F101". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-14: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Baldwin Informational, Expires 12/25/1999 2217 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1FFE1FFE0EFE0EFE". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "1FFE1FFE0EFE0EFE". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "1FFE1FFE0EFE0EFE". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "1FFE1FFE0EFE0EFE". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Baldwin Informational, Expires 12/25/1999 2218 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-15: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FE1FFE1FFE0EFE0E". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "FE1FFE1FFE0EFE0E". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "FE1FFE1FFE0EFE0E". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "FE1FFE1FFE0EFE0E". Set "_InfoPointer" to address of info structure for "KI_DES8". Baldwin Informational, Expires 12/25/1999 2219 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-16: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "011F011F010E010E". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "011F011F010E010E". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2220 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "011F011F010E010E". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "011F011F010E010E". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-17: Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1F011F010E010E01". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2221 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "1F011F010E010E01". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "1F011F010E010E01". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "1F011F010E010E01". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-18: Set with KI_8Byte and expect error when trying Note: to get with Baldwin Informational, Expires 12/25/1999 2222 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E0FEE0FEF1FEF1FE". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "E0FEE0FEF1FEF1FE". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "E0FEE0FEF1FEF1FE". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "E0FEE0FEF1FEF1FE". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Baldwin Informational, Expires 12/25/1999 2223 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 1-19 Set with KI_8Byte and expect error when trying Note: to get with Note: KI_DES8Strong since the 8byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FEE0FEE0FEF1FEF1". Set "_InfoPointer" to address of info structure for "KI_8Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_8Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_8Byte" initialized from "FEE0FEE0FEF1FEF1". Set "_InfoPointer" to address of info structure for "KI_8Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_8Byte". Check equality of info structure for "KI_8Byte" with expected info structure for "KI_8Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "FEE0FEE0FEF1FEF1". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2224 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES8" initialized from "FEE0FEE0FEF1FEF1". Set "_InfoPointer" to address of info structure for "KI_DES8". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8". Check equality of info structure for "KI_DES8" with expected info structure for "KI_DES8". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES8Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES8Strong". Display info structure for "KI_DES8Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-0: Test the DES weak key and semi-weak key for Note: KI_DES24Strong Create buffer "keydata" of decimal value "24" bytes. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FEFEFEFEFEFEFEFE12345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "010101010101010112345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for Baldwin Informational, Expires 12/25/1999 2225 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FEFEFEFEFEFEFEFE12345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1F1F1F1F1F1F1F1F12345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E0E0E0E0E0E0E0E012345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "01FE01FE01FE01FE12345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FE01FE01FE01FE0112345678901a1 b1c12345678901a1b1c". Baldwin Informational, Expires 12/25/1999 2226 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1FE01FE00EF10EF112345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E01FE01FF10EF10E12345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "01E001E001F101F112345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E001E001F101F10112345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2227 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keydata" to hex value "1FFE1FFE0EFE0EFE12345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FE1FFE1FFE0EFE0E12345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "011F011F010E010E12345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1F011F010E010E0112345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E0FEE0FEF1FEF1FE12345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2228 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FEE0FEE0FEF1FEF112345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-1: Set with KI_DES24Strong and get with other KI_ Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1c12345678901a1b1c". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES24Strong" initialized from "13345779911a1a1c13345779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Check equality of info structure for "KI_DES24Strong" with expected info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "13345779911a1a1c1334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "13345779911a1a1c133457 79911a1a1c13345779911a1a1c". Baldwin Informational, Expires 12/25/1999 2229 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "13345779911a1a1c", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-2: Set with KI_24Byte and get with other KI_ Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "13345779911a1a1c13345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "13345779911a1a1c1334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2230 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "13345779911a1a1c133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "13345779911a1a1c", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DES24Strong" initialized from "13345779911a1a1c13345779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Check equality of info structure for "KI_DES24Strong" with expected info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-3: Set with KI_24Byte and expect error when trying Note: to get with Note: KI_DESX and KI_DES24Strong since the 8byte is not parity Note: adjust Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2231 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c13345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "12345678901a1b1c1334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "12345678901a1b1c133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Display info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_WRONG_KEY_INFO". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2232 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-4: Set with KI_24Byte and expect error when trying Note: to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "010101010101010113345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "01010101010101011334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "0101010101010101133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "0101010101010101", Baldwin Informational, Expires 12/25/1999 2233 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-5: Set with KI_24Byte and expect error when trying Note: to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FEFEFEFEFEFEFEFE13345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "FEFEFEFEFEFEFEFE1334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Baldwin Informational, Expires 12/25/1999 2234 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "FEFEFEFEFEFEFEFE133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "FEFEFEFEFEFEFEFE", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-6: Set with KI_24Byte and expect error when trying Note: to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2235 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keydata" to hex value "1F1F1F1F1F1F1F1F13345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "1F1F1F1F1F1F1F1F1334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "1F1F1F1F1F1F1F1F133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "1F1F1F1F1F1F1F1F", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2236 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-7: Set with KI_24Byte and expect error when trying Note: to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E0E0E0E0E0E0E0E013345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "E0E0E0E0E0E0E0E01334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "E0E0E0E0E0E0E0E0133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info Baldwin Informational, Expires 12/25/1999 2237 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 structure for "KI_DESX" initialized from "E0E0E0E0E0E0E0E0", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-8: Set with KI_24Byte and expect error when trying Note: to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "01FE01FE01FE01FE13345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "01FE01FE01FE01FE1334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected Baldwin Informational, Expires 12/25/1999 2238 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "01FE01FE01FE01FE133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "01FE01FE01FE01FE", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-9: Set with KI_24Byte and expect error when trying Note: to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2239 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keydata" to hex value "FE01FE01FE01FE0113345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "FE01FE01FE01FE011334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "FE01FE01FE01FE01133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "FE01FE01FE01FE01", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Baldwin Informational, Expires 12/25/1999 2240 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-10: Set with KI_24Byte and expect error when Note: trying to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1FE01FE00EF10EF113345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "1FE01FE00EF10EF11334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "1FE01FE00EF10EF1133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2241 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "1FE01FE00EF10EF1", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-11: Set with KI_24Byte and expect error when Note: trying to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E01FE01FF10EF10E13345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "E01FE01FF10EF10E1334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Baldwin Informational, Expires 12/25/1999 2242 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "E01FE01FF10EF10E133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "E01FE01FF10EF10E", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-12: Set with KI_24Byte and expect error when Note: trying to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2243 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "01E001E001F101F113345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "01E001E001F101F11334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "01E001E001F101F1133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "01E001E001F101F1", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Baldwin Informational, Expires 12/25/1999 2244 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-13: Set with KI_24Byte and expect error when Note: trying to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E001E001F101F10113345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "E001E001F101F1011334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "E001E001F101F101133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2245 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "E001E001F101F101", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-14: Set with KI_24Byte and expect error when Note: trying to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1FFE1FFE0EFE0EFE13345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "1FFE1FFE0EFE0EFE1334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and Baldwin Informational, Expires 12/25/1999 2246 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "1FFE1FFE0EFE0EFE133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "1FFE1FFE0EFE0EFE", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-15: Set with KI_24Byte and expect error when Note: trying to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2247 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FE1FFE1FFE0EFE0E13345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "FE1FFE1FFE0EFE0E1334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "FE1FFE1FFE0EFE0E133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "FE1FFE1FFE0EFE0E", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and Baldwin Informational, Expires 12/25/1999 2248 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-16: Set with KI_24Byte and expect error when Note: trying to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "011F011F010E010E13345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "011F011F010E010E1334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "011F011F010E010E133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2249 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "011F011F010E010E", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-17: Set with KI_24Byte and expect error when Note: trying to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1F011F010E010E0113345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "1F011F010E010E011334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Baldwin Informational, Expires 12/25/1999 2250 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "1F011F010E010E01133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "1F011F010E010E01", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-18: Set with KI_24Byte and expect error when Note: trying to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Baldwin Informational, Expires 12/25/1999 2251 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "E0FEE0FEF1FEF1FE13345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "E0FEE0FEF1FEF1FE1334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "E0FEE0FEF1FEF1FE133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "E0FEE0FEF1FEF1FE", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Baldwin Informational, Expires 12/25/1999 2252 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 2-19: Set with KI_24Byte and expect error when Note: trying to get with Note: KI_DES24Strong since the 24byte is DES weak key Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "FEE0FEE0FEF1FEF113345779911a1 a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_24Byte" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_24Byte" initialized from "FEE0FEE0FEF1FEF11334 5779911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_24Byte". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_24Byte". Check equality of info structure for "KI_24Byte" with expected info structure for "KI_24Byte". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_Item" initialized from "FEE0FEE0FEF1FEF1133457 79911a1a1c13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_Item". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_Item". Check equality of info structure for "KI_Item" with expected info structure for "KI_Item". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2253 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedInfoPointer" to address of expected info structure for "KI_DESX" initialized from "FEE0FEE0FEF1FEF1", "13345779911a1a1c", "13345779911a1a1c". Set "_InfoPointer" to address of info structure for "KI_DESX". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DESX". Check equality of info structure for "KI_DESX" with expected info structure for "KI_DESX". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong". Call B_GetKeyInfo passing "_InfoPointer" and "key" and "KI_DES24Strong". Display info structure for "KI_DES24Strong". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DestroyKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 3: Test the DES weak key and semi-weak key for Note: KI_DES24Strong Create key object "key". Call B_CreateKeyObject passing "key". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1cFEFEFEFEFEFEF EFE12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c0101010101010 10112345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Baldwin Informational, Expires 12/25/1999 2254 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1cFEFEFEFEFEFEF EFE12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c1F1F1F1F1F1F1 F1F12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1cE0E0E0E0E0E0E 0E012345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c01FE01FE01FE0 1FE12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1cFE01FE01FE01F Baldwin Informational, Expires 12/25/1999 2255 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 E0112345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c1FE01FE00EF10 EF112345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1cE01FE01FF10EF 10E12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c01E001E001F10 1F112345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1cE001E001F101F 10112345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2256 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keydata" to hex value "12345678901a1b1c1FFE1FFE0EFE0 EFE12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1cFE1FFE1FFE0EF E0E12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c011F011F010E0 10E12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c1F011F010E010 E0112345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1cE0FEE0FEF1FEF 1FE12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2257 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1cFEE0FEE0FEF1F EF112345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Case 4: Test the DES weak key and semi-weak key for Note: KI_DES24Strong Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1cFEFEFEFEFEFEFEFE". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1c0101010101010101". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1cFEFEFEFEFEFEFEFE". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1c1F1F1F1F1F1F1F1F". Set "_ExpectedStatus" to "BE_KEY_WEAK". Baldwin Informational, Expires 12/25/1999 2258 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1cE0E0E0E0E0E0E0E0". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1c01FE01FE01FE01FE". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1cFE01FE01FE01FE01". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "1FE01FE00EF10EF112345678901a1 b1c12345678901a1b1c". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 Baldwin Informational, Expires 12/25/1999 2259 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 b1cE01FE01FF10EF10E". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1c01E001E001F101F1". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1cE001E001F101F101". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1c1FFE1FFE0EFE0EFE". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1cFE1FFE1FFE0EFE0E". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2260 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1c011F011F010E010E". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1c1F011F010E010E01". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1cE0FEE0FEF1FEF1FE". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set buffer "keydata" to hex value "12345678901a1b1c12345678901a1 b1cFEE0FEE0FEF1FEF1". Set "_ExpectedStatus" to "BE_KEY_WEAK". Set "_InfoPointer" to address of info structure for "KI_DES24Strong" initialized from contents of buffer "keydata". Call B_SetKeyInfo passing "key" and "KI_DES24Strong" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. This is the end of test case "TVDESWK". Baldwin Informational, Expires 12/25/1999 2261 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 This is the start of test case "TVRC501". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, RC5 encryption Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RC5_CBC_ENCRYPT", "NULL_PTR". Note: Test 01-1 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 encryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "0000000000000000". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "21a5dbee154b8f6d". Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "00000000000000000000000000000000". Call B_SetKeyInfo passing "encryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RC5_CBC" and "_InfoPointer". Baldwin Informational, Expires 12/25/1999 2262 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-2 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 encryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "21a5dbee154b8f6d". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "f7c013ac5b2b8952". Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Baldwin Informational, Expires 12/25/1999 2263 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "915f4619be41b2516355a50110a9ce91". Call B_SetKeyInfo passing "encryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Baldwin Informational, Expires 12/25/1999 2264 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-3 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 encryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "f7c013ac5b2b8952". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "2f42b3b70369fc92". Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "783348e75aeb0f2fd7b169bb8dc16787". Call B_SetKeyInfo passing "encryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of Baldwin Informational, Expires 12/25/1999 2265 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-4 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 encryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "2f42b3b70369fc92". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "65c178b284d197cc". Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "dc49db1375a5584f6485b413b5f12baf". Call B_SetKeyInfo passing "encryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2266 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 01-5 Baldwin Informational, Expires 12/25/1999 2267 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 encryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "65c178b284d197cc". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "eb44e415da319824". Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "5269f149d41ba0152497574d7f153125". Call B_SetKeyInfo passing "encryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "12", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Baldwin Informational, Expires 12/25/1999 2268 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVRC501". This is the start of test case "TVRC502". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, RC5 encryption Note: The "true" answers are taken from the reference code by Note: Ron Rivest. Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RC5_CBC_ENCRYPT", "AM_RC5_CBC_DECRYPT", "NULL_PTR". Note: Test 02-1 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 encryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "0000000000000000". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "7a7bba4d79111d1e". Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Baldwin Informational, Expires 12/25/1999 2269 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized fromd1e". Call B_SetKeyInfo passing "encryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "0", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Baldwin Informational, Expires 12/25/1999 2270 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-2 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 encryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "0000000000000000". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "2f759fe7ad86a378". Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "11". Call B_SetKeyInfo passing "encryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "1", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2271 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-3 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 decryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "0000000000000000". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "868445b287eee2e1". Create key object "decryptKey". Call B_CreateKeyObject passing "decryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from2e1". Call B_SetKeyInfo passing "decryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Baldwin Informational, Expires 12/25/1999 2272 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set "_ExpectedStatus" to zero. Note: Decrypt. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "0", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 02-4 Baldwin Informational, Expires 12/25/1999 2273 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 decryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "0000000000000000". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "574ad72dd82711be". Create key object "decryptKey". Call B_CreateKeyObject passing "decryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from "11". Call B_SetKeyInfo passing "decryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Decrypt. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "1", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2274 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- This is the end of test case "TVRC502". This is the start of test case "TVRC503". Set "_ExpectedStatus" to zero. Set "_Chooser" to "NULL_PTR". Set "_SurrenderContext" to "NULL_PTR". Note: Vector tests, RC5 encryption Note: The "true" answers are taken from the reference code by Note: Ron Rivest. Note: ---------------------------------------------------------- Note: ---------- Note: Start with the GlobalInit Set "_Chooser" to "AM_RC5_CBC_ENCRYPT", "AM_RC5_CBC_DECRYPT", "NULL_PTR". Note: Test 03-1 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 encryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "0000000000000000". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "eaf8dadd06927ba8". Create buffer "keyData" of decimal value "256" bytes. Baldwin Informational, Expires 12/25/1999 2275 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Set buffer "keyData" to hex value "000102030405060708090a0b0c0d0 e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2 e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4 e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6 e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8 e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacada eafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdc ecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecede eeff0f1f2f3f4f5f6f7f8f9fafbfcfd". Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "encryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "254", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next Baldwin Informational, Expires 12/25/1999 2276 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 03-2 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 encryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "42a2ad3c705e67e5". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "3e43b659614d4de2". Create buffer "keyData" of decimal value "256" bytes. Set buffer "keyData" to hex value "03060f1a4899e8a9e51405a416eb4 2af9dfa735e4cbdbca821f051b03fd79edbebcea7922be160e6ad2c6d9c0e1a8 ad76912bbf834b9c49c5918d978c1df0573ef968f0ab7c972398ccc95b1267d0 fff85aa6a44fcc4000d30c603002b58ee7b23e1775ac3cb6e8191bb85cd3e52d 985a147a3a099a5b72e05d6d57a7e73cd57d74df3fefa555685ae377d192023c 7210559d2284d053b113fee4b43daed61a3fb51d8abdb8346b0d08044d3c4eaa f051f8ffd6a31684c0c0ef25137e60f956f80852741a65941621c4139b97802d fe952639a24cbed300c6608afabd928096b363800bf81c3b4b728b3f9174c224 b1d2f6ff730c9e124444a2a0d2f2ecc8d". Create key object "encryptKey". Call B_CreateKeyObject passing "encryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "encryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2277 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Encrypt. Create algorithm object "encryptObject". Call B_CreateAlgorithmObject passing "encryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "255", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "encryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_EncryptInit passing "encryptObject" and "encryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_EncryptUpdate passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_EncryptFinal passing "encryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 03-3 Baldwin Informational, Expires 12/25/1999 2278 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 decryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "0000000000000000". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "074409b715afb3ae". Create buffer "keyData" of decimal value "256" bytes. Set buffer "keyData" to hex value "000102030405060708090a0b0c0d0 e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2 e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4 e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6 e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8 e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacada eafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdc ecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecede eeff0f1f2f3f4f5f6f7f8f9fafbfcfd". Create key object "decryptKey". Call B_CreateKeyObject passing "decryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "decryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Decrypt. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "254", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Baldwin Informational, Expires 12/25/1999 2279 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer "expectedOutput". Note: ---------------------------------------------------------- Note: ---------- Note: ---------------------------------------------------------- Note: ---------- Note: Test 03-4 Note: Given specified key data, initialization vector and input Note: data, Note: the RC5 decryption algorithm should produce a specified Note: result. Create buffer "input" of decimal value "8" bytes. Set buffer "input" to hex value "42a2ad3c705e67e5". Create buffer "output" of decimal value "8" bytes. Create buffer "expectedOutput" of decimal value "8" bytes. Set buffer "expectedOutput" to hex value "e25ecc943719ba93". Create buffer "keyData" of decimal value "256" bytes. Set buffer "keyData" to hex value "03060f1a4899e8a9e51405a416eb4 2af9dfa735e4cbdbca821f051b03fd79edbebcea7922be160e6ad2c6d9c0e1a8 ad76912bbf834b9c49c5918d978c1df0573ef968f0ab7c972398ccc95b1267d0 fff85aa6a44fcc4000d30c603002b58ee7b23e1775ac3cb6e8191bb85cd3e52d 985a147a3a099a5b72e05d6d57a7e73cd57d74df3fefa555685ae377d192023c 7210559d2284d053b113fee4b43daed61a3fb51d8abdb8346b0d08044d3c4eaa f051f8ffd6a31684c0c0ef25137e60f956f80852741a65941621c4139b97802d fe952639a24cbed300c6608afabd928096b363800bf81c3b4b728b3f9174c224 b1d2f6ff730c9e124444a2a0d2f2ecc8d". Create key object "decryptKey". Baldwin Informational, Expires 12/25/1999 2280 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 Call B_CreateKeyObject passing "decryptKey". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "KI_Item" initialized from contents of buffer "keyData". Call B_SetKeyInfo passing "decryptKey" and "KI_Item" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Note: Decrypt. Create algorithm object "decryptObject". Call B_CreateAlgorithmObject passing "decryptObject". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Set "_InfoPointer" to address of info structure for "AI_RC5_CBC" initialized from "10", "255", "32", "0000000000000000". Call B_SetAlgorithmInfo passing "decryptObject" and "AI_RC5_CBC" and "_InfoPointer". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call Call B_DecryptInit passing "decryptObject" and "decryptKey" and "_Chooser" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Call B_DecryptUpdate passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and address of first initialized byte in buffer "input" and length of initialized bytes in buffer "input" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Call B_DecryptFinal passing "decryptObject" and address of next free byte in buffer "output" and address of "_OutputLen" and length of free bytes in buffer "output" and "NULL_PTR" and "_SurrenderContext". Set "_Status" to return value. Check equality of "_Status" with "_ExpectedStatus". Set "_ExpectedStatus" to zero. Increment length of buffer "output" by "_OutputLen". Finalize buffer "output". Display buffer "output". Check equality of buffer "output" with contents of buffer Baldwin Informational, Expires 12/25/1999 2281 draft-baldwin-bsafe-test-00.txt TESTING BSAFE June 1999 "expectedOutput". Baldwin Informational, Expires 12/25/1999 2282