19#define channel_ephemeral_algorithm sha256_algorithm
174 const void *shared,
int *accumulated );
245 const void *auth,
size_t len );
317 const void *
auth,
size_t len );
323 const void *
key,
size_t len );
#define NULL
NULL pointer (VOID *).
u8 signature
CPU signature.
union @162305117151260234136356364136041353210355154177 key
#define SHA256_DIGEST_SIZE
pseudo_bit_t value[0x00020]
struct cipher_algorithm channel_dead_cipher
Dead cipher.
int channel_set_cipher(struct secure_channel *channel, struct secure_pipe *pipe, struct cipher_algorithm *cipher, const void *key, size_t len)
Set cipher algorithm and key.
void channel_reopen(struct secure_channel *channel)
Reopen secure channel.
int channel_bind_encrypt(struct secure_channel *channel, struct x509_certificate *identity, struct exchange_algorithm *exchange, struct pubkey_algorithm *pubkey, struct asn1_builder *ciphertext)
Bind peer identity via shared secret encryption.
void channel_ephemeral(struct secure_channel *channel, const void *info, size_t info_len, void *out, size_t len)
Generate ephemeral secret.
void channel_unkey(struct secure_channel *channel)
Clear shared secret.
int channel_key_agree(struct secure_channel *channel, struct exchange_algorithm *exchange, const void *partner)
Agree shared secret.
int channel_open(struct secure_channel *channel)
Open secure channel.
void channel_close(struct secure_channel *channel)
Close secure channel.
static void channel_init(struct secure_channel *channel, struct secure_channel_operations *op)
Initialise secure channel.
int channel_bind_verify(struct secure_channel *channel, struct x509_certificate *identity, struct pubkey_algorithm *pubkey, struct digest_algorithm *digest, const void *value, const struct asn1_cursor *signature)
Bind peer identity via ephemeral public key signature verification.
int channel_establish(struct secure_channel *channel, const char *name, struct x509_root *root)
Establish channel as trusted for application data.
int channel_save(struct secure_channel *channel, struct secure_preshared_identity *psid)
Save a pre-shared key.
int channel_confirm(struct secure_channel *channel, const void *auth, size_t len)
Confirm peer identity.
static void channel_clear_preshared(struct secure_preshared_identity *psid)
Clear pre-shared bound peer identity.
int channel_key_share(struct secure_channel *channel, struct exchange_algorithm *exchange, void *public)
Share public key.
static int channel_is_established(struct secure_channel *channel)
Check if secure channel has been established.
void channel_ephemeral_label(struct secure_channel *channel, const char *label, void *out, size_t len)
Generate labelled ephemeral secret.
int channel_load(struct secure_channel *channel, struct secure_preshared_identity *psid)
Load a pre-shared key.
struct eth_slow_lacp_entity_tlv partner
Partner information.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
uint8_t info_len
Reject information length.
uint32_t channel
RNDIS channel.
static uint16_t struct vmbus_xfer_pages_operations * op
struct stp_switch root
Root switch.
void(* auth)(struct cipher_algorithm *cipher, void *ctx, void *auth)
Generate authentication tag.
A message digest algorithm.
A key exchange algorithm.
Secure channel operations.
void(* reset)(struct secure_channel *channel)
Reset the key schedule.
int(* apply)(struct secure_channel *channel, struct exchange_algorithm *exchange, const void *shared, int *accumulated)
Apply a new shared secret to key schedule.
int(* verify)(struct secure_channel *channel, const void *auth, size_t len)
Verify authenticator value.
int(* load)(struct secure_channel *channel, struct secure_preshared_identity *psid)
Load a pre-shared key and resume the key schedule.
int(* save)(struct secure_channel *channel, struct secure_preshared_identity *psid)
Save a pre-shared key for future resumption of the key schedule.
Secure channel properties.
struct x509_certificate * confirmed
Confirmed peer identity (if any).
struct x509_certificate * bound
Bound peer identity (if any).
struct x509_certificate * established
Established peer identity (if any).
int keyed
Channel contains key material derived from a shared secret.
struct secure_pipe tx
Transmit pipe.
struct secure_channel_properties props
Security properties.
struct secure_pipe rx
Receive pipe.
struct secure_channel_operations * op
Channel operations.
uint8_t ephemeral[SHA256_DIGEST_SIZE]
Ephemeral master secret.
A secure channel transmit or receive pipe.
void * ctx
Cipher context.
struct cipher_algorithm * cipher
Cipher algorithm.
A pre-shared bound peer identity.
struct x509_certificate * bound
Bound peer identity.
An X.509 root certificate list.
static void x509_put(struct x509_certificate *cert)
Drop reference to X.509 certificate.