mirror of
https://github.com/apple/swift-crypto
synced 2026-11-22 04:30:39 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f95b4d033 | ||
|
|
a53a7e8f85 | ||
|
|
8dafe0fdce | ||
|
|
e2dd5a547b |
No files matched your search
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../../.PrivacyInfo.xcprivacy
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../../.PrivacyInfo.xcprivacy
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -19,44 +19,128 @@
|
||||
protocol HashFunctionImplementationDetails: HashFunction where Digest: DigestPrivate {}
|
||||
|
||||
protocol BoringSSLBackedHashFunction: HashFunctionImplementationDetails {
|
||||
static var digestType: DigestContext.DigestType { get }
|
||||
associatedtype Context
|
||||
static var digestSize: Int { get }
|
||||
static func initialize() -> Context?
|
||||
static func update(_ context: inout Context, data: UnsafeRawBufferPointer) -> Bool
|
||||
static func finalize(_ context: inout Context, digest: UnsafeMutableRawBufferPointer) -> Bool
|
||||
}
|
||||
|
||||
extension Insecure.MD5: BoringSSLBackedHashFunction {
|
||||
static var digestType: DigestContext.DigestType {
|
||||
.md5
|
||||
static var digestSize: Int {
|
||||
Int(MD5_DIGEST_LENGTH)
|
||||
}
|
||||
|
||||
static func initialize() -> MD5_CTX? {
|
||||
var context = MD5_CTX()
|
||||
guard CCryptoBoringSSL_MD5_Init(&context) == 1 else {
|
||||
return nil
|
||||
}
|
||||
return context
|
||||
}
|
||||
|
||||
static func update(_ context: inout MD5_CTX, data: UnsafeRawBufferPointer) -> Bool {
|
||||
CCryptoBoringSSL_MD5_Update(&context, data.baseAddress, data.count) == 1
|
||||
}
|
||||
|
||||
static func finalize(_ context: inout MD5_CTX, digest: UnsafeMutableRawBufferPointer) -> Bool {
|
||||
CCryptoBoringSSL_MD5_Final(digest.baseAddress, &context) == 1
|
||||
}
|
||||
}
|
||||
|
||||
extension Insecure.SHA1: BoringSSLBackedHashFunction {
|
||||
static var digestType: DigestContext.DigestType {
|
||||
.sha1
|
||||
static var digestSize: Int {
|
||||
Int(SHA_DIGEST_LENGTH)
|
||||
}
|
||||
|
||||
static func initialize() -> SHA_CTX? {
|
||||
var context = SHA_CTX()
|
||||
guard CCryptoBoringSSL_SHA1_Init(&context) == 1 else {
|
||||
return nil
|
||||
}
|
||||
return context
|
||||
}
|
||||
|
||||
static func update(_ context: inout SHA_CTX, data: UnsafeRawBufferPointer) -> Bool {
|
||||
CCryptoBoringSSL_SHA1_Update(&context, data.baseAddress, data.count) == 1
|
||||
}
|
||||
|
||||
static func finalize(_ context: inout SHA_CTX, digest: UnsafeMutableRawBufferPointer) -> Bool {
|
||||
CCryptoBoringSSL_SHA1_Final(digest.baseAddress, &context) == 1
|
||||
}
|
||||
}
|
||||
|
||||
extension SHA256: BoringSSLBackedHashFunction {
|
||||
static var digestType: DigestContext.DigestType {
|
||||
.sha256
|
||||
static var digestSize: Int {
|
||||
Int(SHA256_DIGEST_LENGTH)
|
||||
}
|
||||
|
||||
static func initialize() -> SHA256_CTX? {
|
||||
var context = SHA256_CTX()
|
||||
guard CCryptoBoringSSL_SHA256_Init(&context) == 1 else {
|
||||
return nil
|
||||
}
|
||||
return context
|
||||
}
|
||||
|
||||
static func update(_ context: inout SHA256_CTX, data: UnsafeRawBufferPointer) -> Bool {
|
||||
CCryptoBoringSSL_SHA256_Update(&context, data.baseAddress, data.count) == 1
|
||||
}
|
||||
|
||||
static func finalize(_ context: inout SHA256_CTX, digest: UnsafeMutableRawBufferPointer) -> Bool {
|
||||
CCryptoBoringSSL_SHA256_Final(digest.baseAddress, &context) == 1
|
||||
}
|
||||
}
|
||||
|
||||
extension SHA384: BoringSSLBackedHashFunction {
|
||||
static var digestType: DigestContext.DigestType {
|
||||
.sha384
|
||||
static var digestSize: Int {
|
||||
Int(SHA384_DIGEST_LENGTH)
|
||||
}
|
||||
|
||||
static func initialize() -> SHA512_CTX? {
|
||||
var context = SHA512_CTX()
|
||||
guard CCryptoBoringSSL_SHA384_Init(&context) == 1 else {
|
||||
return nil
|
||||
}
|
||||
return context
|
||||
}
|
||||
|
||||
static func update(_ context: inout SHA512_CTX, data: UnsafeRawBufferPointer) -> Bool {
|
||||
CCryptoBoringSSL_SHA384_Update(&context, data.baseAddress, data.count) == 1
|
||||
}
|
||||
|
||||
static func finalize(_ context: inout SHA512_CTX, digest: UnsafeMutableRawBufferPointer) -> Bool {
|
||||
CCryptoBoringSSL_SHA384_Final(digest.baseAddress, &context) == 1
|
||||
}
|
||||
}
|
||||
|
||||
extension SHA512: BoringSSLBackedHashFunction {
|
||||
static var digestType: DigestContext.DigestType {
|
||||
.sha512
|
||||
static var digestSize: Int {
|
||||
Int(SHA512_DIGEST_LENGTH)
|
||||
}
|
||||
|
||||
static func initialize() -> SHA512_CTX? {
|
||||
var context = SHA512_CTX()
|
||||
guard CCryptoBoringSSL_SHA512_Init(&context) == 1 else {
|
||||
return nil
|
||||
}
|
||||
return context
|
||||
}
|
||||
|
||||
static func update(_ context: inout SHA512_CTX, data: UnsafeRawBufferPointer) -> Bool {
|
||||
CCryptoBoringSSL_SHA512_Update(&context, data.baseAddress, data.count) == 1
|
||||
}
|
||||
|
||||
static func finalize(_ context: inout SHA512_CTX, digest: UnsafeMutableRawBufferPointer) -> Bool {
|
||||
CCryptoBoringSSL_SHA512_Final(digest.baseAddress, &context) == 1
|
||||
}
|
||||
}
|
||||
|
||||
struct OpenSSLDigestImpl<H: BoringSSLBackedHashFunction> {
|
||||
private var context: DigestContext
|
||||
private var context: DigestContext<H>
|
||||
|
||||
init() {
|
||||
self.context = DigestContext(digest: H.digestType)
|
||||
self.context = DigestContext()
|
||||
}
|
||||
|
||||
internal mutating func update(data: UnsafeRawBufferPointer) {
|
||||
@@ -67,81 +151,49 @@ struct OpenSSLDigestImpl<H: BoringSSLBackedHashFunction> {
|
||||
}
|
||||
|
||||
internal func finalize() -> H.Digest {
|
||||
// To have a non-destructive finalize operation we must allocate.
|
||||
let copyContext = DigestContext(copying: self.context)
|
||||
let digestBytes = copyContext.finalize()
|
||||
return digestBytes.withUnsafeBytes {
|
||||
// We force unwrap here because if the digest size is wrong it's an internal error.
|
||||
H.Digest(bufferPointer: $0)!
|
||||
}
|
||||
self.context.finalize()
|
||||
}
|
||||
}
|
||||
|
||||
class DigestContext {
|
||||
private var contextPointer: UnsafeMutablePointer<EVP_MD_CTX>
|
||||
fileprivate final class DigestContext<H: BoringSSLBackedHashFunction> {
|
||||
private var context: H.Context
|
||||
|
||||
init(digest: DigestType) {
|
||||
// We force unwrap because we cannot recover from allocation failure.
|
||||
self.contextPointer = CCryptoBoringSSL_EVP_MD_CTX_new()!
|
||||
guard CCryptoBoringSSL_EVP_DigestInit(self.contextPointer, digest.dispatchTable) != 0 else {
|
||||
// We can't do much but crash here.
|
||||
fatalError("Unable to initialize digest state: \(CCryptoBoringSSL_ERR_get_error())")
|
||||
init() {
|
||||
guard let contex = H.initialize() else {
|
||||
preconditionFailure("Unable to initialize digest state")
|
||||
}
|
||||
self.context = contex
|
||||
}
|
||||
|
||||
init(copying original: DigestContext) {
|
||||
// We force unwrap because we cannot recover from allocation failure.
|
||||
self.contextPointer = CCryptoBoringSSL_EVP_MD_CTX_new()!
|
||||
guard CCryptoBoringSSL_EVP_MD_CTX_copy(self.contextPointer, original.contextPointer) != 0 else {
|
||||
// We can't do much but crash here.
|
||||
fatalError("Unable to copy digest state: \(CCryptoBoringSSL_ERR_get_error())")
|
||||
}
|
||||
self.context = original.context
|
||||
}
|
||||
|
||||
func update(data: UnsafeRawBufferPointer) {
|
||||
guard let baseAddress = data.baseAddress else {
|
||||
return
|
||||
guard H.update(&self.context, data: data) else {
|
||||
preconditionFailure("Unable to update digest state")
|
||||
}
|
||||
|
||||
CCryptoBoringSSL_EVP_DigestUpdate(self.contextPointer, baseAddress, data.count)
|
||||
}
|
||||
|
||||
// This finalize function is _destructive_: do not call it if you want to reuse the object!
|
||||
func finalize() -> [UInt8] {
|
||||
let digestSize = CCryptoBoringSSL_EVP_MD_size(self.contextPointer.pointee.digest)
|
||||
var digestBytes = Array(repeating: UInt8(0), count: digestSize)
|
||||
var count = UInt32(digestSize)
|
||||
|
||||
digestBytes.withUnsafeMutableBufferPointer { digestPointer in
|
||||
assert(digestPointer.count == count)
|
||||
CCryptoBoringSSL_EVP_DigestFinal(self.contextPointer, digestPointer.baseAddress, &count)
|
||||
func finalize() -> H.Digest {
|
||||
var copyContext = self.context
|
||||
defer {
|
||||
withUnsafeMutablePointer(to: ©Context) { $0.zeroize() }
|
||||
}
|
||||
return withUnsafeTemporaryAllocation(byteCount: H.digestSize, alignment: 1) { digestPointer in
|
||||
defer {
|
||||
digestPointer.zeroize()
|
||||
}
|
||||
guard H.finalize(©Context, digest: digestPointer) else {
|
||||
preconditionFailure("Unable to finalize digest state")
|
||||
}
|
||||
// We force unwrap here because if the digest size is wrong it's an internal error.
|
||||
return H.Digest(bufferPointer: UnsafeRawBufferPointer(digestPointer))!
|
||||
}
|
||||
|
||||
return digestBytes
|
||||
}
|
||||
|
||||
deinit {
|
||||
CCryptoBoringSSL_EVP_MD_CTX_free(self.contextPointer)
|
||||
}
|
||||
}
|
||||
|
||||
extension DigestContext {
|
||||
struct DigestType {
|
||||
var dispatchTable: OpaquePointer
|
||||
|
||||
private init(_ dispatchTable: OpaquePointer) {
|
||||
self.dispatchTable = dispatchTable
|
||||
}
|
||||
|
||||
static let md5 = DigestType(CCryptoBoringSSL_EVP_md5())
|
||||
|
||||
static let sha1 = DigestType(CCryptoBoringSSL_EVP_sha1())
|
||||
|
||||
static let sha256 = DigestType(CCryptoBoringSSL_EVP_sha256())
|
||||
|
||||
static let sha384 = DigestType(CCryptoBoringSSL_EVP_sha384())
|
||||
|
||||
static let sha512 = DigestType(CCryptoBoringSSL_EVP_sha512())
|
||||
withUnsafeMutablePointer(to: &self.context) { $0.zeroize() }
|
||||
}
|
||||
}
|
||||
#endif // CRYPTO_IN_SWIFTPM && !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API
|
||||
@@ -1 +0,0 @@
|
||||
../../.PrivacyInfo.xcprivacy
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../../.PrivacyInfo.xcprivacy
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the SwiftCrypto open source project
|
||||
//
|
||||
// Copyright (c) 2024 Apple Inc. and the SwiftCrypto project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.md for the list of SwiftCrypto project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import Crypto
|
||||
import Foundation
|
||||
|
||||
@usableFromInline
|
||||
typealias AESCFBImpl = OpenSSLAESCFBImpl
|
||||
|
||||
extension AES {
|
||||
public enum _CFB {
|
||||
@inlinable
|
||||
public static func encrypt<Plaintext: DataProtocol>(
|
||||
_ plaintext: Plaintext,
|
||||
using key: SymmetricKey,
|
||||
iv: AES._CFB.IV
|
||||
) throws -> Data {
|
||||
let bytes: ContiguousBytes = plaintext.regions.count == 1 ? plaintext.regions.first! : Array(plaintext)
|
||||
return try AESCFBImpl.encryptOrDecrypt(.encrypt, bytes, using: key, iv: iv)
|
||||
}
|
||||
|
||||
@inlinable
|
||||
public static func decrypt<Ciphertext: DataProtocol>(
|
||||
_ ciphertext: Ciphertext,
|
||||
using key: SymmetricKey,
|
||||
iv: AES._CFB.IV
|
||||
) throws -> Data {
|
||||
let bytes: ContiguousBytes = ciphertext.regions.count == 1 ? ciphertext.regions.first! : Array(ciphertext)
|
||||
return try AESCFBImpl.encryptOrDecrypt(.decrypt, bytes, using: key, iv: iv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AES._CFB {
|
||||
public struct IV: Sendable {
|
||||
// AES CFB uses a 128-bit IV.
|
||||
private var ivBytes: (UInt64, UInt64)
|
||||
|
||||
public init() {
|
||||
var rng = SystemRandomNumberGenerator()
|
||||
self.ivBytes = (rng.next(), rng.next())
|
||||
}
|
||||
|
||||
public init<IVBytes: Collection>(ivBytes: IVBytes) throws where IVBytes.Element == UInt8 {
|
||||
guard ivBytes.count == 16 else {
|
||||
throw CryptoKitError.incorrectParameterSize
|
||||
}
|
||||
|
||||
self.ivBytes = (0, 0)
|
||||
|
||||
Swift.withUnsafeMutableBytes(of: &self.ivBytes) { bytesPtr in
|
||||
bytesPtr.copyBytes(from: ivBytes)
|
||||
}
|
||||
}
|
||||
|
||||
mutating func withUnsafeMutableBytes<ReturnType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ReturnType) rethrows -> ReturnType {
|
||||
return try Swift.withUnsafeMutableBytes(of: &self.ivBytes, body)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the SwiftCrypto open source project
|
||||
//
|
||||
// Copyright (c) 2024 Apple Inc. and the SwiftCrypto project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.md for the list of SwiftCrypto project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@_implementationOnly import CCryptoBoringSSL
|
||||
import Crypto
|
||||
import Foundation
|
||||
|
||||
@usableFromInline
|
||||
enum OpenSSLAESCFBImpl {
|
||||
@usableFromInline
|
||||
enum Mode {
|
||||
case encrypt
|
||||
case decrypt
|
||||
|
||||
@usableFromInline
|
||||
var _boringSSLParameter: Int32 {
|
||||
switch self {
|
||||
case .encrypt: return AES_ENCRYPT
|
||||
case .decrypt: return AES_DECRYPT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@inlinable
|
||||
static func encryptOrDecrypt<Plaintext: ContiguousBytes>(
|
||||
_ mode: Mode,
|
||||
_ plaintext: Plaintext,
|
||||
using key: SymmetricKey,
|
||||
iv: AES._CFB.IV
|
||||
) throws -> Data {
|
||||
guard [128, 192, 256].contains(key.bitCount) else {
|
||||
throw CryptoKitError.incorrectKeySize
|
||||
}
|
||||
return plaintext.withUnsafeBytes { plaintextBufferPtr in
|
||||
Self._encryptOrDecrypt(mode, plaintextBufferPtr, using: key, iv: iv)
|
||||
}
|
||||
}
|
||||
|
||||
@usableFromInline
|
||||
static func _encryptOrDecrypt(
|
||||
_ mode: Mode,
|
||||
_ plaintextBufferPtr: UnsafeRawBufferPointer,
|
||||
using key: SymmetricKey,
|
||||
iv: AES._CFB.IV
|
||||
) -> Data {
|
||||
var ciphertext = Data(repeating: 0, count: plaintextBufferPtr.count)
|
||||
ciphertext.withUnsafeMutableBytes { ciphertextBufferPtr in
|
||||
var iv = iv
|
||||
var num = UInt32.zero
|
||||
key.withUnsafeBytes { keyBufferPtr in
|
||||
iv.withUnsafeMutableBytes { ivBufferPtr in
|
||||
var key = AES_KEY()
|
||||
precondition(CCryptoBoringSSL_AES_set_encrypt_key(keyBufferPtr.baseAddress, UInt32(keyBufferPtr.count * 8), &key) == 0)
|
||||
CCryptoBoringSSL_AES_cfb128_encrypt(
|
||||
plaintextBufferPtr.baseAddress,
|
||||
ciphertextBufferPtr.baseAddress,
|
||||
plaintextBufferPtr.count,
|
||||
&key,
|
||||
ivBufferPtr.baseAddress,
|
||||
&num,
|
||||
mode._boringSSLParameter
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
return ciphertext
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
../../.PrivacyInfo.xcprivacy
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -83,6 +83,12 @@ extension _RSA.BlindSigning {
|
||||
}
|
||||
}
|
||||
|
||||
/// Construct a RSA public key with the specified parameters.
|
||||
public init(n: some ContiguousBytes, e: some ContiguousBytes, parameters: Parameters) throws {
|
||||
self.backing = try BackingPublicKey(n: n, e: e)
|
||||
self.parameters = parameters
|
||||
}
|
||||
|
||||
public var pkcs1DERRepresentation: Data {
|
||||
self.backing.pkcs1DERRepresentation
|
||||
}
|
||||
@@ -171,6 +177,12 @@ extension _RSA.BlindSigning {
|
||||
}
|
||||
}
|
||||
|
||||
/// Construct an RSA private key with the specified parameters.
|
||||
public init(n: some ContiguousBytes, e: some ContiguousBytes, d: some ContiguousBytes, p: some ContiguousBytes, q: some ContiguousBytes, parameters: Parameters) throws {
|
||||
self.backing = try BackingPrivateKey(n: n, e: e, d: d, p: p, q: q)
|
||||
self.parameters = parameters
|
||||
}
|
||||
|
||||
/// Randomly generate a new RSA private key of a given size.
|
||||
///
|
||||
/// This constructor will refuse to generate keys smaller than 2048 bits. Callers that want to enforce minimum
|
||||
|
||||
@@ -98,6 +98,17 @@ extension _RSA.Signing {
|
||||
}
|
||||
}
|
||||
|
||||
/// Construct an RSA public key with the specified parameters.
|
||||
///
|
||||
/// Only the BoringSSL backend provides APIs to create a key from its parameters so we first create a BoringSSL
|
||||
/// key, and then pass it to the platform-specific initializer that accepts a BoringSSL key.
|
||||
///
|
||||
/// On Darwin platforms, this will serialize it to PEM format, and then construct a platform-specific key from
|
||||
/// the PEM representation.
|
||||
public init(n: some ContiguousBytes, e: some ContiguousBytes) throws {
|
||||
self.backing = try BackingPublicKey(BoringSSLRSAPublicKey(n: n, e: e))
|
||||
}
|
||||
|
||||
public var pkcs1DERRepresentation: Data {
|
||||
self.backing.pkcs1DERRepresentation
|
||||
}
|
||||
@@ -178,6 +189,17 @@ extension _RSA.Signing {
|
||||
}
|
||||
}
|
||||
|
||||
/// Construct an RSA private key with the specified parameters.
|
||||
///
|
||||
/// Only the BoringSSL backend provides APIs to create a key from its parameters so we first create a BoringSSL
|
||||
/// key, and then pass it to the platform-specific initializer that accepts a BoringSSL key.
|
||||
///
|
||||
/// On Darwin platforms, this will serialize it to DER format, and then construct a platform-specific key from
|
||||
/// the DER representation.
|
||||
public init(n: some ContiguousBytes, e: some ContiguousBytes, d: some ContiguousBytes, p: some ContiguousBytes, q: some ContiguousBytes) throws {
|
||||
self.backing = try BackingPrivateKey(BoringSSLRSAPrivateKey(n: n, e: e, d: d, p: p, q: q))
|
||||
}
|
||||
|
||||
/// Randomly generate a new RSA private key of a given size.
|
||||
///
|
||||
/// This constructor will refuse to generate keys smaller than 2048 bits. Callers that want to enforce minimum
|
||||
@@ -444,6 +466,17 @@ extension _RSA.Encryption {
|
||||
guard self.keySizeInBits >= 1024, self.keySizeInBits % 8 == 0 else { throw CryptoKitError.incorrectParameterSize }
|
||||
}
|
||||
|
||||
/// Construct an RSA public key with the specified parameters.
|
||||
///
|
||||
/// Only the BoringSSL backend provides APIs to create a key from its parameters so we first create a BoringSSL
|
||||
/// key, and then pass it to the platform-specific initializer that accepts a BoringSSL key.
|
||||
///
|
||||
/// On Darwin platforms, this will serialize it to DER format, and then construct a platform-specific key from
|
||||
/// the DER representation.
|
||||
public init(n: some ContiguousBytes, e: some ContiguousBytes) throws {
|
||||
self.backing = try BackingPublicKey(BoringSSLRSAPublicKey(n: n, e: e))
|
||||
}
|
||||
|
||||
public var pkcs1DERRepresentation: Data { self.backing.pkcs1DERRepresentation }
|
||||
public var pkcs1PEMRepresentation: String { self.backing.pkcs1PEMRepresentation }
|
||||
public var derRepresentation: Data { self.backing.derRepresentation }
|
||||
@@ -494,6 +527,18 @@ extension _RSA.Encryption {
|
||||
guard self.keySizeInBits >= 1024, self.keySizeInBits % 8 == 0 else { throw CryptoKitError.incorrectParameterSize }
|
||||
}
|
||||
|
||||
|
||||
/// Construct an RSA private key with the specified parameters.
|
||||
///
|
||||
/// Only the BoringSSL backend provides APIs to create a key from its parameters so we first create a BoringSSL
|
||||
/// key, and then pass it to the platform-specific initializer that accepts a BoringSSL key.
|
||||
///
|
||||
/// On Darwin platforms, this will serialize it to PEM format, and then construct a platform-specific key from
|
||||
/// the PEM representation.
|
||||
public init(n: some ContiguousBytes, e: some ContiguousBytes, d: some ContiguousBytes, p: some ContiguousBytes, q: some ContiguousBytes) throws {
|
||||
self.backing = try BackingPrivateKey(BoringSSLRSAPrivateKey(n: n, e: e, d: d, p: p, q: q))
|
||||
}
|
||||
|
||||
/// Randomly generate a new RSA private key of a given size.
|
||||
///
|
||||
/// This constructor will refuse to generate keys smaller than 2048 bits. Callers that want to enforce minimum
|
||||
|
||||
@@ -29,6 +29,14 @@ internal struct BoringSSLRSAPublicKey: Sendable {
|
||||
self.backing = try Backing(derRepresentation: derRepresentation)
|
||||
}
|
||||
|
||||
init(n: some ContiguousBytes, e: some ContiguousBytes) throws {
|
||||
self.backing = try Backing(n: n, e: e)
|
||||
}
|
||||
|
||||
init(_ other: BoringSSLRSAPublicKey) throws {
|
||||
self = other
|
||||
}
|
||||
|
||||
var pkcs1DERRepresentation: Data {
|
||||
self.backing.pkcs1DERRepresentation
|
||||
}
|
||||
@@ -66,6 +74,14 @@ internal struct BoringSSLRSAPrivateKey: Sendable {
|
||||
self.backing = try Backing(derRepresentation: derRepresentation)
|
||||
}
|
||||
|
||||
init(n: some ContiguousBytes, e: some ContiguousBytes, d: some ContiguousBytes, p: some ContiguousBytes, q: some ContiguousBytes) throws {
|
||||
self.backing = try Backing(n: n, e: e, d: d, p: p, q: q)
|
||||
}
|
||||
|
||||
init(_ other: BoringSSLRSAPrivateKey) throws {
|
||||
self = other
|
||||
}
|
||||
|
||||
init(keySize: _RSA.Signing.KeySize) throws {
|
||||
self.backing = try Backing(keySize: keySize)
|
||||
}
|
||||
@@ -222,6 +238,20 @@ extension BoringSSLRSAPublicKey {
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate init(n: some ContiguousBytes, e: some ContiguousBytes) throws {
|
||||
self.pointer = CCryptoBoringSSL_EVP_PKEY_new()
|
||||
let n = try ArbitraryPrecisionInteger(bytes: n)
|
||||
let e = try ArbitraryPrecisionInteger(bytes: e)
|
||||
|
||||
// Create BoringSSL RSA key.
|
||||
guard let rsaPtr = n.withUnsafeBignumPointer({ n in
|
||||
e.withUnsafeBignumPointer { e in
|
||||
CCryptoBoringSSL_RSA_new_public_key(n, e)
|
||||
}
|
||||
}) else { throw CryptoKitError.internalBoringSSLError() }
|
||||
CCryptoBoringSSL_EVP_PKEY_assign_RSA(self.pointer, rsaPtr)
|
||||
}
|
||||
|
||||
fileprivate var pkcs1DERRepresentation: Data {
|
||||
return BIOHelper.withWritableMemoryBIO { bio in
|
||||
let rsaPublicKey = CCryptoBoringSSL_EVP_PKEY_get0_RSA(self.pointer)
|
||||
@@ -486,6 +516,43 @@ extension BoringSSLRSAPrivateKey {
|
||||
CCryptoBoringSSL_EVP_PKEY_assign_RSA(self.pointer, rsaPrivateKey)
|
||||
}
|
||||
|
||||
|
||||
fileprivate init(n: some ContiguousBytes, e: some ContiguousBytes, d: some ContiguousBytes, p: some ContiguousBytes, q: some ContiguousBytes) throws {
|
||||
self.pointer = CCryptoBoringSSL_EVP_PKEY_new()
|
||||
let n = try ArbitraryPrecisionInteger(bytes: n)
|
||||
let e = try ArbitraryPrecisionInteger(bytes: e)
|
||||
let d = try ArbitraryPrecisionInteger(bytes: d)
|
||||
let p = try ArbitraryPrecisionInteger(bytes: p)
|
||||
let q = try ArbitraryPrecisionInteger(bytes: q)
|
||||
|
||||
// Compute the CRT params.
|
||||
let dp = try FiniteFieldArithmeticContext(fieldSize: p - 1).residue(d)
|
||||
let dq = try FiniteFieldArithmeticContext(fieldSize: q - 1).residue(d)
|
||||
guard let qi = try FiniteFieldArithmeticContext(fieldSize: p).inverse(q) else {
|
||||
throw CryptoKitError.internalBoringSSLError()
|
||||
}
|
||||
|
||||
// Create BoringSSL RSA key.
|
||||
guard let rsaPtr = n.withUnsafeBignumPointer({ n in
|
||||
e.withUnsafeBignumPointer { e in
|
||||
d.withUnsafeBignumPointer { d in
|
||||
p.withUnsafeBignumPointer { p in
|
||||
q.withUnsafeBignumPointer { q in
|
||||
dp.withUnsafeBignumPointer { dp in
|
||||
dq.withUnsafeBignumPointer { dq in
|
||||
qi.withUnsafeBignumPointer { qi in
|
||||
CCryptoBoringSSL_RSA_new_private_key(n, e, d, p, q, dp, dq, qi)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}) else { throw CryptoKitError.internalBoringSSLError() }
|
||||
CCryptoBoringSSL_EVP_PKEY_assign_RSA(self.pointer, rsaPtr)
|
||||
}
|
||||
|
||||
private static func pkcs8DERPrivateKey<Bytes: ContiguousBytes>(_ derRepresentation: Bytes) -> OpaquePointer? {
|
||||
return derRepresentation.withUnsafeBytes { derPtr in
|
||||
return BIOHelper.withReadOnlyMemoryBIO(wrapping: derPtr) { bio in
|
||||
|
||||
@@ -43,6 +43,10 @@ internal struct SecurityRSAPublicKey: @unchecked Sendable {
|
||||
self.backing = unwrappedKey
|
||||
}
|
||||
|
||||
init(_ boringSSLKey: BoringSSLRSAPublicKey) throws {
|
||||
try self.init(derRepresentation: boringSSLKey.derRepresentation)
|
||||
}
|
||||
|
||||
var pkcs1DERRepresentation: Data {
|
||||
var error: Unmanaged<CFError>? = nil
|
||||
let representation = SecKeyCopyExternalRepresentation(self.backing, &error)
|
||||
@@ -135,6 +139,10 @@ internal struct SecurityRSAPrivateKey: @unchecked Sendable {
|
||||
self.backing = unwrappedKey
|
||||
}
|
||||
|
||||
init(_ boringSSLKey: BoringSSLRSAPrivateKey) throws {
|
||||
try self.init(derRepresentation: boringSSLKey.derRepresentation)
|
||||
}
|
||||
|
||||
var derRepresentation: Data {
|
||||
var error: Unmanaged<CFError>? = nil
|
||||
let representation = SecKeyCopyExternalRepresentation(self.backing, &error)
|
||||
|
||||
@@ -92,86 +92,3 @@ extension FixedWidthInteger {
|
||||
return try block(&bn)
|
||||
}
|
||||
}
|
||||
|
||||
extension _RSA.BlindSigning.PublicKey {
|
||||
/// Construct a platform-specific RSA public key with the specified parameters.
|
||||
///
|
||||
/// This constructor is used in tests in cases where test vectors provide the key information this way.
|
||||
///
|
||||
/// Only the BoringSSL backend provides APIs to create the key from its parameters so we first create a BoringSSL
|
||||
/// key, serialize it to PEM format, and then construct a platform specific key from the PEM representation.
|
||||
internal init(nHexString: String, eHexString: String, parameters: Parameters) throws {
|
||||
let n = try ArbitraryPrecisionInteger(hexString: nHexString)
|
||||
let e = try ArbitraryPrecisionInteger(hexString: eHexString)
|
||||
|
||||
// Create BoringSSL RSA key.
|
||||
guard let rsaPtr = n.withUnsafeBignumPointer({ n in
|
||||
e.withUnsafeBignumPointer { e in
|
||||
CCryptoBoringSSL_RSA_new_public_key(n, e)
|
||||
}
|
||||
}) else { throw CryptoKitError.internalBoringSSLError() }
|
||||
defer { CCryptoBoringSSL_RSA_free(rsaPtr) }
|
||||
|
||||
// Get PEM representation for key.
|
||||
let pemRepresentation = BIOHelper.withWritableMemoryBIO { bio in
|
||||
precondition(CCryptoBoringSSL_PEM_write_bio_RSAPublicKey(bio, rsaPtr) == 1)
|
||||
return try! String(copyingUTF8MemoryBIO: bio)
|
||||
}
|
||||
|
||||
// Create a key (which might be backed by Security framework) from PEM representation.
|
||||
try self.init(pemRepresentation: pemRepresentation, parameters: parameters)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extension _RSA.BlindSigning.PrivateKey {
|
||||
/// Construct a platform-specific RSA private key with the specified parameters.
|
||||
///
|
||||
/// This constructor is used in tests in cases where test vectors provide the key information this way.
|
||||
///
|
||||
/// Only the BoringSSL backend provides APIs to create the key from its parameters so we first create a BoringSSL
|
||||
/// key, serialize it to PEM format, and then construct a platform specific key from the PEM representation.
|
||||
internal init(nHexString: String, eHexString: String, dHexString: String, pHexString: String, qHexString: String, parameters: Parameters) throws {
|
||||
let n = try ArbitraryPrecisionInteger(hexString: nHexString)
|
||||
let e = try ArbitraryPrecisionInteger(hexString: eHexString)
|
||||
let d = try ArbitraryPrecisionInteger(hexString: dHexString)
|
||||
let p = try ArbitraryPrecisionInteger(hexString: pHexString)
|
||||
let q = try ArbitraryPrecisionInteger(hexString: qHexString)
|
||||
|
||||
// Compute the CRT params.
|
||||
let dp = try FiniteFieldArithmeticContext(fieldSize: p - 1).residue(d)
|
||||
let dq = try FiniteFieldArithmeticContext(fieldSize: q - 1).residue(d)
|
||||
guard let qi = try FiniteFieldArithmeticContext(fieldSize: p).inverse(q) else {
|
||||
throw CryptoKitError.internalBoringSSLError()
|
||||
}
|
||||
|
||||
// Create BoringSSL RSA key.
|
||||
guard let rsaPtr = n.withUnsafeBignumPointer({ n in
|
||||
e.withUnsafeBignumPointer { e in
|
||||
d.withUnsafeBignumPointer { d in
|
||||
p.withUnsafeBignumPointer { p in
|
||||
q.withUnsafeBignumPointer { q in
|
||||
dp.withUnsafeBignumPointer { dp in
|
||||
dq.withUnsafeBignumPointer { dq in
|
||||
qi.withUnsafeBignumPointer { qi in
|
||||
CCryptoBoringSSL_RSA_new_private_key(n, e, d, p, q, dp, dq, qi)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}) else { throw CryptoKitError.internalBoringSSLError() }
|
||||
defer { CCryptoBoringSSL_RSA_free(rsaPtr) }
|
||||
|
||||
// Get PEM representation for key.
|
||||
let pemRepresentation = BIOHelper.withWritableMemoryBIO { bio in
|
||||
precondition(CCryptoBoringSSL_PEM_write_bio_RSAPrivateKey(bio, rsaPtr, nil, nil, 0, nil, nil) == 1)
|
||||
return try! String(copyingUTF8MemoryBIO: bio)
|
||||
}
|
||||
|
||||
// Create a key (which might be backed by Security framework) from PEM representation.
|
||||
try self.init(pemRepresentation: pemRepresentation, parameters: parameters)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the SwiftCrypto open source project
|
||||
//
|
||||
// Copyright (c) 2024 Apple Inc. and the SwiftCrypto project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.md for the list of SwiftCrypto project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import Crypto
|
||||
@testable import _CryptoExtras
|
||||
import XCTest
|
||||
|
||||
final class AES_CFBTests: XCTestCase {
|
||||
/// Test vectors from NIST, of the following form:
|
||||
/// ```
|
||||
/// COUNT = 0
|
||||
/// KEY = 00000000000000000000000000000000
|
||||
/// IV = f34481ec3cc627bacd5dc3fb08f273e6
|
||||
/// PLAINTEXT = 00000000000000000000000000000000
|
||||
/// CIPHERTEXT = 0336763e966d92595a567cc9ce537f5e
|
||||
/// ```
|
||||
/// —— source: https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/block-ciphers
|
||||
struct TestVector: Codable {
|
||||
var count: Int
|
||||
var key: [UInt8]
|
||||
var iv: [UInt8]
|
||||
var plaintext: [UInt8]
|
||||
var ciphertext: [UInt8]
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case count = "COUNT"
|
||||
case key = "KEY"
|
||||
case iv = "IV"
|
||||
case plaintext = "PLAINTEXT"
|
||||
case ciphertext = "CIPHERTEXT"
|
||||
}
|
||||
}
|
||||
|
||||
func testVector(_ vector: TestVector) throws {
|
||||
let (contiguousPlaintextData, discontiguousPlaintextData) = vector.plaintext.asDataProtocols()
|
||||
for plaintextData in [contiguousPlaintextData as DataProtocol, discontiguousPlaintextData as DataProtocol] {
|
||||
let key = SymmetricKey(data: Data(vector.key))
|
||||
let iv = try AES._CFB.IV(ivBytes: vector.iv)
|
||||
let ciphertext = try AES._CFB.encrypt(plaintextData, using: key, iv: iv)
|
||||
XCTAssertEqual(ciphertext, Data(vector.ciphertext))
|
||||
}
|
||||
}
|
||||
|
||||
func testVectorsFrom(fileName: String) throws {
|
||||
var decoder = try RFCVectorDecoder(bundleType: self, fileName: fileName)
|
||||
let vectors = try decoder.decode([TestVector].self)
|
||||
for vector in vectors {
|
||||
try self.testVector(vector)
|
||||
}
|
||||
}
|
||||
|
||||
func testVectors() throws {
|
||||
try self.testVectorsFrom(fileName: "AESCFB128GFSbox128")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128GFSbox128")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128GFSbox128")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128GFSbox192")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128GFSbox256")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128KeySbox128")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128KeySbox192")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128KeySbox256")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128VarKey128")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128VarKey192")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128VarKey256")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128VarTxt128")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128VarTxt192")
|
||||
try self.testVectorsFrom(fileName: "AESCFB128VarTxt256")
|
||||
}
|
||||
|
||||
func testRoundtrip() throws {
|
||||
let key = SymmetricKey(size: .bits128)
|
||||
let plaintext = Data(SystemRandomNumberGenerator.randomBytes(count: 1024))
|
||||
let iv = AES._CFB.IV()
|
||||
let ciphertext = try AES._CFB.encrypt(plaintext, using: key, iv: iv)
|
||||
XCTAssertEqual(try AES._CFB.decrypt(ciphertext, using: key, iv: iv), plaintext)
|
||||
}
|
||||
|
||||
func testRejectsInvalidIVSizes() throws {
|
||||
let someBytes = Array(repeating: UInt8(0), count: 24)
|
||||
|
||||
for count in 0..<someBytes.count {
|
||||
let ivBytes = someBytes.prefix(count)
|
||||
|
||||
if count != 16 {
|
||||
XCTAssertThrowsError(try AES._CFB.IV(ivBytes: ivBytes))
|
||||
} else {
|
||||
XCTAssertNoThrow(try AES._CFB.IV(ivBytes: ivBytes))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import XCTest
|
||||
import Crypto
|
||||
@testable import _CryptoExtras
|
||||
|
||||
fileprivate struct TestVector: Codable {
|
||||
struct RFC9474TestVector: Codable {
|
||||
var name, p, q, n, e, d, msg, msg_prefix, prepared_msg, salt, inv, blinded_msg, blind_sig, sig: String
|
||||
|
||||
var parameters: _RSA.BlindSigning.Parameters<SHA384> {
|
||||
@@ -40,19 +40,33 @@ fileprivate struct TestVector: Codable {
|
||||
let decoder = JSONDecoder()
|
||||
return try decoder.decode([Self].self, from: json)
|
||||
}
|
||||
|
||||
static let allValues: [Self] = try! RFC9474TestVector.load(from: URL(
|
||||
fileURLWithPath: "../_CryptoExtrasVectors/rfc9474.json",
|
||||
relativeTo: URL(fileURLWithPath: #file)
|
||||
))
|
||||
}
|
||||
|
||||
final class TestRSABlindSigning: XCTestCase {
|
||||
func testAgainstRFC9474TestVectors() throws {
|
||||
let testVectors = try TestVector.load(from: URL(
|
||||
fileURLWithPath: "../_CryptoExtrasVectors/rfc9474.json",
|
||||
relativeTo: URL(fileURLWithPath: #file)
|
||||
))
|
||||
|
||||
for testVector in testVectors {
|
||||
for testVector in RFC9474TestVector.allValues {
|
||||
// Load key pair
|
||||
let privateKey = try _RSA.BlindSigning.PrivateKey(
|
||||
n: Data(hexString: testVector.n),
|
||||
e: Data(hexString: testVector.e),
|
||||
d: Data(hexString: testVector.d),
|
||||
p: Data(hexString: testVector.p),
|
||||
q: Data(hexString: testVector.q),
|
||||
parameters: testVector.parameters
|
||||
)
|
||||
let publicKey = try _RSA.BlindSigning.PublicKey(
|
||||
n: Data(hexString: testVector.n),
|
||||
e: Data(hexString: testVector.e),
|
||||
parameters: testVector.parameters
|
||||
)
|
||||
XCTAssertEqual(publicKey.derRepresentation, privateKey.publicKey.derRepresentation)
|
||||
// Prepare
|
||||
do {
|
||||
let publicKey = try _RSA.BlindSigning.PublicKey(nHexString: testVector.n, eHexString: testVector.e, parameters: testVector.parameters)
|
||||
let message = try Data(hexString: testVector.msg)
|
||||
let preparedMessage = publicKey.prepare(message)
|
||||
switch testVector.parameters.preparation {
|
||||
@@ -65,7 +79,6 @@ final class TestRSABlindSigning: XCTestCase {
|
||||
|
||||
// Blind
|
||||
do {
|
||||
let publicKey = try _RSA.BlindSigning.PublicKey(nHexString: testVector.n, eHexString: testVector.e, parameters: testVector.parameters)
|
||||
let preparedMessage = try _RSA.BlindSigning.PreparedMessage(rawRepresentation: Data(hexString: testVector.prepared_msg))
|
||||
let blindingResult = try publicKey.blind(preparedMessage)
|
||||
// NOTE: Sadly we can't validate the blinded message against the test vectors because BoringSSL doesn't
|
||||
@@ -76,14 +89,6 @@ final class TestRSABlindSigning: XCTestCase {
|
||||
|
||||
// BlindSign
|
||||
do {
|
||||
let privateKey = try _RSA.BlindSigning.PrivateKey(
|
||||
nHexString: testVector.n,
|
||||
eHexString: testVector.e,
|
||||
dHexString: testVector.d,
|
||||
pHexString: testVector.p,
|
||||
qHexString: testVector.q,
|
||||
parameters: testVector.parameters
|
||||
)
|
||||
let blindedMessage = try Data(hexString: testVector.blinded_msg)
|
||||
let blindSignature = try privateKey.blindSignature(for: blindedMessage)
|
||||
XCTAssertEqual(
|
||||
@@ -94,7 +99,6 @@ final class TestRSABlindSigning: XCTestCase {
|
||||
|
||||
// Finalize
|
||||
do {
|
||||
let publicKey = try _RSA.BlindSigning.PublicKey(nHexString: testVector.n, eHexString: testVector.e, parameters: testVector.parameters)
|
||||
let blindSignature = try _RSA.BlindSigning.BlindSignature(rawRepresentation: Data(hexString: testVector.blind_sig))
|
||||
let preparedMessage = try _RSA.BlindSigning.PreparedMessage(rawRepresentation: Data(hexString: testVector.prepared_msg))
|
||||
let blindingInverse = try _RSA.BlindSigning.BlindingInverse(rawRepresentation: Data(hexString: testVector.inv))
|
||||
@@ -107,7 +111,6 @@ final class TestRSABlindSigning: XCTestCase {
|
||||
|
||||
// Verification
|
||||
do {
|
||||
let publicKey = try _RSA.BlindSigning.PublicKey(nHexString: testVector.n, eHexString: testVector.e, parameters: testVector.parameters)
|
||||
let signature = try _RSA.Signing.RSASignature(rawRepresentation: Data(hexString: testVector.sig))
|
||||
let preparedMessage = try _RSA.BlindSigning.PreparedMessage(rawRepresentation: Data(hexString: testVector.prepared_msg))
|
||||
XCTAssert(publicKey.isValidSignature(signature, for: preparedMessage))
|
||||
@@ -164,4 +167,39 @@ final class TestRSABlindSigning: XCTestCase {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func testConstructKeyFromRSANumbers() throws {
|
||||
/// Check we can successfully construct keys from known valid values from a test vector.
|
||||
for testVector in RFC9474TestVector.allValues {
|
||||
_ = try _RSA.BlindSigning.PrivateKey(
|
||||
n: Data(hexString: testVector.n),
|
||||
e: Data(hexString: testVector.e),
|
||||
d: Data(hexString: testVector.d),
|
||||
p: Data(hexString: testVector.p),
|
||||
q: Data(hexString: testVector.q),
|
||||
parameters: testVector.parameters
|
||||
)
|
||||
_ = try _RSA.BlindSigning.PublicKey(
|
||||
n: Data(hexString: testVector.n),
|
||||
e: Data(hexString: testVector.e),
|
||||
parameters: testVector.parameters
|
||||
)
|
||||
}
|
||||
/// Also check that we can provide each argument as a different `ContiguousBytes` type.
|
||||
/// NOTE: these calls use `try?` because they are guaranteed to fail; we're just checking these calls compile.
|
||||
let bytesValues: [any ContiguousBytes] = [Data(), [UInt8]()]
|
||||
_ = try? _RSA.BlindSigning.PrivateKey(
|
||||
n: bytesValues.randomElement()!,
|
||||
e: bytesValues.randomElement()!,
|
||||
d: bytesValues.randomElement()!,
|
||||
p: bytesValues.randomElement()!,
|
||||
q: bytesValues.randomElement()!,
|
||||
parameters: .RSABSSA_SHA384_PSS_Randomized
|
||||
)
|
||||
_ = try? _RSA.BlindSigning.PublicKey(
|
||||
n: bytesValues.randomElement()!,
|
||||
e: bytesValues.randomElement()!,
|
||||
parameters: .RSABSSA_SHA384_PSS_Randomized
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -77,6 +77,37 @@ final class TestRSAEncryption: XCTestCase {
|
||||
XCTAssertEqual(valid, test.expectedValidity, "test number \(test.tcId) failed, expected \(test.result) but got \(valid)")
|
||||
}
|
||||
}
|
||||
|
||||
func testConstructKeyFromRSANumbers() throws {
|
||||
/// Check we can successfully construct keys from known valid values from a test vector.
|
||||
for testVector in RFC9474TestVector.allValues {
|
||||
_ = try _RSA.Encryption.PrivateKey(
|
||||
n: Data(hexString: testVector.n),
|
||||
e: Data(hexString: testVector.e),
|
||||
d: Data(hexString: testVector.d),
|
||||
p: Data(hexString: testVector.p),
|
||||
q: Data(hexString: testVector.q)
|
||||
)
|
||||
_ = try _RSA.Encryption.PublicKey(
|
||||
n: Data(hexString: testVector.n),
|
||||
e: Data(hexString: testVector.e)
|
||||
)
|
||||
}
|
||||
/// Also check that we can provide each argument as a different `ContiguousBytes` type.
|
||||
/// NOTE: these calls use `try?` because they are guaranteed to fail; we're just checking these calls compile.
|
||||
let bytesValues: [any ContiguousBytes] = [Data(), [UInt8]()]
|
||||
_ = try? _RSA.Encryption.PrivateKey(
|
||||
n: bytesValues.randomElement()!,
|
||||
e: bytesValues.randomElement()!,
|
||||
d: bytesValues.randomElement()!,
|
||||
p: bytesValues.randomElement()!,
|
||||
q: bytesValues.randomElement()!
|
||||
)
|
||||
_ = try? _RSA.Encryption.PublicKey(
|
||||
n: bytesValues.randomElement()!,
|
||||
e: bytesValues.randomElement()!
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
struct RSAEncryptionOAEPTestGroup: Codable {
|
||||
|
||||
@@ -677,6 +677,37 @@ final class TestRSASigning: XCTestCase {
|
||||
XCTAssertEqual(pemKey, key.pkcs8PEMRepresentation)
|
||||
}
|
||||
|
||||
func testConstructKeyFromRSANumbers() throws {
|
||||
/// Check we can successfully construct keys from known valid values from a test vector.
|
||||
for testVector in RFC9474TestVector.allValues {
|
||||
_ = try _RSA.Signing.PrivateKey(
|
||||
n: Data(hexString: testVector.n),
|
||||
e: Data(hexString: testVector.e),
|
||||
d: Data(hexString: testVector.d),
|
||||
p: Data(hexString: testVector.p),
|
||||
q: Data(hexString: testVector.q)
|
||||
)
|
||||
_ = try _RSA.Signing.PublicKey(
|
||||
n: Data(hexString: testVector.n),
|
||||
e: Data(hexString: testVector.e)
|
||||
)
|
||||
}
|
||||
/// Also check that we can provide each argument as a different `ContiguousBytes` type.
|
||||
/// NOTE: these calls use `try?` because they are guaranteed to fail; we're just checking these calls compile.
|
||||
let bytesValues: [any ContiguousBytes] = [Data(), [UInt8]()]
|
||||
_ = try? _RSA.Signing.PrivateKey(
|
||||
n: bytesValues.randomElement()!,
|
||||
e: bytesValues.randomElement()!,
|
||||
d: bytesValues.randomElement()!,
|
||||
p: bytesValues.randomElement()!,
|
||||
q: bytesValues.randomElement()!
|
||||
)
|
||||
_ = try? _RSA.Signing.PublicKey(
|
||||
n: bytesValues.randomElement()!,
|
||||
e: bytesValues.randomElement()!
|
||||
)
|
||||
}
|
||||
|
||||
private func testPKCS1Group(_ group: RSAPKCS1TestGroup) throws {
|
||||
let derKey: _RSA.Signing.PublicKey
|
||||
let pemKey: _RSA.Signing.PublicKey
|
||||
|
||||
@@ -0,0 +1,289 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the SwiftCrypto open source project
|
||||
//
|
||||
// Copyright (c) 2019-2020 Apple Inc. and the SwiftCrypto project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.md for the list of SwiftCrypto project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
import Foundation
|
||||
|
||||
/// This is a not-very-performant decoder of the RFC formatted test vectors.
|
||||
///
|
||||
/// It is not intended as a general-purpose example: it does exactly enough to be useful in our
|
||||
/// tests and nothing more.
|
||||
struct RFCVectorDecoder {
|
||||
private var rfcVectorData: String
|
||||
|
||||
private var decoded: [[String: String]]
|
||||
|
||||
private var index: Int?
|
||||
|
||||
init(bundleType: AnyObject, fileName: String) throws {
|
||||
let testsDirectory: String = URL(fileURLWithPath: "\(#file)").pathComponents.dropLast(3).joined(separator: "/")
|
||||
let fileURL: URL? = URL(fileURLWithPath: "\(testsDirectory)/_CryptoExtrasVectors/\(fileName).txt")
|
||||
|
||||
let rfcVectorData = try Data(contentsOf: fileURL!)
|
||||
self.rfcVectorData = String(decoding: rfcVectorData, as: Unicode.UTF8.self)
|
||||
self.decoded = RFCVectorDecoder.parse(data: self.rfcVectorData)
|
||||
}
|
||||
|
||||
init(copyOf decoder: RFCVectorDecoder, index: Int) {
|
||||
self.rfcVectorData = decoder.rfcVectorData
|
||||
self.decoded = decoder.decoded
|
||||
self.index = index
|
||||
}
|
||||
|
||||
mutating func decode<T: Decodable>(_ type: T.Type) throws -> T {
|
||||
return try T(from: self)
|
||||
}
|
||||
|
||||
private static func parse(data: String) -> [[String: String]] {
|
||||
// Split on lines.
|
||||
var lines = ArraySlice(data.split { $0.isNewline })
|
||||
|
||||
// Strip the leading elements.
|
||||
lines = lines.drop(while: { !$0.hasPrefix("COUNT") })
|
||||
|
||||
var decoded = [[String: String]]()
|
||||
|
||||
// Parse the elements
|
||||
while let element = lines.parseElement() {
|
||||
decoded.append(element)
|
||||
}
|
||||
assert(lines.count == 0)
|
||||
|
||||
return decoded
|
||||
}
|
||||
}
|
||||
|
||||
extension RFCVectorDecoder: Decoder {
|
||||
// We never allowed nested coding paths: they are always top-level, within an array.
|
||||
var codingPath: [CodingKey] {
|
||||
return []
|
||||
}
|
||||
|
||||
var userInfo: [CodingUserInfoKey: Any] { return [:] }
|
||||
|
||||
func container<Key>(keyedBy type: Key.Type) throws -> KeyedDecodingContainer<Key> where Key: CodingKey {
|
||||
guard let index = self.index else {
|
||||
throw Error.topLevelKeyedContainersNotSupported
|
||||
}
|
||||
|
||||
return KeyedDecodingContainer(_KeyedDecodingContainer(forElement: self.decoded[index], path: [], decoder: self))
|
||||
}
|
||||
|
||||
func unkeyedContainer() throws -> UnkeyedDecodingContainer {
|
||||
guard self.index == nil else {
|
||||
throw Error.nestedContainersNotSupported
|
||||
}
|
||||
return UnkeyedContainer(elements: self.decoded, decoder: self)
|
||||
}
|
||||
|
||||
func singleValueContainer() throws -> SingleValueDecodingContainer {
|
||||
guard self.index == nil else {
|
||||
throw Error.nestedContainersNotSupported
|
||||
}
|
||||
return SingleValueContainer()
|
||||
}
|
||||
}
|
||||
|
||||
extension RFCVectorDecoder {
|
||||
struct _KeyedDecodingContainer<Key: CodingKey>: KeyedDecodingContainerProtocol {
|
||||
private var element: [String: String]
|
||||
|
||||
private var decoder: RFCVectorDecoder
|
||||
|
||||
var codingPath: [CodingKey]
|
||||
|
||||
var allKeys: [Key] {
|
||||
self.element.keys.compactMap { Key(stringValue: $0) }
|
||||
}
|
||||
|
||||
init(forElement element: [String: String], path: [CodingKey], decoder: RFCVectorDecoder) {
|
||||
self.element = element
|
||||
self.codingPath = path
|
||||
self.decoder = decoder
|
||||
}
|
||||
|
||||
func contains(_ key: Key) -> Bool {
|
||||
return self.element.keys.contains(key.stringValue)
|
||||
}
|
||||
|
||||
func decode<T: Decodable>(_ type: T.Type, forKey key: Key) throws -> T {
|
||||
guard let stringResult = self.element[key.stringValue] else {
|
||||
throw Error.missingKey
|
||||
}
|
||||
|
||||
switch type {
|
||||
case is String.Type:
|
||||
return stringResult as! T
|
||||
case is [UInt8].Type:
|
||||
if stringResult.count == 0 {
|
||||
return [UInt8]() as! T
|
||||
} else {
|
||||
return try Array(hexString: stringResult) as! T
|
||||
}
|
||||
case is Int.Type:
|
||||
return Int(stringResult, radix: 10)! as! T
|
||||
default:
|
||||
throw Error.attemptToDecodeInvalidType
|
||||
}
|
||||
}
|
||||
|
||||
func decodeNil(forKey key: Key) throws -> Bool {
|
||||
return false // No support for nil today.
|
||||
}
|
||||
|
||||
func nestedContainer<NestedKey>(keyedBy type: NestedKey.Type, forKey key: Key) throws -> KeyedDecodingContainer<NestedKey> where NestedKey: CodingKey {
|
||||
throw Error.nestedContainersNotSupported
|
||||
}
|
||||
|
||||
func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer {
|
||||
throw Error.nestedContainersNotSupported
|
||||
}
|
||||
|
||||
func superDecoder() throws -> Decoder {
|
||||
return decoder
|
||||
}
|
||||
|
||||
func superDecoder(forKey key: Key) throws -> Decoder {
|
||||
return decoder
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension RFCVectorDecoder {
|
||||
struct UnkeyedContainer: UnkeyedDecodingContainer {
|
||||
private var elements: [[String: String]]
|
||||
|
||||
private var decoder: RFCVectorDecoder
|
||||
|
||||
var currentIndex: Int
|
||||
|
||||
var codingPath: [CodingKey] {
|
||||
// This is always at the root
|
||||
return []
|
||||
}
|
||||
|
||||
var count: Int? {
|
||||
return elements.count
|
||||
}
|
||||
|
||||
var isAtEnd: Bool {
|
||||
return self.currentIndex == self.elements.endIndex
|
||||
}
|
||||
|
||||
init(elements: [[String: String]], decoder: RFCVectorDecoder) {
|
||||
self.elements = elements
|
||||
self.decoder = decoder
|
||||
self.currentIndex = elements.startIndex
|
||||
}
|
||||
|
||||
mutating func decode<T>(_ type: T.Type) throws -> T where T: Decodable {
|
||||
let index = self.currentIndex
|
||||
self.elements.formIndex(after: &self.currentIndex)
|
||||
return try type.init(from: RFCVectorDecoder(copyOf: self.decoder, index: index))
|
||||
}
|
||||
|
||||
func decodeNil() throws -> Bool {
|
||||
return false // No support for nil today.
|
||||
}
|
||||
|
||||
mutating func nestedContainer<NestedKey>(keyedBy type: NestedKey.Type) throws -> KeyedDecodingContainer<NestedKey> where NestedKey: CodingKey {
|
||||
let index = self.currentIndex
|
||||
self.elements.formIndex(after: &self.currentIndex)
|
||||
return try RFCVectorDecoder(copyOf: self.decoder, index: index).container(keyedBy: type)
|
||||
}
|
||||
|
||||
func nestedUnkeyedContainer() throws -> UnkeyedDecodingContainer {
|
||||
throw Error.nestedContainersNotSupported
|
||||
}
|
||||
|
||||
func superDecoder() throws -> Decoder {
|
||||
return decoder
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension RFCVectorDecoder {
|
||||
// We don't support single values, but we need the type. It's unconstructable.
|
||||
struct SingleValueContainer: SingleValueDecodingContainer {
|
||||
var codingPath: [CodingKey] {
|
||||
// This is always at the root
|
||||
return []
|
||||
}
|
||||
|
||||
init() {
|
||||
fatalError("SingleValueContainer is unsupported")
|
||||
}
|
||||
|
||||
func decode<T>(_ type: T.Type) throws -> T where T: Decodable {
|
||||
fatalError("SingleValueContainer is unsupported")
|
||||
}
|
||||
|
||||
func decodeNil() -> Bool {
|
||||
fatalError("SingleValueContainer is unsupported")
|
||||
}
|
||||
|
||||
func nestedContainer<NestedKey>(keyedBy type: NestedKey.Type) throws -> KeyedDecodingContainer<NestedKey> where NestedKey: CodingKey {
|
||||
fatalError("SingleValueContainer is unsupported")
|
||||
}
|
||||
|
||||
func nestedUnkeyedContainer() throws -> UnkeyedDecodingContainer {
|
||||
fatalError("SingleValueContainer is unsupported")
|
||||
}
|
||||
|
||||
func superDecoder() throws -> Decoder {
|
||||
fatalError("SingleValueContainer is unsupported")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension RFCVectorDecoder {
|
||||
enum Error: Swift.Error {
|
||||
case attemptToDecodeInvalidType
|
||||
case missingKey
|
||||
case nestedContainersNotSupported
|
||||
case topLevelKeyedContainersNotSupported
|
||||
}
|
||||
}
|
||||
|
||||
extension ArraySlice where Element == Substring {
|
||||
/// Parses a single block. A block runs from a COUNT declaration to a COUNT declaration,
|
||||
/// includes the first and excludes the last.
|
||||
mutating func parseElement() -> [String: String]? {
|
||||
// We need to drop first here as the first index with COUNT is going to be startIndex.
|
||||
let nextCountIndex = self.dropFirst().firstIndex(where: { $0.hasPrefix("COUNT") }) ?? self.endIndex
|
||||
|
||||
// Grab the elements, removing any that are either empty strings, begin with # or [ characters,
|
||||
// or begin with whitespace (these are used in some cases and we don't want them). This is a brute
|
||||
// force comparison, but it's test code, don't worry about it.
|
||||
let elements: [(String, String)] = self[..<nextCountIndex].filter { string in
|
||||
return (string.trimmingCharacters(in: .whitespaces).count > 0 &&
|
||||
!string.hasPrefix("#") &&
|
||||
!string.hasPrefix("[") &&
|
||||
!string.first!.isWhitespace)
|
||||
}.map { string in
|
||||
let split = string.split(separator: "=", maxSplits: 1, omittingEmptySubsequences: false)
|
||||
assert(split.count == 2)
|
||||
return (String(split.first!.trimmingCharacters(in: .whitespaces)), String(split.last!).trimmingCharacters(in: .whitespaces))
|
||||
}
|
||||
|
||||
// Slice off the section we've parsed.
|
||||
self = self[nextCountIndex...]
|
||||
|
||||
// Now we split each element on = and turn them into a map, omitting the map when it's empty.
|
||||
let mappedElements = Dictionary(uniqueKeysWithValues: elements)
|
||||
if mappedElements.count > 0 {
|
||||
return mappedElements
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
# CAVS 11.1
|
||||
# Config info for aes_values
|
||||
# AESVS GFSbox test data for CFB128
|
||||
# State : Encrypt and Decrypt
|
||||
# Key Length : 128
|
||||
# Generated on Fri Apr 22 15:11:53 2011
|
||||
|
||||
[ENCRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = f34481ec3cc627bacd5dc3fb08f273e6
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 0336763e966d92595a567cc9ce537f5e
|
||||
|
||||
COUNT = 1
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = 9798c4640bad75c7c3227db910174e72
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a9a1631bf4996954ebc093957b234589
|
||||
|
||||
COUNT = 2
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = 96ab5c2ff612d9dfaae8c31f30c42168
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = ff4f8391a6a40ca5b25d23bedd44a597
|
||||
|
||||
COUNT = 3
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = 6a118a874519e64e9963798a503f1d35
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = dc43be40be0e53712f7e2bf5ca707209
|
||||
|
||||
COUNT = 4
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = cb9fceec81286ca3e989bd979b0cb284
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 92beedab1895a94faa69b632e5cc47ce
|
||||
|
||||
COUNT = 5
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = b26aeb1874e47ca8358ff22378f09144
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 459264f4798f6a78bacb89c15ed3d601
|
||||
|
||||
COUNT = 6
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = 58c8e00b2631686d54eab84b91f0aca1
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 08a4e2efec8a8e3312ca7460b9040bbf
|
||||
|
||||
[DECRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = f34481ec3cc627bacd5dc3fb08f273e6
|
||||
CIPHERTEXT = 0336763e966d92595a567cc9ce537f5e
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 1
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = 9798c4640bad75c7c3227db910174e72
|
||||
CIPHERTEXT = a9a1631bf4996954ebc093957b234589
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 2
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = 96ab5c2ff612d9dfaae8c31f30c42168
|
||||
CIPHERTEXT = ff4f8391a6a40ca5b25d23bedd44a597
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 3
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = 6a118a874519e64e9963798a503f1d35
|
||||
CIPHERTEXT = dc43be40be0e53712f7e2bf5ca707209
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 4
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = cb9fceec81286ca3e989bd979b0cb284
|
||||
CIPHERTEXT = 92beedab1895a94faa69b632e5cc47ce
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 5
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = b26aeb1874e47ca8358ff22378f09144
|
||||
CIPHERTEXT = 459264f4798f6a78bacb89c15ed3d601
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 6
|
||||
KEY = 00000000000000000000000000000000
|
||||
IV = 58c8e00b2631686d54eab84b91f0aca1
|
||||
CIPHERTEXT = 08a4e2efec8a8e3312ca7460b9040bbf
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
# CAVS 11.1
|
||||
# Config info for aes_values
|
||||
# AESVS GFSbox test data for CFB128
|
||||
# State : Encrypt and Decrypt
|
||||
# Key Length : 192
|
||||
# Generated on Fri Apr 22 15:11:55 2011
|
||||
|
||||
[ENCRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = 1b077a6af4b7f98229de786d7516b639
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 275cfc0413d8ccb70513c3859b1d0f72
|
||||
|
||||
COUNT = 1
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = 9c2d8842e5f48f57648205d39a239af1
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = c9b8135ff1b5adc413dfd053b21bd96d
|
||||
|
||||
COUNT = 2
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = bff52510095f518ecca60af4205444bb
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 4a3650c3371ce2eb35e389a171427440
|
||||
|
||||
COUNT = 3
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = 51719783d3185a535bd75adc65071ce1
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 4f354592ff7c8847d2d0870ca9481b7c
|
||||
|
||||
COUNT = 4
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = 26aa49dcfe7629a8901a69a9914e6dfd
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = d5e08bf9a182e857cf40b3a36ee248cc
|
||||
|
||||
COUNT = 5
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = 941a4773058224e1ef66d10e0a6ee782
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 067cd9d3749207791841562507fa9626
|
||||
|
||||
[DECRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = 1b077a6af4b7f98229de786d7516b639
|
||||
CIPHERTEXT = 275cfc0413d8ccb70513c3859b1d0f72
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 1
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = 9c2d8842e5f48f57648205d39a239af1
|
||||
CIPHERTEXT = c9b8135ff1b5adc413dfd053b21bd96d
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 2
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = bff52510095f518ecca60af4205444bb
|
||||
CIPHERTEXT = 4a3650c3371ce2eb35e389a171427440
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 3
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = 51719783d3185a535bd75adc65071ce1
|
||||
CIPHERTEXT = 4f354592ff7c8847d2d0870ca9481b7c
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 4
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = 26aa49dcfe7629a8901a69a9914e6dfd
|
||||
CIPHERTEXT = d5e08bf9a182e857cf40b3a36ee248cc
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 5
|
||||
KEY = 000000000000000000000000000000000000000000000000
|
||||
IV = 941a4773058224e1ef66d10e0a6ee782
|
||||
CIPHERTEXT = 067cd9d3749207791841562507fa9626
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
# CAVS 11.1
|
||||
# Config info for aes_values
|
||||
# AESVS GFSbox test data for CFB128
|
||||
# State : Encrypt and Decrypt
|
||||
# Key Length : 256
|
||||
# Generated on Fri Apr 22 15:11:57 2011
|
||||
|
||||
[ENCRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 014730f80ac625fe84f026c60bfd547d
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 5c9d844ed46f9885085e5d6a4f94c7d7
|
||||
|
||||
COUNT = 1
|
||||
KEY = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 0b24af36193ce4665f2825d7b4749c98
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a9ff75bd7cf6613d3731c77c3b6d0c04
|
||||
|
||||
COUNT = 2
|
||||
KEY = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 761c1fe41a18acf20d241650611d90f1
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 623a52fcea5d443e48d9181ab32c7421
|
||||
|
||||
COUNT = 3
|
||||
KEY = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 8a560769d605868ad80d819bdba03771
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 38f2c7ae10612415d27ca190d27da8b4
|
||||
|
||||
COUNT = 4
|
||||
KEY = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 91fbef2d15a97816060bee1feaa49afe
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 1bc704f1bce135ceb810341b216d7abe
|
||||
|
||||
[DECRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 014730f80ac625fe84f026c60bfd547d
|
||||
CIPHERTEXT = 5c9d844ed46f9885085e5d6a4f94c7d7
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 1
|
||||
KEY = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 0b24af36193ce4665f2825d7b4749c98
|
||||
CIPHERTEXT = a9ff75bd7cf6613d3731c77c3b6d0c04
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 2
|
||||
KEY = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 761c1fe41a18acf20d241650611d90f1
|
||||
CIPHERTEXT = 623a52fcea5d443e48d9181ab32c7421
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 3
|
||||
KEY = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 8a560769d605868ad80d819bdba03771
|
||||
CIPHERTEXT = 38f2c7ae10612415d27ca190d27da8b4
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 4
|
||||
KEY = 0000000000000000000000000000000000000000000000000000000000000000
|
||||
IV = 91fbef2d15a97816060bee1feaa49afe
|
||||
CIPHERTEXT = 1bc704f1bce135ceb810341b216d7abe
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
# CAVS 11.1
|
||||
# Config info for aes_values
|
||||
# AESVS KeySbox test data for CFB128
|
||||
# State : Encrypt and Decrypt
|
||||
# Key Length : 128
|
||||
# Generated on Fri Apr 22 15:11:53 2011
|
||||
|
||||
[ENCRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = 10a58869d74be5a374cf867cfb473859
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 6d251e6944b051e04eaa6fb4dbf78465
|
||||
|
||||
COUNT = 1
|
||||
KEY = caea65cdbb75e9169ecd22ebe6e54675
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 6e29201190152df4ee058139def610bb
|
||||
|
||||
COUNT = 2
|
||||
KEY = a2e2fa9baf7d20822ca9f0542f764a41
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = c3b44b95d9d2f25670eee9a0de099fa3
|
||||
|
||||
COUNT = 3
|
||||
KEY = b6364ac4e1de1e285eaf144a2415f7a0
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 5d9b05578fc944b3cf1ccf0e746cd581
|
||||
|
||||
COUNT = 4
|
||||
KEY = 64cf9c7abc50b888af65f49d521944b2
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = f7efc89d5dba578104016ce5ad659c05
|
||||
|
||||
COUNT = 5
|
||||
KEY = 47d6742eefcc0465dc96355e851b64d9
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 0306194f666d183624aa230a8b264ae7
|
||||
|
||||
COUNT = 6
|
||||
KEY = 3eb39790678c56bee34bbcdeccf6cdb5
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 858075d536d79ccee571f7d7204b1f67
|
||||
|
||||
COUNT = 7
|
||||
KEY = 64110a924f0743d500ccadae72c13427
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 35870c6a57e9e92314bcb8087cde72ce
|
||||
|
||||
COUNT = 8
|
||||
KEY = 18d8126516f8a12ab1a36d9f04d68e51
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 6c68e9be5ec41e22c825b7c7affb4363
|
||||
|
||||
COUNT = 9
|
||||
KEY = f530357968578480b398a3c251cd1093
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = f5df39990fc688f1b07224cc03e86cea
|
||||
|
||||
COUNT = 10
|
||||
KEY = da84367f325d42d601b4326964802e8e
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = bba071bcb470f8f6586e5d3add18bc66
|
||||
|
||||
COUNT = 11
|
||||
KEY = e37b1c6aa2846f6fdb413f238b089f23
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 43c9f7e62f5d288bb27aa40ef8fe1ea8
|
||||
|
||||
COUNT = 12
|
||||
KEY = 6c002b682483e0cabcc731c253be5674
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 3580d19cff44f1014a7c966a69059de5
|
||||
|
||||
COUNT = 13
|
||||
KEY = 143ae8ed6555aba96110ab58893a8ae1
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 806da864dd29d48deafbe764f8202aef
|
||||
|
||||
COUNT = 14
|
||||
KEY = b69418a85332240dc82492353956ae0c
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a303d940ded8f0baff6f75414cac5243
|
||||
|
||||
COUNT = 15
|
||||
KEY = 71b5c08a1993e1362e4d0ce9b22b78d5
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = c2dabd117f8a3ecabfbb11d12194d9d0
|
||||
|
||||
COUNT = 16
|
||||
KEY = e234cdca2606b81f29408d5f6da21206
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = fff60a4740086b3b9c56195b98d91a7b
|
||||
|
||||
COUNT = 17
|
||||
KEY = 13237c49074a3da078dc1d828bb78c6f
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 8146a08e2357f0caa30ca8c94d1a0544
|
||||
|
||||
COUNT = 18
|
||||
KEY = 3071a2a48fe6cbd04f1a129098e308f8
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 4b98e06d356deb07ebb824e5713f7be3
|
||||
|
||||
COUNT = 19
|
||||
KEY = 90f42ec0f68385f2ffc5dfc03a654dce
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 7a20a53d460fc9ce0423a7a0764c6cf2
|
||||
|
||||
COUNT = 20
|
||||
KEY = febd9a24d8b65c1c787d50a4ed3619a9
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = f4a70d8af877f9b02b4c40df57d45b17
|
||||
|
||||
[DECRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = 10a58869d74be5a374cf867cfb473859
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 6d251e6944b051e04eaa6fb4dbf78465
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 1
|
||||
KEY = caea65cdbb75e9169ecd22ebe6e54675
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 6e29201190152df4ee058139def610bb
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 2
|
||||
KEY = a2e2fa9baf7d20822ca9f0542f764a41
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = c3b44b95d9d2f25670eee9a0de099fa3
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 3
|
||||
KEY = b6364ac4e1de1e285eaf144a2415f7a0
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 5d9b05578fc944b3cf1ccf0e746cd581
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 4
|
||||
KEY = 64cf9c7abc50b888af65f49d521944b2
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = f7efc89d5dba578104016ce5ad659c05
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 5
|
||||
KEY = 47d6742eefcc0465dc96355e851b64d9
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 0306194f666d183624aa230a8b264ae7
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 6
|
||||
KEY = 3eb39790678c56bee34bbcdeccf6cdb5
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 858075d536d79ccee571f7d7204b1f67
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 7
|
||||
KEY = 64110a924f0743d500ccadae72c13427
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 35870c6a57e9e92314bcb8087cde72ce
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 8
|
||||
KEY = 18d8126516f8a12ab1a36d9f04d68e51
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 6c68e9be5ec41e22c825b7c7affb4363
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 9
|
||||
KEY = f530357968578480b398a3c251cd1093
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = f5df39990fc688f1b07224cc03e86cea
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 10
|
||||
KEY = da84367f325d42d601b4326964802e8e
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = bba071bcb470f8f6586e5d3add18bc66
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 11
|
||||
KEY = e37b1c6aa2846f6fdb413f238b089f23
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 43c9f7e62f5d288bb27aa40ef8fe1ea8
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 12
|
||||
KEY = 6c002b682483e0cabcc731c253be5674
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 3580d19cff44f1014a7c966a69059de5
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 13
|
||||
KEY = 143ae8ed6555aba96110ab58893a8ae1
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 806da864dd29d48deafbe764f8202aef
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 14
|
||||
KEY = b69418a85332240dc82492353956ae0c
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a303d940ded8f0baff6f75414cac5243
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 15
|
||||
KEY = 71b5c08a1993e1362e4d0ce9b22b78d5
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = c2dabd117f8a3ecabfbb11d12194d9d0
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 16
|
||||
KEY = e234cdca2606b81f29408d5f6da21206
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = fff60a4740086b3b9c56195b98d91a7b
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 17
|
||||
KEY = 13237c49074a3da078dc1d828bb78c6f
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 8146a08e2357f0caa30ca8c94d1a0544
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 18
|
||||
KEY = 3071a2a48fe6cbd04f1a129098e308f8
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 4b98e06d356deb07ebb824e5713f7be3
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 19
|
||||
KEY = 90f42ec0f68385f2ffc5dfc03a654dce
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 7a20a53d460fc9ce0423a7a0764c6cf2
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 20
|
||||
KEY = febd9a24d8b65c1c787d50a4ed3619a9
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = f4a70d8af877f9b02b4c40df57d45b17
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
@@ -0,0 +1,299 @@
|
||||
# CAVS 11.1
|
||||
# Config info for aes_values
|
||||
# AESVS KeySbox test data for CFB128
|
||||
# State : Encrypt and Decrypt
|
||||
# Key Length : 192
|
||||
# Generated on Fri Apr 22 15:11:55 2011
|
||||
|
||||
[ENCRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = e9f065d7c13573587f7875357dfbb16c53489f6a4bd0f7cd
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 0956259c9cd5cfd0181cca53380cde06
|
||||
|
||||
COUNT = 1
|
||||
KEY = 15d20f6ebc7e649fd95b76b107e6daba967c8a9484797f29
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 8e4e18424e591a3d5b6f0876f16f8594
|
||||
|
||||
COUNT = 2
|
||||
KEY = a8a282ee31c03fae4f8e9b8930d5473c2ed695a347e88b7c
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 93f3270cfc877ef17e106ce938979cb0
|
||||
|
||||
COUNT = 3
|
||||
KEY = cd62376d5ebb414917f0c78f05266433dc9192a1ec943300
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 7f6c25ff41858561bb62f36492e93c29
|
||||
|
||||
COUNT = 4
|
||||
KEY = 502a6ab36984af268bf423c7f509205207fc1552af4a91e5
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 8e06556dcbb00b809a025047cff2a940
|
||||
|
||||
COUNT = 5
|
||||
KEY = 25a39dbfd8034f71a81f9ceb55026e4037f8f6aa30ab44ce
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 3608c344868e94555d23a120f8a5502d
|
||||
|
||||
COUNT = 6
|
||||
KEY = e08c15411774ec4a908b64eadc6ac4199c7cd453f3aaef53
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 77da2021935b840b7f5dcc39132da9e5
|
||||
|
||||
COUNT = 7
|
||||
KEY = 3b375a1ff7e8d44409696e6326ec9dec86138e2ae010b980
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 3b7c24f825e3bf9873c9f14d39a0e6f4
|
||||
|
||||
COUNT = 8
|
||||
KEY = 950bb9f22cc35be6fe79f52c320af93dec5bc9c0c2f9cd53
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 64ebf95686b353508c90ecd8b6134316
|
||||
|
||||
COUNT = 9
|
||||
KEY = 7001c487cc3e572cfc92f4d0e697d982e8856fdcc957da40
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = ff558c5d27210b7929b73fc708eb4cf1
|
||||
|
||||
COUNT = 10
|
||||
KEY = f029ce61d4e5a405b41ead0a883cc6a737da2cf50a6c92ae
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a2c3b2a818075490a7b4c14380f02702
|
||||
|
||||
COUNT = 11
|
||||
KEY = 61257134a518a0d57d9d244d45f6498cbc32f2bafc522d79
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = cfe4d74002696ccf7d87b14a2f9cafc9
|
||||
|
||||
COUNT = 12
|
||||
KEY = b0ab0a6a818baef2d11fa33eac947284fb7d748cfb75e570
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = d2eafd86f63b109b91f5dbb3a3fb7e13
|
||||
|
||||
COUNT = 13
|
||||
KEY = ee053aa011c8b428cdcc3636313c54d6a03cac01c71579d6
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 9b9fdd1c5975655f539998b306a324af
|
||||
|
||||
COUNT = 14
|
||||
KEY = d2926527e0aa9f37b45e2ec2ade5853ef807576104c7ace3
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = dd619e1cf204446112e0af2b9afa8f8c
|
||||
|
||||
COUNT = 15
|
||||
KEY = 982215f4e173dfa0fcffe5d3da41c4812c7bcc8ed3540f93
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = d4f0aae13c8fe9339fbf9e69ed0ad74d
|
||||
|
||||
COUNT = 16
|
||||
KEY = 98c6b8e01e379fbd14e61af6af891596583565f2a27d59e9
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 19c80ec4a6deb7e5ed1033dda933498f
|
||||
|
||||
COUNT = 17
|
||||
KEY = b3ad5cea1dddc214ca969ac35f37dae1a9a9d1528f89bb35
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 3cf5e1d21a17956d1dffad6a7c41c659
|
||||
|
||||
COUNT = 18
|
||||
KEY = 45899367c3132849763073c435a9288a766c8b9ec2308516
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 69fd12e8505f8ded2fdcb197a121b362
|
||||
|
||||
COUNT = 19
|
||||
KEY = ec250e04c3903f602647b85a401a1ae7ca2f02f67fa4253e
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 8aa584e2cc4d17417a97cb9a28ba29c8
|
||||
|
||||
COUNT = 20
|
||||
KEY = d077a03bd8a38973928ccafe4a9d2f455130bd0af5ae46a9
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = abc786fb1edb504580c4d882ef29a0c7
|
||||
|
||||
COUNT = 21
|
||||
KEY = d184c36cf0dddfec39e654195006022237871a47c33d3198
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 2e19fb60a3e1de0166f483c97824a978
|
||||
|
||||
COUNT = 22
|
||||
KEY = 4c6994ffa9dcdc805b60c2c0095334c42d95a8fc0ca5b080
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 7656709538dd5fec41e0ce6a0f8e207d
|
||||
|
||||
COUNT = 23
|
||||
KEY = c88f5b00a4ef9a6840e2acaf33f00a3bdc4e25895303fa72
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a67cf333b314d411d3c0ae6e1cfcd8f5
|
||||
|
||||
[DECRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = e9f065d7c13573587f7875357dfbb16c53489f6a4bd0f7cd
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 0956259c9cd5cfd0181cca53380cde06
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 1
|
||||
KEY = 15d20f6ebc7e649fd95b76b107e6daba967c8a9484797f29
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 8e4e18424e591a3d5b6f0876f16f8594
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 2
|
||||
KEY = a8a282ee31c03fae4f8e9b8930d5473c2ed695a347e88b7c
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 93f3270cfc877ef17e106ce938979cb0
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 3
|
||||
KEY = cd62376d5ebb414917f0c78f05266433dc9192a1ec943300
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 7f6c25ff41858561bb62f36492e93c29
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 4
|
||||
KEY = 502a6ab36984af268bf423c7f509205207fc1552af4a91e5
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 8e06556dcbb00b809a025047cff2a940
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 5
|
||||
KEY = 25a39dbfd8034f71a81f9ceb55026e4037f8f6aa30ab44ce
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 3608c344868e94555d23a120f8a5502d
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 6
|
||||
KEY = e08c15411774ec4a908b64eadc6ac4199c7cd453f3aaef53
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 77da2021935b840b7f5dcc39132da9e5
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 7
|
||||
KEY = 3b375a1ff7e8d44409696e6326ec9dec86138e2ae010b980
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 3b7c24f825e3bf9873c9f14d39a0e6f4
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 8
|
||||
KEY = 950bb9f22cc35be6fe79f52c320af93dec5bc9c0c2f9cd53
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 64ebf95686b353508c90ecd8b6134316
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 9
|
||||
KEY = 7001c487cc3e572cfc92f4d0e697d982e8856fdcc957da40
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = ff558c5d27210b7929b73fc708eb4cf1
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 10
|
||||
KEY = f029ce61d4e5a405b41ead0a883cc6a737da2cf50a6c92ae
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a2c3b2a818075490a7b4c14380f02702
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 11
|
||||
KEY = 61257134a518a0d57d9d244d45f6498cbc32f2bafc522d79
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = cfe4d74002696ccf7d87b14a2f9cafc9
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 12
|
||||
KEY = b0ab0a6a818baef2d11fa33eac947284fb7d748cfb75e570
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = d2eafd86f63b109b91f5dbb3a3fb7e13
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 13
|
||||
KEY = ee053aa011c8b428cdcc3636313c54d6a03cac01c71579d6
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 9b9fdd1c5975655f539998b306a324af
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 14
|
||||
KEY = d2926527e0aa9f37b45e2ec2ade5853ef807576104c7ace3
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = dd619e1cf204446112e0af2b9afa8f8c
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 15
|
||||
KEY = 982215f4e173dfa0fcffe5d3da41c4812c7bcc8ed3540f93
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = d4f0aae13c8fe9339fbf9e69ed0ad74d
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 16
|
||||
KEY = 98c6b8e01e379fbd14e61af6af891596583565f2a27d59e9
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 19c80ec4a6deb7e5ed1033dda933498f
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 17
|
||||
KEY = b3ad5cea1dddc214ca969ac35f37dae1a9a9d1528f89bb35
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 3cf5e1d21a17956d1dffad6a7c41c659
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 18
|
||||
KEY = 45899367c3132849763073c435a9288a766c8b9ec2308516
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 69fd12e8505f8ded2fdcb197a121b362
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 19
|
||||
KEY = ec250e04c3903f602647b85a401a1ae7ca2f02f67fa4253e
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 8aa584e2cc4d17417a97cb9a28ba29c8
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 20
|
||||
KEY = d077a03bd8a38973928ccafe4a9d2f455130bd0af5ae46a9
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = abc786fb1edb504580c4d882ef29a0c7
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 21
|
||||
KEY = d184c36cf0dddfec39e654195006022237871a47c33d3198
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 2e19fb60a3e1de0166f483c97824a978
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 22
|
||||
KEY = 4c6994ffa9dcdc805b60c2c0095334c42d95a8fc0ca5b080
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 7656709538dd5fec41e0ce6a0f8e207d
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 23
|
||||
KEY = c88f5b00a4ef9a6840e2acaf33f00a3bdc4e25895303fa72
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a67cf333b314d411d3c0ae6e1cfcd8f5
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
# CAVS 11.1
|
||||
# Config info for aes_values
|
||||
# AESVS KeySbox test data for CFB128
|
||||
# State : Encrypt and Decrypt
|
||||
# Key Length : 256
|
||||
# Generated on Fri Apr 22 15:11:57 2011
|
||||
|
||||
[ENCRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = c47b0294dbbbee0fec4757f22ffeee3587ca4730c3d33b691df38bab076bc558
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 46f2fb342d6f0ab477476fc501242c5f
|
||||
|
||||
COUNT = 1
|
||||
KEY = 28d46cffa158533194214a91e712fc2b45b518076675affd910edeca5f41ac64
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 4bf3b0a69aeb6657794f2901b1440ad4
|
||||
|
||||
COUNT = 2
|
||||
KEY = c1cc358b449909a19436cfbb3f852ef8bcb5ed12ac7058325f56e6099aab1a1c
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 352065272169abf9856843927d0674fd
|
||||
|
||||
COUNT = 3
|
||||
KEY = 984ca75f4ee8d706f46c2d98c0bf4a45f5b00d791c2dfeb191b5ed8e420fd627
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 4307456a9e67813b452e15fa8fffe398
|
||||
|
||||
COUNT = 4
|
||||
KEY = b43d08a447ac8609baadae4ff12918b9f68fc1653f1269222f123981ded7a92f
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 4663446607354989477a5c6f0f007ef4
|
||||
|
||||
COUNT = 5
|
||||
KEY = 1d85a181b54cde51f0e098095b2962fdc93b51fe9b88602b3f54130bf76a5bd9
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 531c2c38344578b84d50b3c917bbb6e1
|
||||
|
||||
COUNT = 6
|
||||
KEY = dc0eba1f2232a7879ded34ed8428eeb8769b056bbaf8ad77cb65c3541430b4cf
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = fc6aec906323480005c58e7e1ab004ad
|
||||
|
||||
COUNT = 7
|
||||
KEY = f8be9ba615c5a952cabbca24f68f8593039624d524c816acda2c9183bd917cb9
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a3944b95ca0b52043584ef02151926a8
|
||||
|
||||
COUNT = 8
|
||||
KEY = 797f8b3d176dac5b7e34a2d539c4ef367a16f8635f6264737591c5c07bf57a3e
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a74289fe73a4c123ca189ea1e1b49ad5
|
||||
|
||||
COUNT = 9
|
||||
KEY = 6838d40caf927749c13f0329d331f448e202c73ef52c5f73a37ca635d4c47707
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = b91d4ea4488644b56cf0812fa7fcf5fc
|
||||
|
||||
COUNT = 10
|
||||
KEY = ccd1bc3c659cd3c59bc437484e3c5c724441da8d6e90ce556cd57d0752663bbc
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 304f81ab61a80c2e743b94d5002a126b
|
||||
|
||||
COUNT = 11
|
||||
KEY = 13428b5e4c005e0636dd338405d173ab135dec2a25c22c5df0722d69dcc43887
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 649a71545378c783e368c9ade7114f6c
|
||||
|
||||
COUNT = 12
|
||||
KEY = 07eb03a08d291d1b07408bf3512ab40c91097ac77461aad4bb859647f74f00ee
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 47cb030da2ab051dfc6c4bf6910d12bb
|
||||
|
||||
COUNT = 13
|
||||
KEY = 90143ae20cd78c5d8ebdd6cb9dc1762427a96c78c639bccc41a61424564eafe1
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 798c7c005dee432b2c8ea5dfa381ecc3
|
||||
|
||||
COUNT = 14
|
||||
KEY = b7a5794d52737475d53d5a377200849be0260a67a2b22ced8bbef12882270d07
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 637c31dc2591a07636f646b72daabbe7
|
||||
|
||||
COUNT = 15
|
||||
KEY = fca02f3d5011cfc5c1e23165d413a049d4526a991827424d896fe3435e0bf68e
|
||||
IV = 00000000000000000000000000000000
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 179a49c712154bbffbe6e7a84a18e220
|
||||
|
||||
[DECRYPT]
|
||||
|
||||
COUNT = 0
|
||||
KEY = c47b0294dbbbee0fec4757f22ffeee3587ca4730c3d33b691df38bab076bc558
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 46f2fb342d6f0ab477476fc501242c5f
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 1
|
||||
KEY = 28d46cffa158533194214a91e712fc2b45b518076675affd910edeca5f41ac64
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 4bf3b0a69aeb6657794f2901b1440ad4
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 2
|
||||
KEY = c1cc358b449909a19436cfbb3f852ef8bcb5ed12ac7058325f56e6099aab1a1c
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 352065272169abf9856843927d0674fd
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 3
|
||||
KEY = 984ca75f4ee8d706f46c2d98c0bf4a45f5b00d791c2dfeb191b5ed8e420fd627
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 4307456a9e67813b452e15fa8fffe398
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 4
|
||||
KEY = b43d08a447ac8609baadae4ff12918b9f68fc1653f1269222f123981ded7a92f
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 4663446607354989477a5c6f0f007ef4
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 5
|
||||
KEY = 1d85a181b54cde51f0e098095b2962fdc93b51fe9b88602b3f54130bf76a5bd9
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 531c2c38344578b84d50b3c917bbb6e1
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 6
|
||||
KEY = dc0eba1f2232a7879ded34ed8428eeb8769b056bbaf8ad77cb65c3541430b4cf
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = fc6aec906323480005c58e7e1ab004ad
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 7
|
||||
KEY = f8be9ba615c5a952cabbca24f68f8593039624d524c816acda2c9183bd917cb9
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a3944b95ca0b52043584ef02151926a8
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 8
|
||||
KEY = 797f8b3d176dac5b7e34a2d539c4ef367a16f8635f6264737591c5c07bf57a3e
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = a74289fe73a4c123ca189ea1e1b49ad5
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 9
|
||||
KEY = 6838d40caf927749c13f0329d331f448e202c73ef52c5f73a37ca635d4c47707
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = b91d4ea4488644b56cf0812fa7fcf5fc
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 10
|
||||
KEY = ccd1bc3c659cd3c59bc437484e3c5c724441da8d6e90ce556cd57d0752663bbc
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 304f81ab61a80c2e743b94d5002a126b
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 11
|
||||
KEY = 13428b5e4c005e0636dd338405d173ab135dec2a25c22c5df0722d69dcc43887
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 649a71545378c783e368c9ade7114f6c
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 12
|
||||
KEY = 07eb03a08d291d1b07408bf3512ab40c91097ac77461aad4bb859647f74f00ee
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 47cb030da2ab051dfc6c4bf6910d12bb
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 13
|
||||
KEY = 90143ae20cd78c5d8ebdd6cb9dc1762427a96c78c639bccc41a61424564eafe1
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 798c7c005dee432b2c8ea5dfa381ecc3
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 14
|
||||
KEY = b7a5794d52737475d53d5a377200849be0260a67a2b22ced8bbef12882270d07
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 637c31dc2591a07636f646b72daabbe7
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
COUNT = 15
|
||||
KEY = fca02f3d5011cfc5c1e23165d413a049d4526a991827424d896fe3435e0bf68e
|
||||
IV = 00000000000000000000000000000000
|
||||
CIPHERTEXT = 179a49c712154bbffbe6e7a84a18e220
|
||||
PLAINTEXT = 00000000000000000000000000000000
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user