diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/libcrypto/crypto_assembly.h | 24 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha1_aarch64_ce.S | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha1_amd64_generic.S | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha1_amd64_shani.S | 11 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha256_aarch64_ce.S | 11 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha256_amd64_generic.S | 11 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha256_amd64_shani.S | 16 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha512_aarch64_ce.S | 10 | ||||
| -rw-r--r-- | src/lib/libcrypto/sha/sha512_amd64_generic.S | 11 |
9 files changed, 53 insertions, 53 deletions
diff --git a/src/lib/libcrypto/crypto_assembly.h b/src/lib/libcrypto/crypto_assembly.h index 22102d3fac..e42ed947dd 100644 --- a/src/lib/libcrypto/crypto_assembly.h +++ b/src/lib/libcrypto/crypto_assembly.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: crypto_assembly.h,v 1.4 2026/05/07 15:41:37 jsing Exp $ */ | 1 | /* $OpenBSD: crypto_assembly.h,v 1.5 2026/05/07 15:50:47 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2026 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2026 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -37,6 +37,11 @@ | |||
| 37 | #define CRYPTO_ASSEMBLY_SECTION_TEXT __TEXT,__text | 37 | #define CRYPTO_ASSEMBLY_SECTION_TEXT __TEXT,__text |
| 38 | #define CRYPTO_ASSEMBLY_SECTION_RODATA __DATA,__const | 38 | #define CRYPTO_ASSEMBLY_SECTION_RODATA __DATA,__const |
| 39 | 39 | ||
| 40 | #define CRYPTO_ASSEMBLY_SYMBOL_NAME(name) _name | ||
| 41 | #define CRYPTO_ASSEMBLY_TYPE_FUNCTION(name) | ||
| 42 | #define CRYPTO_ASSEMBLY_TYPE_OBJECT(name) | ||
| 43 | #define CRYPTO_ASSEMBLY_OBJECT_SIZE(name) | ||
| 44 | |||
| 40 | #define CRYPTO_ASSEMBLY_AARCH64_SYM_HI(name) name@PAGE | 45 | #define CRYPTO_ASSEMBLY_AARCH64_SYM_HI(name) name@PAGE |
| 41 | #define CRYPTO_ASSEMBLY_AARCH64_SYM_LO(name) name@PAGEOFF | 46 | #define CRYPTO_ASSEMBLY_AARCH64_SYM_LO(name) name@PAGEOFF |
| 42 | 47 | ||
| @@ -44,8 +49,25 @@ | |||
| 44 | #define CRYPTO_ASSEMBLY_SECTION_TEXT .text | 49 | #define CRYPTO_ASSEMBLY_SECTION_TEXT .text |
| 45 | #define CRYPTO_ASSEMBLY_SECTION_RODATA .rodata | 50 | #define CRYPTO_ASSEMBLY_SECTION_RODATA .rodata |
| 46 | 51 | ||
| 52 | #define CRYPTO_ASSEMBLY_SYMBOL_NAME(name) name | ||
| 53 | #define CRYPTO_ASSEMBLY_TYPE_FUNCTION(name) .type name,@function | ||
| 54 | #define CRYPTO_ASSEMBLY_TYPE_OBJECT(name) .type name,@object | ||
| 55 | #define CRYPTO_ASSEMBLY_OBJECT_SIZE(name) .size name,.-name | ||
| 56 | |||
| 47 | #define CRYPTO_ASSEMBLY_AARCH64_SYM_HI(name) name | 57 | #define CRYPTO_ASSEMBLY_AARCH64_SYM_HI(name) name |
| 48 | #define CRYPTO_ASSEMBLY_AARCH64_SYM_LO(name) :lo12:name | 58 | #define CRYPTO_ASSEMBLY_AARCH64_SYM_LO(name) :lo12:name |
| 49 | #endif | 59 | #endif |
| 50 | 60 | ||
| 61 | #define CRYPTO_ASSEMBLY_GLOBAL_FUNCTION(name) \ | ||
| 62 | .global CRYPTO_ASSEMBLY_SYMBOL_NAME(name) CRYPTO_ASSEMBLY_SEPARATOR \ | ||
| 63 | CRYPTO_ASSEMBLY_TYPE_FUNCTION(name) CRYPTO_ASSEMBLY_SEPARATOR \ | ||
| 64 | CRYPTO_ASSEMBLY_SYMBOL_NAME(name) | ||
| 65 | |||
| 66 | #define CRYPTO_ASSEMBLY_OBJECT_START(name) \ | ||
| 67 | CRYPTO_ASSEMBLY_TYPE_OBJECT(name) CRYPTO_ASSEMBLY_SEPARATOR \ | ||
| 68 | name | ||
| 69 | |||
| 70 | #define CRYPTO_ASSEMBLY_OBJECT_END(name) \ | ||
| 71 | CRYPTO_ASSEMBLY_OBJECT_SIZE(name) | ||
| 72 | |||
| 51 | #endif | 73 | #endif |
diff --git a/src/lib/libcrypto/sha/sha1_aarch64_ce.S b/src/lib/libcrypto/sha/sha1_aarch64_ce.S index 53dcd46fda..85fefb9ccf 100644 --- a/src/lib/libcrypto/sha/sha1_aarch64_ce.S +++ b/src/lib/libcrypto/sha/sha1_aarch64_ce.S | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha1_aarch64_ce.S,v 1.7 2026/05/07 15:40:33 jsing Exp $ */ | 1 | /* $OpenBSD: sha1_aarch64_ce.S,v 1.8 2026/05/07 15:50:47 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2023,2025 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2023,2025 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -111,9 +111,7 @@ | |||
| 111 | * | 111 | * |
| 112 | * Standard ARM ABI: x0 = ctx, x1 = in, x2 = num | 112 | * Standard ARM ABI: x0 = ctx, x1 = in, x2 = num |
| 113 | */ | 113 | */ |
| 114 | .globl sha1_block_ce | 114 | CRYPTO_ASSEMBLY_GLOBAL_FUNCTION(sha1_block_ce): |
| 115 | .type sha1_block_ce,@function | ||
| 116 | sha1_block_ce: | ||
| 117 | 115 | ||
| 118 | /* | 116 | /* |
| 119 | * Load SHA-1 round constants. | 117 | * Load SHA-1 round constants. |
diff --git a/src/lib/libcrypto/sha/sha1_amd64_generic.S b/src/lib/libcrypto/sha/sha1_amd64_generic.S index a44bd2fdec..a0473bdd00 100644 --- a/src/lib/libcrypto/sha/sha1_amd64_generic.S +++ b/src/lib/libcrypto/sha/sha1_amd64_generic.S | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha1_amd64_generic.S,v 1.6 2026/05/07 15:38:03 jsing Exp $ */ | 1 | /* $OpenBSD: sha1_amd64_generic.S,v 1.7 2026/05/07 15:50:47 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -162,9 +162,7 @@ | |||
| 162 | * Standard x86-64 ABI: rdi = ctx, rsi = in, rdx = num | 162 | * Standard x86-64 ABI: rdi = ctx, rsi = in, rdx = num |
| 163 | */ | 163 | */ |
| 164 | .align 16 | 164 | .align 16 |
| 165 | .globl sha1_block_generic | 165 | CRYPTO_ASSEMBLY_GLOBAL_FUNCTION(sha1_block_generic): |
| 166 | .type sha1_block_generic,@function | ||
| 167 | sha1_block_generic: | ||
| 168 | _CET_ENDBR | 166 | _CET_ENDBR |
| 169 | 167 | ||
| 170 | /* Save callee save registers. */ | 168 | /* Save callee save registers. */ |
diff --git a/src/lib/libcrypto/sha/sha1_amd64_shani.S b/src/lib/libcrypto/sha/sha1_amd64_shani.S index f957238f80..4814778343 100644 --- a/src/lib/libcrypto/sha/sha1_amd64_shani.S +++ b/src/lib/libcrypto/sha/sha1_amd64_shani.S | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha1_amd64_shani.S,v 1.6 2026/05/07 15:40:33 jsing Exp $ */ | 1 | /* $OpenBSD: sha1_amd64_shani.S,v 1.7 2026/05/07 15:50:47 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -77,9 +77,7 @@ | |||
| 77 | * Standard x86-64 ABI: rdi = ctx, rsi = in, rdx = num | 77 | * Standard x86-64 ABI: rdi = ctx, rsi = in, rdx = num |
| 78 | */ | 78 | */ |
| 79 | .align 16 | 79 | .align 16 |
| 80 | .globl sha1_block_shani | 80 | CRYPTO_ASSEMBLY_GLOBAL_FUNCTION(sha1_block_shani): |
| 81 | .type sha1_block_shani,@function | ||
| 82 | sha1_block_shani: | ||
| 83 | _CET_ENDBR | 81 | _CET_ENDBR |
| 84 | 82 | ||
| 85 | /* Save callee save registers. */ | 83 | /* Save callee save registers. */ |
| @@ -162,7 +160,6 @@ sha1_block_shani: | |||
| 162 | * and reordering to abcd. | 160 | * and reordering to abcd. |
| 163 | */ | 161 | */ |
| 164 | .align 16 | 162 | .align 16 |
| 165 | .type shufmask,@object | 163 | CRYPTO_ASSEMBLY_OBJECT_START(shufmask): |
| 166 | shufmask: | ||
| 167 | .octa 0x000102030405060708090a0b0c0d0e0f | 164 | .octa 0x000102030405060708090a0b0c0d0e0f |
| 168 | .size shufmask,.-shufmask | 165 | CRYPTO_ASSEMBLY_OBJECT_END(shufmask) |
diff --git a/src/lib/libcrypto/sha/sha256_aarch64_ce.S b/src/lib/libcrypto/sha/sha256_aarch64_ce.S index c08ba27e9f..991f1316c0 100644 --- a/src/lib/libcrypto/sha/sha256_aarch64_ce.S +++ b/src/lib/libcrypto/sha/sha256_aarch64_ce.S | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha256_aarch64_ce.S,v 1.9 2026/05/07 15:41:37 jsing Exp $ */ | 1 | /* $OpenBSD: sha256_aarch64_ce.S,v 1.10 2026/05/07 15:50:47 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2023,2025 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2023,2025 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -102,9 +102,7 @@ | |||
| 102 | * | 102 | * |
| 103 | * Standard ARM ABI: x0 = ctx, x1 = in, x2 = num | 103 | * Standard ARM ABI: x0 = ctx, x1 = in, x2 = num |
| 104 | */ | 104 | */ |
| 105 | .globl sha256_block_ce | 105 | CRYPTO_ASSEMBLY_GLOBAL_FUNCTION(sha256_block_ce): |
| 106 | .type sha256_block_ce,@function | ||
| 107 | sha256_block_ce: | ||
| 108 | 106 | ||
| 109 | /* Address of SHA-256 constants. */ | 107 | /* Address of SHA-256 constants. */ |
| 110 | adrp k256_base, CRYPTO_ASSEMBLY_AARCH64_SYM_HI(K256) | 108 | adrp k256_base, CRYPTO_ASSEMBLY_AARCH64_SYM_HI(K256) |
| @@ -180,8 +178,7 @@ sha256_block_ce: | |||
| 180 | * SHA-256 constants - see FIPS 180-4 section 4.2.3. | 178 | * SHA-256 constants - see FIPS 180-4 section 4.2.3. |
| 181 | */ | 179 | */ |
| 182 | .align 4 | 180 | .align 4 |
| 183 | .type K256,@object | 181 | CRYPTO_ASSEMBLY_OBJECT_START(K256): |
| 184 | K256: | ||
| 185 | .long 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5 | 182 | .long 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5 |
| 186 | .long 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5 | 183 | .long 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5 |
| 187 | .long 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3 | 184 | .long 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3 |
| @@ -198,4 +195,4 @@ K256: | |||
| 198 | .long 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3 | 195 | .long 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3 |
| 199 | .long 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208 | 196 | .long 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208 |
| 200 | .long 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 | 197 | .long 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 |
| 201 | .size K256,.-K256 | 198 | CRYPTO_ASSEMBLY_OBJECT_END(K256) |
diff --git a/src/lib/libcrypto/sha/sha256_amd64_generic.S b/src/lib/libcrypto/sha/sha256_amd64_generic.S index aa098a0991..0d0e2b75d2 100644 --- a/src/lib/libcrypto/sha/sha256_amd64_generic.S +++ b/src/lib/libcrypto/sha/sha256_amd64_generic.S | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha256_amd64_generic.S,v 1.8 2026/05/07 15:40:33 jsing Exp $ */ | 1 | /* $OpenBSD: sha256_amd64_generic.S,v 1.9 2026/05/07 15:50:47 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -149,9 +149,7 @@ | |||
| 149 | * Standard x86-64 ABI: rdi = ctx, rsi = in, rdx = num | 149 | * Standard x86-64 ABI: rdi = ctx, rsi = in, rdx = num |
| 150 | */ | 150 | */ |
| 151 | .align 16 | 151 | .align 16 |
| 152 | .globl sha256_block_generic | 152 | CRYPTO_ASSEMBLY_GLOBAL_FUNCTION(sha256_block_generic): |
| 153 | .type sha256_block_generic,@function | ||
| 154 | sha256_block_generic: | ||
| 155 | _CET_ENDBR | 153 | _CET_ENDBR |
| 156 | 154 | ||
| 157 | /* Save callee save registers. */ | 155 | /* Save callee save registers. */ |
| @@ -280,8 +278,7 @@ sha256_block_generic: | |||
| 280 | * SHA-256 constants - see FIPS 180-4 section 4.2.2. | 278 | * SHA-256 constants - see FIPS 180-4 section 4.2.2. |
| 281 | */ | 279 | */ |
| 282 | .align 64 | 280 | .align 64 |
| 283 | .type K256,@object | 281 | CRYPTO_ASSEMBLY_OBJECT_START(K256): |
| 284 | K256: | ||
| 285 | .long 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5 | 282 | .long 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5 |
| 286 | .long 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5 | 283 | .long 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5 |
| 287 | .long 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3 | 284 | .long 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3 |
| @@ -298,4 +295,4 @@ K256: | |||
| 298 | .long 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3 | 295 | .long 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3 |
| 299 | .long 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208 | 296 | .long 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208 |
| 300 | .long 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 | 297 | .long 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 |
| 301 | .size K256,.-K256 | 298 | CRYPTO_ASSEMBLY_OBJECT_END(K256) |
diff --git a/src/lib/libcrypto/sha/sha256_amd64_shani.S b/src/lib/libcrypto/sha/sha256_amd64_shani.S index 10861ee7b6..91f22e44d6 100644 --- a/src/lib/libcrypto/sha/sha256_amd64_shani.S +++ b/src/lib/libcrypto/sha/sha256_amd64_shani.S | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha256_amd64_shani.S,v 1.6 2026/05/07 15:40:33 jsing Exp $ */ | 1 | /* $OpenBSD: sha256_amd64_shani.S,v 1.7 2026/05/07 15:50:47 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -86,9 +86,7 @@ | |||
| 86 | * Standard x86-64 ABI: rdi = ctx, rsi = in, rdx = num | 86 | * Standard x86-64 ABI: rdi = ctx, rsi = in, rdx = num |
| 87 | */ | 87 | */ |
| 88 | .align 16 | 88 | .align 16 |
| 89 | .globl sha256_block_shani | 89 | CRYPTO_ASSEMBLY_GLOBAL_FUNCTION(sha256_block_shani): |
| 90 | .type sha256_block_shani,@function | ||
| 91 | sha256_block_shani: | ||
| 92 | _CET_ENDBR | 90 | _CET_ENDBR |
| 93 | 91 | ||
| 94 | /* Save callee save registers. */ | 92 | /* Save callee save registers. */ |
| @@ -177,17 +175,15 @@ sha256_block_shani: | |||
| 177 | * Shuffle mask - little endian to big endian word conversion. | 175 | * Shuffle mask - little endian to big endian word conversion. |
| 178 | */ | 176 | */ |
| 179 | .align 16 | 177 | .align 16 |
| 180 | .type shufmask,@object | 178 | CRYPTO_ASSEMBLY_OBJECT_START(shufmask): |
| 181 | shufmask: | ||
| 182 | .octa 0x0c0d0e0f08090a0b0405060700010203 | 179 | .octa 0x0c0d0e0f08090a0b0405060700010203 |
| 183 | .size shufmask,.-shufmask | 180 | CRYPTO_ASSEMBLY_OBJECT_END(shufmask) |
| 184 | 181 | ||
| 185 | /* | 182 | /* |
| 186 | * SHA-256 constants - see FIPS 180-4 section 4.2.2. | 183 | * SHA-256 constants - see FIPS 180-4 section 4.2.2. |
| 187 | */ | 184 | */ |
| 188 | .align 64 | 185 | .align 64 |
| 189 | .type K256,@object | 186 | CRYPTO_ASSEMBLY_OBJECT_START(K256): |
| 190 | K256: | ||
| 191 | .long 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5 | 187 | .long 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5 |
| 192 | .long 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5 | 188 | .long 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5 |
| 193 | .long 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3 | 189 | .long 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3 |
| @@ -204,4 +200,4 @@ K256: | |||
| 204 | .long 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3 | 200 | .long 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3 |
| 205 | .long 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208 | 201 | .long 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208 |
| 206 | .long 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 | 202 | .long 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 |
| 207 | .size K256,.-K256 | 203 | CRYPTO_ASSEMBLY_OBJECT_END(K256) |
diff --git a/src/lib/libcrypto/sha/sha512_aarch64_ce.S b/src/lib/libcrypto/sha/sha512_aarch64_ce.S index af59706258..77bd44593d 100644 --- a/src/lib/libcrypto/sha/sha512_aarch64_ce.S +++ b/src/lib/libcrypto/sha/sha512_aarch64_ce.S | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha512_aarch64_ce.S,v 1.7 2026/05/07 15:41:37 jsing Exp $ */ | 1 | /* $OpenBSD: sha512_aarch64_ce.S,v 1.8 2026/05/07 15:50:47 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2023,2025 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2023,2025 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -171,8 +171,7 @@ | |||
| 171 | * | 171 | * |
| 172 | * Standard ARM ABI: x0 = ctx, x1 = in, x2 = num | 172 | * Standard ARM ABI: x0 = ctx, x1 = in, x2 = num |
| 173 | */ | 173 | */ |
| 174 | .globl sha512_block_ce | 174 | CRYPTO_ASSEMBLY_GLOBAL_FUNCTION(sha512_block_ce): |
| 175 | sha512_block_ce: | ||
| 176 | 175 | ||
| 177 | /* Save low 64 bits of v8 through v15 to the stack. */ | 176 | /* Save low 64 bits of v8 through v15 to the stack. */ |
| 178 | sub sp, sp, #32 | 177 | sub sp, sp, #32 |
| @@ -301,8 +300,7 @@ sha512_block_ce: | |||
| 301 | * SHA-512 constants - see FIPS 180-4 section 4.2.3. | 300 | * SHA-512 constants - see FIPS 180-4 section 4.2.3. |
| 302 | */ | 301 | */ |
| 303 | .align 4 | 302 | .align 4 |
| 304 | .type K512,@object | 303 | CRYPTO_ASSEMBLY_OBJECT_START(K512): |
| 305 | K512: | ||
| 306 | .quad 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc | 304 | .quad 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc |
| 307 | .quad 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118 | 305 | .quad 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118 |
| 308 | .quad 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2 | 306 | .quad 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2 |
| @@ -323,4 +321,4 @@ K512: | |||
| 323 | .quad 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b | 321 | .quad 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b |
| 324 | .quad 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c | 322 | .quad 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c |
| 325 | .quad 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 | 323 | .quad 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 |
| 326 | .size K512,.-K512 | 324 | CRYPTO_ASSEMBLY_OBJECT_END(K512) |
diff --git a/src/lib/libcrypto/sha/sha512_amd64_generic.S b/src/lib/libcrypto/sha/sha512_amd64_generic.S index d4b6ebc0ff..61028c0a0b 100644 --- a/src/lib/libcrypto/sha/sha512_amd64_generic.S +++ b/src/lib/libcrypto/sha/sha512_amd64_generic.S | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: sha512_amd64_generic.S,v 1.6 2026/05/07 15:40:33 jsing Exp $ */ | 1 | /* $OpenBSD: sha512_amd64_generic.S,v 1.7 2026/05/07 15:50:47 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -150,9 +150,7 @@ | |||
| 150 | * Standard x86-64 ABI: rdi = ctx, rsi = in, rdx = num | 150 | * Standard x86-64 ABI: rdi = ctx, rsi = in, rdx = num |
| 151 | */ | 151 | */ |
| 152 | .align 16 | 152 | .align 16 |
| 153 | .globl sha512_block_generic | 153 | CRYPTO_ASSEMBLY_GLOBAL_FUNCTION(sha512_block_generic): |
| 154 | .type sha512_block_generic,@function | ||
| 155 | sha512_block_generic: | ||
| 156 | _CET_ENDBR | 154 | _CET_ENDBR |
| 157 | 155 | ||
| 158 | /* Save callee save registers. */ | 156 | /* Save callee save registers. */ |
| @@ -281,8 +279,7 @@ sha512_block_generic: | |||
| 281 | * SHA-512 constants - see FIPS 180-4 section 4.2.3. | 279 | * SHA-512 constants - see FIPS 180-4 section 4.2.3. |
| 282 | */ | 280 | */ |
| 283 | .align 64 | 281 | .align 64 |
| 284 | .type K512,@object | 282 | CRYPTO_ASSEMBLY_OBJECT_START(K512): |
| 285 | K512: | ||
| 286 | .quad 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc | 283 | .quad 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc |
| 287 | .quad 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118 | 284 | .quad 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118 |
| 288 | .quad 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2 | 285 | .quad 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2 |
| @@ -303,4 +300,4 @@ K512: | |||
| 303 | .quad 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b | 300 | .quad 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b |
| 304 | .quad 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c | 301 | .quad 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c |
| 305 | .quad 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 | 302 | .quad 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 |
| 306 | .size K512,.-K512 | 303 | CRYPTO_ASSEMBLY_OBJECT_END(K512) |
