From 65450b78abfbb8d678121c94d247a659e92d7b8f Mon Sep 17 00:00:00 2001 From: Yawning Angel Date: Wed, 5 Aug 2026 18:26:44 +0900 Subject: [PATCH] core/crypto/mlkem: Fix compiler error on `key_size(&Encapsualtion_Key)` --- core/crypto/mlkem/api.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/crypto/mlkem/api.odin b/core/crypto/mlkem/api.odin index 3e3956ba8..6cbbd3249 100644 --- a/core/crypto/mlkem/api.odin +++ b/core/crypto/mlkem/api.odin @@ -269,7 +269,7 @@ params :: proc(k: ^$T) -> Parameters where (T == Encapsulation_Key || T == Decap @(require_results) key_size :: proc(k: ^$T) -> int where (T == Encapsulation_Key || T == Decapsulation_Key) { when T == Encapsulation_Key { - return ENCAPSULATION_KEY_SIZES[k.pke_ek.k] + return ENCAPSULATION_KEY_SIZES[params(k)] } else { return DECAPSULATION_KEY_SEED_SIZE }