|
48 | 48 | /* This is the ASCII string with the |
49 | 49 | * PHflag 1 and context size 0 appended as defined in: |
50 | 50 | * https://datatracker.ietf.org/doc/html/rfc8032.html#section-2 |
51 | | - * used for domain seperation between Ed25519 and Ed25519ph |
| 51 | + * used for domain seperation between Ed25519 and Ed25519ph. |
| 52 | + * Due to hardware limitations dom2 needs to be stored in RAM |
| 53 | + * Therefore is not stored as a const. |
52 | 54 | */ |
53 | | -const char dom2[34] = { |
54 | | - 0x53, 0x69, 0x67, 0x45, 0x64, 0x32, 0x35, |
55 | | - 0x35, 0x31, 0x39, 0x20, 0x6e, 0x6f, 0x20, |
56 | | - 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, |
57 | | - 0x20, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, |
58 | | - 0x69, 0x6f, 0x6e, 0x73, 0x01, 0x00 |
59 | | -}; |
| 55 | +static char dom2[34] = {0x53, 0x69, 0x67, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x20, 0x6e, |
| 56 | + 0x6f, 0x20, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x20, 0x63, 0x6f, |
| 57 | + 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x01, 0x00}; |
60 | 58 |
|
61 | 59 | static int finish_ed25519ph_ver(struct sitask *t, struct siwq *wq) |
62 | 60 | { |
@@ -103,7 +101,7 @@ static void run_ed25519ph_ver(struct sitask *t) |
103 | 101 | } |
104 | 102 |
|
105 | 103 | static void si_sig_create_ed25519ph_verify(struct sitask *t, const struct si_sig_pubkey *pubkey, |
106 | | - const struct si_sig_signature *signature) |
| 104 | + const struct si_sig_signature *signature) |
107 | 105 | { |
108 | 106 | if (t->workmemsz < SX_ED25519_DGST_SZ) { |
109 | 107 | si_task_mark_final(t, SX_ERR_WORKMEM_BUFFER_TOO_SMALL); |
|
0 commit comments