Files
libsignal/swift/Sources/LibSignalClient/zkgroup/ExpiringProfileKeyCredentialResponse.swift
Jordan Rose 395e36e9f2 zkgroup: Add ExpiringProfileKeyCredential
Like ProfileKeyCredential, but with an expiration timestamp embedded
in it. This has its own credential type and response type, but uses
the same request type as a "classic" ProfileKeyCredential, and
generates presentations usable with AnyProfileKeyCredential-
Presentation, so that existing server code accepting presentations
will automatically do the right thing.

Adoption for servers:

- Update secret params
- When presentations are saved in group state, use 
  ProfileKeyCredentialPresentation.getStructurallyValidV1PresentationBytes()
  to maintain backwards compatibility with existing clients.
- Add an endpoint to issue ExpiringProfileKeyCredentials
- (future) Remove the endpoint that issues regular ProfileKeyCredentials

Adoption for clients, after the server has updated:

- Update public params
- Start fetching and using ExpiringProfileKeyCredentials instead of 
  regular ProfileKeyCredentials (the old endpoint will eventually
  go away)
- Node: To bring types into harmony, a receipt's expiration time has
  been changed to a `number` instead of a `bigint`
2022-06-17 13:10:10 -07:00

14 lines
357 B
Swift

//
// Copyright 2022 Signal Messenger, LLC.
// SPDX-License-Identifier: AGPL-3.0-only
//
import Foundation
import SignalFfi
public class ExpiringProfileKeyCredentialResponse: ByteArray {
public required init(contents: [UInt8]) throws {
try super.init(contents, checkValid: signal_expiring_profile_key_credential_response_check_valid_contents)
}
}