Update repository to zkgroup v0.7.0

This commit is contained in:
Gerardo Di Giacomo 2020-04-27 18:42:14 -07:00
parent d3b36dbf7d
commit 78e7b2e081
20 changed files with 165 additions and 148 deletions

View File

@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = "ZKGroup"
s.version = "0.6.0"
s.version = "0.7.0"
s.summary = "Swift API for the Rust zkgroup crate."
s.homepage = "https://signal.org/"
s.license = { :type => "GPLv3", :file => "LICENSE" }

View File

@ -11,7 +11,7 @@ import libzkgroup
public class AuthCredential : ByteArray {
public static let SIZE: Int = 404
public static let SIZE: Int = 342
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: AuthCredential.SIZE)

View File

@ -11,7 +11,7 @@ import libzkgroup
public class AuthCredentialPresentation : ByteArray {
public static let SIZE: Int = 620
public static let SIZE: Int = 493
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: AuthCredentialPresentation.SIZE)

View File

@ -11,7 +11,7 @@ import libzkgroup
public class AuthCredentialResponse : ByteArray {
public static let SIZE: Int = 392
public static let SIZE: Int = 361
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: AuthCredentialResponse.SIZE)

View File

@ -98,7 +98,7 @@ public class ClientZkGroupCipher {
public func encryptBlob(randomness: [UInt8], plaintext: [UInt8]) throws -> [UInt8] {
let paddedPlaintext = Array(repeating:0, count: 4) + plaintext
var newContents: [UInt8] = Array(repeating: 0, count: Int(paddedPlaintext.count+28))
var newContents: [UInt8] = Array(repeating: 0, count: Int(paddedPlaintext.count+29))
let ffi_return = FFI_GroupSecretParams_encryptBlobDeterministic(groupSecretParams.getInternalContentsForFFI(), UInt32(groupSecretParams.getInternalContentsForFFI().count), randomness, UInt32(randomness.count), paddedPlaintext, UInt32(paddedPlaintext.count), &newContents, UInt32(newContents.count))
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
@ -113,7 +113,7 @@ public class ClientZkGroupCipher {
}
public func decryptBlob(blobCiphertext: [UInt8]) throws -> [UInt8] {
var newContents: [UInt8] = Array(repeating: 0, count: Int(blobCiphertext.count-28))
var newContents: [UInt8] = Array(repeating: 0, count: Int(blobCiphertext.count-29))
let ffi_return = FFI_GroupSecretParams_decryptBlob(groupSecretParams.getInternalContentsForFFI(), UInt32(groupSecretParams.getInternalContentsForFFI().count), blobCiphertext, UInt32(blobCiphertext.count), &newContents, UInt32(newContents.count))

View File

@ -11,7 +11,7 @@ import libzkgroup
public class GroupPublicParams : ByteArray {
public static let SIZE: Int = 96
public static let SIZE: Int = 97
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: GroupPublicParams.SIZE)

View File

@ -11,7 +11,7 @@ import libzkgroup
public class GroupSecretParams : ByteArray {
public static let SIZE: Int = 352
public static let SIZE: Int = 289
public static func generate() throws -> GroupSecretParams {
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))

View File

@ -11,7 +11,7 @@ import libzkgroup
public class ProfileKeyCiphertext : ByteArray {
public static let SIZE: Int = 64
public static let SIZE: Int = 65
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: ProfileKeyCiphertext.SIZE)

View File

@ -11,7 +11,7 @@ import libzkgroup
public class ProfileKeyCommitment : ByteArray {
public static let SIZE: Int = 96
public static let SIZE: Int = 97
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: ProfileKeyCommitment.SIZE)

View File

@ -11,7 +11,7 @@ import libzkgroup
public class ProfileKeyCredential : ByteArray {
public static let SIZE: Int = 144
public static let SIZE: Int = 145
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: ProfileKeyCredential.SIZE)

View File

@ -11,7 +11,7 @@ import libzkgroup
public class ProfileKeyCredentialPresentation : ByteArray {
public static let SIZE: Int = 936
public static let SIZE: Int = 713
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: ProfileKeyCredentialPresentation.SIZE)

View File

@ -11,7 +11,7 @@ import libzkgroup
public class ProfileKeyCredentialRequest : ByteArray {
public static let SIZE: Int = 424
public static let SIZE: Int = 329
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: ProfileKeyCredentialRequest.SIZE)

View File

@ -11,7 +11,7 @@ import libzkgroup
public class ProfileKeyCredentialRequestContext : ByteArray {
public static let SIZE: Int = 600
public static let SIZE: Int = 473
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: ProfileKeyCredentialRequestContext.SIZE)

View File

@ -11,7 +11,7 @@ import libzkgroup
public class ProfileKeyCredentialResponse : ByteArray {
public static let SIZE: Int = 520
public static let SIZE: Int = 457
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: ProfileKeyCredentialResponse.SIZE)

View File

@ -11,7 +11,7 @@ import libzkgroup
public class ServerPublicParams : ByteArray {
public static let SIZE: Int = 160
public static let SIZE: Int = 161
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: ServerPublicParams.SIZE, unrecoverable: true)

View File

@ -11,7 +11,7 @@ import libzkgroup
public class ServerSecretParams : ByteArray {
public static let SIZE: Int = 896
public static let SIZE: Int = 769
public static func generate() throws -> ServerSecretParams {
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))

View File

@ -11,7 +11,7 @@ import libzkgroup
public class UuidCiphertext : ByteArray {
public static let SIZE: Int = 64
public static let SIZE: Int = 65
public init(contents: [UInt8]) throws {
try super.init(newContents: contents, expectedLength: UuidCiphertext.SIZE)

Binary file not shown.

View File

@ -5,17 +5,15 @@
#define AESGCM_NONCE_LEN 12
#define AESGCM_TAG_LEN 12
#define AESGCM_TAG_LEN 16
#define AES_KEY_LEN 32
#define AUTH_CREDENTIAL_LEN 404
#define AUTH_CREDENTIAL_LEN 342
#define AUTH_CREDENTIAL_PRESENTATION_LEN 620
#define AUTH_CREDENTIAL_PRESENTATION_LEN 493
#define AUTH_CREDENTIAL_RESPONSE_LEN 392
#define CLIENT_CREDENTIAL_MANAGER_LEN 256
#define AUTH_CREDENTIAL_RESPONSE_LEN 361
#define FFI_RETURN_INPUT_ERROR 2
@ -27,27 +25,27 @@
#define GROUP_MASTER_KEY_LEN 32
#define GROUP_PUBLIC_PARAMS_LEN 96
#define GROUP_PUBLIC_PARAMS_LEN 97
#define GROUP_SECRET_PARAMS_LEN 352
#define GROUP_SECRET_PARAMS_LEN 289
#define NUM_AUTH_CRED_ATTRIBUTES 4
#define NUM_AUTH_CRED_ATTRIBUTES 3
#define NUM_PROFILE_KEY_CRED_ATTRIBUTES 6
#define NUM_PROFILE_KEY_CRED_ATTRIBUTES 4
#define PROFILE_KEY_CIPHERTEXT_LEN 64
#define PROFILE_KEY_CIPHERTEXT_LEN 65
#define PROFILE_KEY_COMMITMENT_LEN 96
#define PROFILE_KEY_COMMITMENT_LEN 97
#define PROFILE_KEY_CREDENTIAL_LEN 144
#define PROFILE_KEY_CREDENTIAL_LEN 145
#define PROFILE_KEY_CREDENTIAL_PRESENTATION_LEN 936
#define PROFILE_KEY_CREDENTIAL_PRESENTATION_LEN 713
#define PROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN 600
#define PROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN 473
#define PROFILE_KEY_CREDENTIAL_REQUEST_LEN 424
#define PROFILE_KEY_CREDENTIAL_REQUEST_LEN 329
#define PROFILE_KEY_CREDENTIAL_RESPONSE_LEN 520
#define PROFILE_KEY_CREDENTIAL_RESPONSE_LEN 457
#define PROFILE_KEY_LEN 32
@ -57,13 +55,15 @@
#define RANDOMNESS_LEN 32
#define SERVER_PUBLIC_PARAMS_LEN 160
#define RESERVED_LEN 1
#define SERVER_SECRET_PARAMS_LEN 896
#define SERVER_PUBLIC_PARAMS_LEN 161
#define SERVER_SECRET_PARAMS_LEN 769
#define SIGNATURE_LEN 64
#define UUID_CIPHERTEXT_LEN 64
#define UUID_CIPHERTEXT_LEN 65
#define UUID_LEN 16

View File

@ -29,113 +29,99 @@ class ZKGroupTests: XCTestCase {
let TEST_ARRAY_32_5: [UInt8] = [0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12,
0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22]
let authPresentationResult: [UInt8] = [
0xd8, 0xa9, 0x23, 0x3b, 0xd5, 0x79, 0x5b, 0x54, 0x2d, 0x55, 0x21, 0x35, 0x66, 0xb9, 0x27, 0x5b,
0x57, 0xe8, 0x9a, 0xfa, 0x67, 0x60, 0x4f, 0xa9, 0x59, 0x09, 0xb2, 0x4f, 0x79, 0x87, 0x6f, 0x3a,
0xe8, 0x70, 0x54, 0x45, 0xef, 0x03, 0xf2, 0x42, 0xfd, 0xcd, 0x2b, 0xb4, 0x5d, 0x84, 0xf9, 0x28,
0x37, 0xf2, 0x18, 0xdc, 0x29, 0xa3, 0xb4, 0x8a, 0xd6, 0x2a, 0xee, 0x8e, 0xaf, 0xd7, 0x97, 0x40,
0x90, 0x89, 0x23, 0x40, 0x89, 0xda, 0x80, 0x12, 0xaf, 0xc9, 0xa5, 0x79, 0x94, 0x7b, 0xff, 0x37,
0x9f, 0xcf, 0xc6, 0x42, 0x6e, 0x41, 0x38, 0xc6, 0xe4, 0x0f, 0xa8, 0x9d, 0xaa, 0x81, 0xf9, 0x20,
0xb6, 0x5c, 0xf1, 0x02, 0xac, 0x7e, 0xc2, 0x5d, 0x7d, 0x34, 0x73, 0x78, 0x21, 0x80, 0x27, 0xdd,
0xeb, 0x97, 0x22, 0x6b, 0xf0, 0xf6, 0x3a, 0x5e, 0x73, 0x60, 0x4c, 0xcf, 0x77, 0x1f, 0x5e, 0x03,
0x16, 0x0f, 0x44, 0x3f, 0x16, 0xd6, 0x43, 0xa4, 0xd5, 0x31, 0x42, 0x89, 0x37, 0x2e, 0x9b, 0xcb,
0x62, 0x74, 0x75, 0xee, 0x7d, 0xd2, 0xe7, 0x85, 0xdf, 0x9c, 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0xd6, 0xcb, 0x06, 0xd4, 0x78, 0x8b,
0x6b, 0x46, 0x04, 0xdd, 0x19, 0x7c, 0x3f, 0xfc, 0x67, 0xa3, 0x4f, 0xd0, 0x82, 0xeb, 0x38, 0x3b,
0xc7, 0x7c, 0x3e, 0x1e, 0xd6, 0x7d, 0xd7, 0x0a, 0x86, 0xe9, 0xab, 0xae, 0xf9, 0x24, 0xa3, 0x25,
0xb4, 0xbf, 0x24, 0xfd, 0x59, 0xab, 0xeb, 0xd9, 0x69, 0x8d, 0x73, 0x02, 0x33, 0x1d, 0x35, 0x8e,
0x8c, 0xd9, 0xa9, 0x10, 0x83, 0xf7, 0x4f, 0x09, 0x34, 0x10, 0xec, 0xcf, 0xc3, 0x23, 0xf7, 0xe4,
0xeb, 0xf4, 0x37, 0x2b, 0x31, 0xf5, 0xc3, 0x5d, 0x66, 0x8b, 0xa5, 0xf2, 0xa4, 0x05, 0x2a, 0x56,
0xa0, 0xf6, 0x80, 0x93, 0x48, 0x62, 0x45, 0x53, 0x40, 0xe2, 0x01, 0x00]
let authPresentationResult: [UInt8] = [ 0x00, 0x0c, 0xde, 0x97, 0x97, 0x37,
0xed, 0x30, 0xbb, 0xeb, 0x16, 0x36, 0x2e, 0x4e, 0x07, 0x69, 0x45, 0xce, 0x02,
0x06, 0x9f, 0x72, 0x7b, 0x0e, 0xd4, 0xc3, 0xc3, 0x3c, 0x01, 0x1e, 0x82, 0x54,
0x6e, 0x1c, 0xdf, 0x08, 0x1f, 0xbd, 0xf3, 0x7c, 0x03, 0xa8, 0x51, 0xad, 0x06,
0x0b, 0xdc, 0xbf, 0x63, 0x78, 0xcb, 0x4c, 0xb1, 0x6d, 0xc3, 0x15, 0x4d, 0x08,
0xde, 0x54, 0x39, 0xb5, 0x32, 0x32, 0x03, 0x72, 0x9d, 0x18, 0x41, 0xb5, 0x17,
0x03, 0x3a, 0xf2, 0xfd, 0x17, 0x7d, 0x30, 0x49, 0x1c, 0x13, 0x8a, 0xe7, 0x23,
0x65, 0x57, 0x34, 0xf6, 0xe5, 0xcc, 0x01, 0xc0, 0x06, 0x96, 0xf4, 0xe9, 0x20,
0x96, 0xd8, 0xc3, 0x3d, 0xf2, 0x6b, 0xa2, 0xa8, 0x20, 0xd4, 0x2e, 0x97, 0x35,
0xd3, 0x0f, 0x8e, 0xee, 0xf9, 0x6d, 0x39, 0x90, 0x79, 0x07, 0x3c, 0x09, 0x9f,
0x70, 0x35, 0x52, 0x3b, 0xfe, 0x71, 0x66, 0x38, 0x65, 0x93, 0x19, 0xd3, 0xc3,
0x6a, 0xd3, 0x4c, 0x00, 0xef, 0x88, 0x50, 0xf6, 0x63, 0xc4, 0xd9, 0x30, 0x30,
0x23, 0x50, 0x74, 0x31, 0x2a, 0x88, 0x78, 0xb6, 0xa5, 0xc5, 0xdf, 0x4f, 0xbc,
0x7d, 0x32, 0x93, 0x52, 0x78, 0xbf, 0xa5, 0x99, 0x6b, 0x44, 0xab, 0x75, 0xd6,
0xf0, 0x6f, 0x4c, 0x30, 0xb9, 0x86, 0x40, 0xad, 0x5d, 0xe7, 0x47, 0x42, 0x65,
0x6c, 0x89, 0x77, 0x56, 0x7d, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfd, 0xe6, 0x9f, 0x82, 0xad, 0x2d, 0xcb, 0x49, 0x09, 0x65, 0x0a, 0xc6, 0xb2,
0x57, 0x38, 0x41, 0xaf, 0x56, 0x8f, 0xef, 0x82, 0x2b, 0x32, 0xb4, 0x5f, 0x62,
0x5a, 0x76, 0x46, 0x91, 0xa7, 0x04, 0xd1, 0x1b, 0x6f, 0x38, 0x52, 0x61, 0x46,
0x81, 0x17, 0xea, 0xd5, 0x7f, 0xa6, 0x23, 0x33, 0x8e, 0x21, 0xc6, 0x6e, 0xd8,
0x46, 0xab, 0x65, 0x80, 0x9f, 0xca, 0xc1, 0x58, 0x06, 0x6d, 0x8e, 0x0e, 0x44,
0x40, 0x77, 0xb9, 0x95, 0x40, 0xd8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fb, 0x48, 0x5a, 0x89, 0xbc, 0x1e, 0x3a, 0xbc, 0x4c,
0x95, 0x04, 0x1d, 0x1d, 0x17, 0x0e, 0xcc, 0xf0, 0x29, 0x33, 0xec, 0x53, 0x93, 0xd4, 0xbe, 0x1d,
0xc5, 0x73, 0xf8, 0x3c, 0x33, 0xd3, 0xb9, 0xa7, 0x46]
let serverSignatureResult: [UInt8] = [
0xc1, 0x45, 0xcb, 0xb3, 0x91, 0xc7, 0xe3, 0xb4, 0x70, 0xd3, 0xf2, 0xa7, 0x02, 0xdf, 0xd4, 0xb8,
0xed, 0x29, 0x9e, 0x0d, 0xd9, 0x48, 0xe7, 0x33, 0x23, 0x1e, 0xf2, 0x96, 0x93, 0xdb, 0x14, 0x0f,
0xad, 0xce, 0x61, 0xb3, 0x9c, 0x54, 0xa1, 0x23, 0x45, 0xb7, 0xa7, 0x1c, 0x49, 0x2d, 0xbd, 0x71,
0x4b, 0x04, 0xbf, 0x76, 0x76, 0x3a, 0xfe, 0x9e, 0x7a, 0xe7, 0x57, 0x3c, 0x18, 0xe3, 0xc3, 0x09]
let serverSignatureResult: [UInt8] = [ 0x87, 0xd3, 0x54, 0x56, 0x4d, 0x35,
0xef, 0x91, 0xed, 0xba, 0x85, 0x1e, 0x08, 0x15, 0x61, 0x2e, 0x86, 0x4c, 0x22,
0x7a, 0x04, 0x71, 0xd5, 0x0c, 0x27, 0x06, 0x98, 0x60, 0x44, 0x06, 0xd0, 0x03,
0xa5, 0x54, 0x73, 0xf5, 0x76, 0xcf, 0x24, 0x1f, 0xc6, 0xb4, 0x1c, 0x6b, 0x16,
0xe5, 0xe6, 0x3b, 0x33, 0x3c, 0x02, 0xfe, 0x4a, 0x33, 0x85, 0x80, 0x22, 0xfd,
0xd7, 0xa4, 0xab, 0x36, 0x7b, 0x06]
func testAuthIntegration() throws {
@ -295,17 +281,48 @@ class ZKGroupTests: XCTestCase {
let plaintext: [UInt8] = [
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19]
let ciphertext: [UInt8] = [
0x3e, 0xe2, 0xa9, 0x19, 0x44, 0xd8, 0xb4, 0xc6, 0x4f, 0x4a, 0xc3, 0xb9, 0x4d, 0x48, 0x52, 0x94,
0xea, 0x3a, 0x44, 0x48, 0x0f, 0x5e, 0x2b, 0x9c, 0x51, 0xb6, 0x5d, 0x51, 0x1c, 0xb8, 0x86, 0xa7,
0x97, 0x12, 0x19, 0x0c, 0x22, 0x16, 0xcb, 0xad, 0x76, 0xb6, 0x90, 0x05, 0x5a, 0x97, 0xd3, 0xeb,
0x59]
let ciphertext: [UInt8] = [ 0xdd, 0x4d, 0x03, 0x2c, 0xa9, 0xbb, 0x75, 0xa4,
0xa7, 0x85, 0x41, 0xb9, 0x0c, 0xb4, 0xe9, 0x57, 0x43, 0xf3, 0xb0, 0xda,
0xbf, 0xc7, 0xe1, 0x11, 0x01, 0xb0, 0x98, 0xe3, 0x4f, 0x6c, 0xf6, 0x51,
0x39, 0x40, 0xa0, 0x4c, 0x1f, 0x20, 0xa3, 0x02, 0x69, 0x2a, 0xfd, 0xc7,
0x08, 0x7f, 0x10, 0x19, 0x60, 0x00]
let ciphertext257: [UInt8] = [ 0x5c, 0xb5, 0xb7, 0xbf, 0xf0, 0x6e, 0x85, 0xd9,
0x29, 0xf3, 0x51, 0x1f, 0xd1, 0x94, 0xe6, 0x38, 0xcf, 0x32, 0xa4, 0x76,
0x63, 0x86, 0x8b, 0xc8, 0xe6, 0x4d, 0x98, 0xfb, 0x1b, 0xbe, 0x43, 0x5e,
0xbd, 0x21, 0xc7, 0x63, 0xce, 0x2d, 0x42, 0xe8, 0x5a, 0x1b, 0x2c, 0x16,
0x9f, 0x12, 0xf9, 0x81, 0x8d, 0xda, 0xdc, 0xf4, 0xb4, 0x91, 0x39, 0x8b,
0x7c, 0x5d, 0x46, 0xa2, 0x24, 0xe1, 0x58, 0x27, 0x49, 0x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b, 0xcc, 0x7f, 0x1e, 0xa0, 0xe4, 0xb2, 0xdd, 0x40, 0x77, 0xb7, 0x6b,
0x38, 0x18, 0x19, 0x74, 0x7a, 0xc3, 0x32, 0xe4, 0x6f, 0xa2, 0x3a, 0xbf,
0xc3, 0x33, 0x8e, 0x2f, 0x4b, 0x08, 0x1a, 0x8a, 0x53, 0xcb, 0xa0, 0x98,
0x8e, 0xef, 0x11, 0x67, 0x64, 0xd9, 0x44, 0xf1, 0xce, 0x3f, 0x20, 0xa3,
0x02, 0x69, 0x2a, 0xfd, 0xc7, 0x08, 0x7f, 0x10, 0x19, 0x60, 0x00 ]
let ciphertext2 = try clientZkGroupCipher.encryptBlob(randomness: TEST_ARRAY_32_2, plaintext: plaintext)
let plaintext2 = try clientZkGroupCipher.decryptBlob(blobCiphertext: ciphertext2)
XCTAssertEqual(plaintext, plaintext2)
XCTAssertEqual(ciphertext, ciphertext2)
let plaintext257 = try clientZkGroupCipher.decryptBlob(blobCiphertext: ciphertext257)
XCTAssertEqual(plaintext, plaintext257)
}
}