Home
last modified time | relevance | path

Searched refs:keypair (Results 1 – 6 of 6) sorted by relevance

/linux-5.19.10/drivers/net/wireguard/
Dsend.c126 struct noise_keypair *keypair; in keep_key_fresh() local
130 keypair = rcu_dereference_bh(peer->keypairs.current_keypair); in keep_key_fresh()
131 send = keypair && READ_ONCE(keypair->sending.is_valid) && in keep_key_fresh()
132 (atomic64_read(&keypair->sending_counter) > REKEY_AFTER_MESSAGES || in keep_key_fresh()
133 (keypair->i_am_the_initiator && in keep_key_fresh()
134 wg_birthdate_has_expired(keypair->sending.birthdate, REKEY_AFTER_TIME))); in keep_key_fresh()
162 static bool encrypt_packet(struct sk_buff *skb, struct noise_keypair *keypair) in encrypt_packet() argument
207 header->key_idx = keypair->remote_index; in encrypt_packet()
218 keypair->sending.key); in encrypt_packet()
265 struct noise_keypair *keypair; in wg_packet_tx_worker() local
[all …]
Dreceive.c229 struct noise_keypair *keypair; in keep_key_fresh() local
236 keypair = rcu_dereference_bh(peer->keypairs.current_keypair); in keep_key_fresh()
237 send = keypair && READ_ONCE(keypair->sending.is_valid) && in keep_key_fresh()
238 keypair->i_am_the_initiator && in keep_key_fresh()
239 wg_birthdate_has_expired(keypair->sending.birthdate, in keep_key_fresh()
249 static bool decrypt_packet(struct sk_buff *skb, struct noise_keypair *keypair) in decrypt_packet() argument
256 if (unlikely(!keypair)) in decrypt_packet()
259 if (unlikely(!READ_ONCE(keypair->receiving.is_valid) || in decrypt_packet()
260 wg_birthdate_has_expired(keypair->receiving.birthdate, REJECT_AFTER_TIME) || in decrypt_packet()
261 keypair->receiving_counter.counter >= REJECT_AFTER_MESSAGES)) { in decrypt_packet()
[all …]
Dnoise.c100 struct noise_keypair *keypair = kzalloc(sizeof(*keypair), GFP_KERNEL); in keypair_create() local
102 if (unlikely(!keypair)) in keypair_create()
104 spin_lock_init(&keypair->receiving_counter.lock); in keypair_create()
105 keypair->internal_id = atomic64_inc_return(&keypair_counter); in keypair_create()
106 keypair->entry.type = INDEX_HASHTABLE_KEYPAIR; in keypair_create()
107 keypair->entry.peer = peer; in keypair_create()
108 kref_init(&keypair->refcount); in keypair_create()
109 return keypair; in keypair_create()
119 struct noise_keypair *keypair = in keypair_free_kref() local
123 keypair->entry.peer->device->dev->name, in keypair_free_kref()
[all …]
Dnoise.h107 void wg_noise_keypair_put(struct noise_keypair *keypair, bool unreference_now);
108 struct noise_keypair *wg_noise_keypair_get(struct noise_keypair *keypair);
Dqueueing.h61 struct noise_keypair *keypair; member
68 #define PACKET_PEER(skb) (PACKET_CB(skb)->keypair->entry.peer)
/linux-5.19.10/Documentation/admin-guide/
Dmodule-signing.rst136 default, the kernel build will automatically generate a new keypair using
175 be used instead of an autogenerated keypair.