├── .gitignore ├── LICENSE ├── README.md ├── build.zig ├── build.zig.zon ├── crypto ├── aes │ ├── aes-x86_64.s │ ├── aesni-mb-x86_64.s │ ├── aesni-sha1-x86_64.s │ ├── aesni-sha256-x86_64.s │ ├── aesni-x86_64.s │ ├── bsaes-x86_64.s │ └── vpaes-x86_64.s ├── bn │ ├── rsaz-2k-avx512.s │ ├── rsaz-3k-avx512.s │ ├── rsaz-4k-avx512.s │ ├── rsaz-avx2.s │ ├── rsaz-x86_64.s │ ├── x86_64-gf2m.s │ ├── x86_64-mont.s │ └── x86_64-mont5.s ├── buildinf.h ├── camellia │ └── cmll-x86_64.s ├── chacha │ └── chacha-x86_64.s ├── ec │ ├── ecp_nistz256-x86_64.s │ └── x25519-x86_64.s ├── md5 │ └── md5-x86_64.s ├── modes │ ├── aes-gcm-avx512.s │ ├── aesni-gcm-x86_64.s │ └── ghash-x86_64.s ├── params_idx.c ├── poly1305 │ └── poly1305-x86_64.s ├── rc4 │ ├── rc4-md5-x86_64.s │ └── rc4-x86_64.s ├── sha │ ├── keccak1600-x86_64.s │ ├── sha1-mb-x86_64.s │ ├── sha1-x86_64.s │ ├── sha256-mb-x86_64.s │ ├── sha256-x86_64.s │ └── sha512-x86_64.s ├── whrlpool │ └── wp-x86_64.s └── x86_64cpuid.s ├── include ├── crypto │ ├── bn_conf.h │ └── dso_conf.h ├── internal │ └── param_names.h ├── openssl │ ├── asn1.h │ ├── asn1t.h │ ├── bio.h │ ├── cmp.h │ ├── cms.h │ ├── conf.h │ ├── configuration.h │ ├── core_names.h │ ├── crmf.h │ ├── crypto.h │ ├── ct.h │ ├── err.h │ ├── ess.h │ ├── fipskey.h │ ├── lhash.h │ ├── ocsp.h │ ├── opensslv.h │ ├── pkcs12.h │ ├── pkcs7.h │ ├── safestack.h │ ├── srp.h │ ├── ssl.h │ ├── ui.h │ ├── x509.h │ ├── x509_vfy.h │ └── x509v3.h └── prov │ ├── der_digests.h │ ├── der_dsa.h │ ├── der_ec.h │ ├── der_ecx.h │ ├── der_rsa.h │ ├── der_sm2.h │ └── der_wrap.h └── providers └── common └── der ├── der_digests_gen.c ├── der_dsa_gen.c ├── der_ec_gen.c ├── der_ecx_gen.c ├── der_rsa_gen.c ├── der_sm2_gen.c └── der_wrap_gen.c /.gitignore: -------------------------------------------------------------------------------- 1 | /.zig-cache 2 | /zig-out 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (Expat) 2 | 3 | Copyright (c) contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # openssl zig package 2 | 3 | This is openssl ported to the Zig Build System. 4 | 5 | ## Status 6 | 7 | I was able to use this to build [CPython](https://github.com/thejoshwolfe/cpython) for x86_64-linux. 8 | 9 | Adding support for other operating systems and CPU architectures is straightforward and will 10 | require fiddling with the build script to take into account the target. 11 | 12 | ## Anti-Endorsement 13 | 14 | I do not endorse openssl. I think it is a pile of trash. My motivation for this 15 | project is because it is a dependency of CPython, which is a dependency of the 16 | most active YouTube downloader, [ytdlp](https://github.com/yt-dlp/yt-dlp). 17 | -------------------------------------------------------------------------------- /build.zig.zon: -------------------------------------------------------------------------------- 1 | .{ 2 | .name = .openssl, 3 | .version = "3.3.1-2", 4 | .fingerprint = 0x773a47f1dd422f4c, 5 | .minimum_zig_version = "0.14.0", 6 | 7 | .dependencies = .{ 8 | .openssl = .{ 9 | .url = "https://github.com/openssl/openssl/releases/download/openssl-3.3.0/openssl-3.3.0.tar.gz", 10 | .hash = "N-V-__8AAIg12QPZxABEXJw-1G9x69vDZLezSUcyMYhML25U", 11 | }, 12 | }, 13 | 14 | .paths = .{ 15 | "LICENSE", 16 | "README.md", 17 | "build.zig", 18 | "build.zig.zon", 19 | "crypto", 20 | "include", 21 | "providers", 22 | }, 23 | } 24 | -------------------------------------------------------------------------------- /crypto/bn/x86_64-gf2m.s: -------------------------------------------------------------------------------- 1 | .text 2 | 3 | .type _mul_1x1,@function 4 | .align 16 5 | _mul_1x1: 6 | .cfi_startproc 7 | subq $128+8,%rsp 8 | .cfi_adjust_cfa_offset 128+8 9 | movq $-1,%r9 10 | leaq (%rax,%rax,1),%rsi 11 | shrq $3,%r9 12 | leaq (,%rax,4),%rdi 13 | andq %rax,%r9 14 | leaq (,%rax,8),%r12 15 | sarq $63,%rax 16 | leaq (%r9,%r9,1),%r10 17 | sarq $63,%rsi 18 | leaq (,%r9,4),%r11 19 | andq %rbp,%rax 20 | sarq $63,%rdi 21 | movq %rax,%rdx 22 | shlq $63,%rax 23 | andq %rbp,%rsi 24 | shrq $1,%rdx 25 | movq %rsi,%rcx 26 | shlq $62,%rsi 27 | andq %rbp,%rdi 28 | shrq $2,%rcx 29 | xorq %rsi,%rax 30 | movq %rdi,%rbx 31 | shlq $61,%rdi 32 | xorq %rcx,%rdx 33 | shrq $3,%rbx 34 | xorq %rdi,%rax 35 | xorq %rbx,%rdx 36 | 37 | movq %r9,%r13 38 | movq $0,0(%rsp) 39 | xorq %r10,%r13 40 | movq %r9,8(%rsp) 41 | movq %r11,%r14 42 | movq %r10,16(%rsp) 43 | xorq %r12,%r14 44 | movq %r13,24(%rsp) 45 | 46 | xorq %r11,%r9 47 | movq %r11,32(%rsp) 48 | xorq %r11,%r10 49 | movq %r9,40(%rsp) 50 | xorq %r11,%r13 51 | movq %r10,48(%rsp) 52 | xorq %r14,%r9 53 | movq %r13,56(%rsp) 54 | xorq %r14,%r10 55 | 56 | movq %r12,64(%rsp) 57 | xorq %r14,%r13 58 | movq %r9,72(%rsp) 59 | xorq %r11,%r9 60 | movq %r10,80(%rsp) 61 | xorq %r11,%r10 62 | movq %r13,88(%rsp) 63 | 64 | xorq %r11,%r13 65 | movq %r14,96(%rsp) 66 | movq %r8,%rsi 67 | movq %r9,104(%rsp) 68 | andq %rbp,%rsi 69 | movq %r10,112(%rsp) 70 | shrq $4,%rbp 71 | movq %r13,120(%rsp) 72 | movq %r8,%rdi 73 | andq %rbp,%rdi 74 | shrq $4,%rbp 75 | 76 | movq (%rsp,%rsi,8),%xmm0 77 | movq %r8,%rsi 78 | andq %rbp,%rsi 79 | shrq $4,%rbp 80 | movq (%rsp,%rdi,8),%rcx 81 | movq %r8,%rdi 82 | movq %rcx,%rbx 83 | shlq $4,%rcx 84 | andq %rbp,%rdi 85 | movq (%rsp,%rsi,8),%xmm1 86 | shrq $60,%rbx 87 | xorq %rcx,%rax 88 | pslldq $1,%xmm1 89 | movq %r8,%rsi 90 | shrq $4,%rbp 91 | xorq %rbx,%rdx 92 | andq %rbp,%rsi 93 | shrq $4,%rbp 94 | pxor %xmm1,%xmm0 95 | movq (%rsp,%rdi,8),%rcx 96 | movq %r8,%rdi 97 | movq %rcx,%rbx 98 | shlq $12,%rcx 99 | andq %rbp,%rdi 100 | movq (%rsp,%rsi,8),%xmm1 101 | shrq $52,%rbx 102 | xorq %rcx,%rax 103 | pslldq $2,%xmm1 104 | movq %r8,%rsi 105 | shrq $4,%rbp 106 | xorq %rbx,%rdx 107 | andq %rbp,%rsi 108 | shrq $4,%rbp 109 | pxor %xmm1,%xmm0 110 | movq (%rsp,%rdi,8),%rcx 111 | movq %r8,%rdi 112 | movq %rcx,%rbx 113 | shlq $20,%rcx 114 | andq %rbp,%rdi 115 | movq (%rsp,%rsi,8),%xmm1 116 | shrq $44,%rbx 117 | xorq %rcx,%rax 118 | pslldq $3,%xmm1 119 | movq %r8,%rsi 120 | shrq $4,%rbp 121 | xorq %rbx,%rdx 122 | andq %rbp,%rsi 123 | shrq $4,%rbp 124 | pxor %xmm1,%xmm0 125 | movq (%rsp,%rdi,8),%rcx 126 | movq %r8,%rdi 127 | movq %rcx,%rbx 128 | shlq $28,%rcx 129 | andq %rbp,%rdi 130 | movq (%rsp,%rsi,8),%xmm1 131 | shrq $36,%rbx 132 | xorq %rcx,%rax 133 | pslldq $4,%xmm1 134 | movq %r8,%rsi 135 | shrq $4,%rbp 136 | xorq %rbx,%rdx 137 | andq %rbp,%rsi 138 | shrq $4,%rbp 139 | pxor %xmm1,%xmm0 140 | movq (%rsp,%rdi,8),%rcx 141 | movq %r8,%rdi 142 | movq %rcx,%rbx 143 | shlq $36,%rcx 144 | andq %rbp,%rdi 145 | movq (%rsp,%rsi,8),%xmm1 146 | shrq $28,%rbx 147 | xorq %rcx,%rax 148 | pslldq $5,%xmm1 149 | movq %r8,%rsi 150 | shrq $4,%rbp 151 | xorq %rbx,%rdx 152 | andq %rbp,%rsi 153 | shrq $4,%rbp 154 | pxor %xmm1,%xmm0 155 | movq (%rsp,%rdi,8),%rcx 156 | movq %r8,%rdi 157 | movq %rcx,%rbx 158 | shlq $44,%rcx 159 | andq %rbp,%rdi 160 | movq (%rsp,%rsi,8),%xmm1 161 | shrq $20,%rbx 162 | xorq %rcx,%rax 163 | pslldq $6,%xmm1 164 | movq %r8,%rsi 165 | shrq $4,%rbp 166 | xorq %rbx,%rdx 167 | andq %rbp,%rsi 168 | shrq $4,%rbp 169 | pxor %xmm1,%xmm0 170 | movq (%rsp,%rdi,8),%rcx 171 | movq %r8,%rdi 172 | movq %rcx,%rbx 173 | shlq $52,%rcx 174 | andq %rbp,%rdi 175 | movq (%rsp,%rsi,8),%xmm1 176 | shrq $12,%rbx 177 | xorq %rcx,%rax 178 | pslldq $7,%xmm1 179 | movq %r8,%rsi 180 | shrq $4,%rbp 181 | xorq %rbx,%rdx 182 | andq %rbp,%rsi 183 | shrq $4,%rbp 184 | pxor %xmm1,%xmm0 185 | movq (%rsp,%rdi,8),%rcx 186 | movq %rcx,%rbx 187 | shlq $60,%rcx 188 | .byte 102,72,15,126,198 189 | shrq $4,%rbx 190 | xorq %rcx,%rax 191 | psrldq $8,%xmm0 192 | xorq %rbx,%rdx 193 | .byte 102,72,15,126,199 194 | xorq %rsi,%rax 195 | xorq %rdi,%rdx 196 | 197 | addq $128+8,%rsp 198 | .cfi_adjust_cfa_offset -128-8 199 | .byte 0xf3,0xc3 200 | .Lend_mul_1x1: 201 | .cfi_endproc 202 | .size _mul_1x1,.-_mul_1x1 203 | 204 | .globl bn_GF2m_mul_2x2 205 | .type bn_GF2m_mul_2x2,@function 206 | .align 16 207 | bn_GF2m_mul_2x2: 208 | .cfi_startproc 209 | movq %rsp,%rax 210 | movq OPENSSL_ia32cap_P(%rip),%r10 211 | btq $33,%r10 212 | jnc .Lvanilla_mul_2x2 213 | 214 | .byte 102,72,15,110,198 215 | .byte 102,72,15,110,201 216 | .byte 102,72,15,110,210 217 | .byte 102,73,15,110,216 218 | movdqa %xmm0,%xmm4 219 | movdqa %xmm1,%xmm5 220 | .byte 102,15,58,68,193,0 221 | pxor %xmm2,%xmm4 222 | pxor %xmm3,%xmm5 223 | .byte 102,15,58,68,211,0 224 | .byte 102,15,58,68,229,0 225 | xorps %xmm0,%xmm4 226 | xorps %xmm2,%xmm4 227 | movdqa %xmm4,%xmm5 228 | pslldq $8,%xmm4 229 | psrldq $8,%xmm5 230 | pxor %xmm4,%xmm2 231 | pxor %xmm5,%xmm0 232 | movdqu %xmm2,0(%rdi) 233 | movdqu %xmm0,16(%rdi) 234 | .byte 0xf3,0xc3 235 | 236 | .align 16 237 | .Lvanilla_mul_2x2: 238 | leaq -136(%rsp),%rsp 239 | .cfi_adjust_cfa_offset 8*17 240 | movq %r14,80(%rsp) 241 | .cfi_rel_offset %r14,8*10 242 | movq %r13,88(%rsp) 243 | .cfi_rel_offset %r13,8*11 244 | movq %r12,96(%rsp) 245 | .cfi_rel_offset %r12,8*12 246 | movq %rbp,104(%rsp) 247 | .cfi_rel_offset %rbp,8*13 248 | movq %rbx,112(%rsp) 249 | .cfi_rel_offset %rbx,8*14 250 | .Lbody_mul_2x2: 251 | movq %rdi,32(%rsp) 252 | movq %rsi,40(%rsp) 253 | movq %rdx,48(%rsp) 254 | movq %rcx,56(%rsp) 255 | movq %r8,64(%rsp) 256 | 257 | movq $0xf,%r8 258 | movq %rsi,%rax 259 | movq %rcx,%rbp 260 | call _mul_1x1 261 | movq %rax,16(%rsp) 262 | movq %rdx,24(%rsp) 263 | 264 | movq 48(%rsp),%rax 265 | movq 64(%rsp),%rbp 266 | call _mul_1x1 267 | movq %rax,0(%rsp) 268 | movq %rdx,8(%rsp) 269 | 270 | movq 40(%rsp),%rax 271 | movq 56(%rsp),%rbp 272 | xorq 48(%rsp),%rax 273 | xorq 64(%rsp),%rbp 274 | call _mul_1x1 275 | movq 0(%rsp),%rbx 276 | movq 8(%rsp),%rcx 277 | movq 16(%rsp),%rdi 278 | movq 24(%rsp),%rsi 279 | movq 32(%rsp),%rbp 280 | 281 | xorq %rdx,%rax 282 | xorq %rcx,%rdx 283 | xorq %rbx,%rax 284 | movq %rbx,0(%rbp) 285 | xorq %rdi,%rdx 286 | movq %rsi,24(%rbp) 287 | xorq %rsi,%rax 288 | xorq %rsi,%rdx 289 | xorq %rdx,%rax 290 | movq %rdx,16(%rbp) 291 | movq %rax,8(%rbp) 292 | 293 | movq 80(%rsp),%r14 294 | .cfi_restore %r14 295 | movq 88(%rsp),%r13 296 | .cfi_restore %r13 297 | movq 96(%rsp),%r12 298 | .cfi_restore %r12 299 | movq 104(%rsp),%rbp 300 | .cfi_restore %rbp 301 | movq 112(%rsp),%rbx 302 | .cfi_restore %rbx 303 | leaq 136(%rsp),%rsp 304 | .cfi_adjust_cfa_offset -8*17 305 | .Lepilogue_mul_2x2: 306 | .byte 0xf3,0xc3 307 | .Lend_mul_2x2: 308 | .cfi_endproc 309 | .size bn_GF2m_mul_2x2,.-bn_GF2m_mul_2x2 310 | .byte 71,70,40,50,94,109,41,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 311 | .align 16 312 | .section ".note.gnu.property", "a" 313 | .p2align 3 314 | .long 1f - 0f 315 | .long 4f - 1f 316 | .long 5 317 | 0: 318 | # "GNU" encoded with .byte, since .asciz isn't supported 319 | # on Solaris. 320 | .byte 0x47 321 | .byte 0x4e 322 | .byte 0x55 323 | .byte 0 324 | 1: 325 | .p2align 3 326 | .long 0xc0000002 327 | .long 3f - 2f 328 | 2: 329 | .long 3 330 | 3: 331 | .p2align 3 332 | 4: 333 | -------------------------------------------------------------------------------- /crypto/buildinf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by util/mkbuildinf.pl 4 | * 5 | * Copyright 2014-2017 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #define PLATFORM "platform: linux-x86_64" 14 | #define DATE "built on: Tue Jan 1 00:00:00 1980 UTC" 15 | 16 | /* 17 | * Generate compiler_flags as an array of individual characters. This is a 18 | * workaround for the situation where CFLAGS gets too long for a C90 string 19 | * literal 20 | */ 21 | static const char compiler_flags[] = { 22 | 'c','o','m','p','i','l','e','r',':',' ','g','c','c',' ','-','f', 23 | 'P','I','C',' ','-','p','t','h','r','e','a','d',' ','-','m','6', 24 | '4',' ','-','W','a',',','-','-','n','o','e','x','e','c','s','t', 25 | 'a','c','k',' ','-','W','a','l','l',' ','-','O','3',' ','-','D', 26 | 'O','P','E','N','S','S','L','_','U','S','E','_','N','O','D','E', 27 | 'L','E','T','E',' ','-','D','L','_','E','N','D','I','A','N',' ', 28 | '-','D','O','P','E','N','S','S','L','_','P','I','C',' ','-','D', 29 | 'O','P','E','N','S','S','L','_','B','U','I','L','D','I','N','G', 30 | '_','O','P','E','N','S','S','L',' ','-','D','N','D','E','B','U', 31 | 'G','\0' 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /crypto/ec/x25519-x86_64.s: -------------------------------------------------------------------------------- 1 | .text 2 | 3 | .globl x25519_fe51_mul 4 | .type x25519_fe51_mul,@function 5 | .align 32 6 | x25519_fe51_mul: 7 | .cfi_startproc 8 | pushq %rbp 9 | .cfi_adjust_cfa_offset 8 10 | .cfi_offset %rbp,-16 11 | pushq %rbx 12 | .cfi_adjust_cfa_offset 8 13 | .cfi_offset %rbx,-24 14 | pushq %r12 15 | .cfi_adjust_cfa_offset 8 16 | .cfi_offset %r12,-32 17 | pushq %r13 18 | .cfi_adjust_cfa_offset 8 19 | .cfi_offset %r13,-40 20 | pushq %r14 21 | .cfi_adjust_cfa_offset 8 22 | .cfi_offset %r14,-48 23 | pushq %r15 24 | .cfi_adjust_cfa_offset 8 25 | .cfi_offset %r15,-56 26 | leaq -40(%rsp),%rsp 27 | .cfi_adjust_cfa_offset 40 28 | .Lfe51_mul_body: 29 | 30 | movq 0(%rsi),%rax 31 | movq 0(%rdx),%r11 32 | movq 8(%rdx),%r12 33 | movq 16(%rdx),%r13 34 | movq 24(%rdx),%rbp 35 | movq 32(%rdx),%r14 36 | 37 | movq %rdi,32(%rsp) 38 | movq %rax,%rdi 39 | mulq %r11 40 | movq %r11,0(%rsp) 41 | movq %rax,%rbx 42 | movq %rdi,%rax 43 | movq %rdx,%rcx 44 | mulq %r12 45 | movq %r12,8(%rsp) 46 | movq %rax,%r8 47 | movq %rdi,%rax 48 | leaq (%r14,%r14,8),%r15 49 | movq %rdx,%r9 50 | mulq %r13 51 | movq %r13,16(%rsp) 52 | movq %rax,%r10 53 | movq %rdi,%rax 54 | leaq (%r14,%r15,2),%rdi 55 | movq %rdx,%r11 56 | mulq %rbp 57 | movq %rax,%r12 58 | movq 0(%rsi),%rax 59 | movq %rdx,%r13 60 | mulq %r14 61 | movq %rax,%r14 62 | movq 8(%rsi),%rax 63 | movq %rdx,%r15 64 | 65 | mulq %rdi 66 | addq %rax,%rbx 67 | movq 16(%rsi),%rax 68 | adcq %rdx,%rcx 69 | mulq %rdi 70 | addq %rax,%r8 71 | movq 24(%rsi),%rax 72 | adcq %rdx,%r9 73 | mulq %rdi 74 | addq %rax,%r10 75 | movq 32(%rsi),%rax 76 | adcq %rdx,%r11 77 | mulq %rdi 78 | imulq $19,%rbp,%rdi 79 | addq %rax,%r12 80 | movq 8(%rsi),%rax 81 | adcq %rdx,%r13 82 | mulq %rbp 83 | movq 16(%rsp),%rbp 84 | addq %rax,%r14 85 | movq 16(%rsi),%rax 86 | adcq %rdx,%r15 87 | 88 | mulq %rdi 89 | addq %rax,%rbx 90 | movq 24(%rsi),%rax 91 | adcq %rdx,%rcx 92 | mulq %rdi 93 | addq %rax,%r8 94 | movq 32(%rsi),%rax 95 | adcq %rdx,%r9 96 | mulq %rdi 97 | imulq $19,%rbp,%rdi 98 | addq %rax,%r10 99 | movq 8(%rsi),%rax 100 | adcq %rdx,%r11 101 | mulq %rbp 102 | addq %rax,%r12 103 | movq 16(%rsi),%rax 104 | adcq %rdx,%r13 105 | mulq %rbp 106 | movq 8(%rsp),%rbp 107 | addq %rax,%r14 108 | movq 24(%rsi),%rax 109 | adcq %rdx,%r15 110 | 111 | mulq %rdi 112 | addq %rax,%rbx 113 | movq 32(%rsi),%rax 114 | adcq %rdx,%rcx 115 | mulq %rdi 116 | addq %rax,%r8 117 | movq 8(%rsi),%rax 118 | adcq %rdx,%r9 119 | mulq %rbp 120 | imulq $19,%rbp,%rdi 121 | addq %rax,%r10 122 | movq 16(%rsi),%rax 123 | adcq %rdx,%r11 124 | mulq %rbp 125 | addq %rax,%r12 126 | movq 24(%rsi),%rax 127 | adcq %rdx,%r13 128 | mulq %rbp 129 | movq 0(%rsp),%rbp 130 | addq %rax,%r14 131 | movq 32(%rsi),%rax 132 | adcq %rdx,%r15 133 | 134 | mulq %rdi 135 | addq %rax,%rbx 136 | movq 8(%rsi),%rax 137 | adcq %rdx,%rcx 138 | mulq %rbp 139 | addq %rax,%r8 140 | movq 16(%rsi),%rax 141 | adcq %rdx,%r9 142 | mulq %rbp 143 | addq %rax,%r10 144 | movq 24(%rsi),%rax 145 | adcq %rdx,%r11 146 | mulq %rbp 147 | addq %rax,%r12 148 | movq 32(%rsi),%rax 149 | adcq %rdx,%r13 150 | mulq %rbp 151 | addq %rax,%r14 152 | adcq %rdx,%r15 153 | 154 | movq 32(%rsp),%rdi 155 | jmp .Lreduce51 156 | .Lfe51_mul_epilogue: 157 | .cfi_endproc 158 | .size x25519_fe51_mul,.-x25519_fe51_mul 159 | 160 | .globl x25519_fe51_sqr 161 | .type x25519_fe51_sqr,@function 162 | .align 32 163 | x25519_fe51_sqr: 164 | .cfi_startproc 165 | pushq %rbp 166 | .cfi_adjust_cfa_offset 8 167 | .cfi_offset %rbp,-16 168 | pushq %rbx 169 | .cfi_adjust_cfa_offset 8 170 | .cfi_offset %rbx,-24 171 | pushq %r12 172 | .cfi_adjust_cfa_offset 8 173 | .cfi_offset %r12,-32 174 | pushq %r13 175 | .cfi_adjust_cfa_offset 8 176 | .cfi_offset %r13,-40 177 | pushq %r14 178 | .cfi_adjust_cfa_offset 8 179 | .cfi_offset %r14,-48 180 | pushq %r15 181 | .cfi_adjust_cfa_offset 8 182 | .cfi_offset %r15,-56 183 | leaq -40(%rsp),%rsp 184 | .cfi_adjust_cfa_offset 40 185 | .Lfe51_sqr_body: 186 | 187 | movq 0(%rsi),%rax 188 | movq 16(%rsi),%r15 189 | movq 32(%rsi),%rbp 190 | 191 | movq %rdi,32(%rsp) 192 | leaq (%rax,%rax,1),%r14 193 | mulq %rax 194 | movq %rax,%rbx 195 | movq 8(%rsi),%rax 196 | movq %rdx,%rcx 197 | mulq %r14 198 | movq %rax,%r8 199 | movq %r15,%rax 200 | movq %r15,0(%rsp) 201 | movq %rdx,%r9 202 | mulq %r14 203 | movq %rax,%r10 204 | movq 24(%rsi),%rax 205 | movq %rdx,%r11 206 | imulq $19,%rbp,%rdi 207 | mulq %r14 208 | movq %rax,%r12 209 | movq %rbp,%rax 210 | movq %rdx,%r13 211 | mulq %r14 212 | movq %rax,%r14 213 | movq %rbp,%rax 214 | movq %rdx,%r15 215 | 216 | mulq %rdi 217 | addq %rax,%r12 218 | movq 8(%rsi),%rax 219 | adcq %rdx,%r13 220 | 221 | movq 24(%rsi),%rsi 222 | leaq (%rax,%rax,1),%rbp 223 | mulq %rax 224 | addq %rax,%r10 225 | movq 0(%rsp),%rax 226 | adcq %rdx,%r11 227 | mulq %rbp 228 | addq %rax,%r12 229 | movq %rbp,%rax 230 | adcq %rdx,%r13 231 | mulq %rsi 232 | addq %rax,%r14 233 | movq %rbp,%rax 234 | adcq %rdx,%r15 235 | imulq $19,%rsi,%rbp 236 | mulq %rdi 237 | addq %rax,%rbx 238 | leaq (%rsi,%rsi,1),%rax 239 | adcq %rdx,%rcx 240 | 241 | mulq %rdi 242 | addq %rax,%r10 243 | movq %rsi,%rax 244 | adcq %rdx,%r11 245 | mulq %rbp 246 | addq %rax,%r8 247 | movq 0(%rsp),%rax 248 | adcq %rdx,%r9 249 | 250 | leaq (%rax,%rax,1),%rsi 251 | mulq %rax 252 | addq %rax,%r14 253 | movq %rbp,%rax 254 | adcq %rdx,%r15 255 | mulq %rsi 256 | addq %rax,%rbx 257 | movq %rsi,%rax 258 | adcq %rdx,%rcx 259 | mulq %rdi 260 | addq %rax,%r8 261 | adcq %rdx,%r9 262 | 263 | movq 32(%rsp),%rdi 264 | jmp .Lreduce51 265 | 266 | .align 32 267 | .Lreduce51: 268 | movq $0x7ffffffffffff,%rbp 269 | 270 | movq %r10,%rdx 271 | shrq $51,%r10 272 | shlq $13,%r11 273 | andq %rbp,%rdx 274 | orq %r10,%r11 275 | addq %r11,%r12 276 | adcq $0,%r13 277 | 278 | movq %rbx,%rax 279 | shrq $51,%rbx 280 | shlq $13,%rcx 281 | andq %rbp,%rax 282 | orq %rbx,%rcx 283 | addq %rcx,%r8 284 | adcq $0,%r9 285 | 286 | movq %r12,%rbx 287 | shrq $51,%r12 288 | shlq $13,%r13 289 | andq %rbp,%rbx 290 | orq %r12,%r13 291 | addq %r13,%r14 292 | adcq $0,%r15 293 | 294 | movq %r8,%rcx 295 | shrq $51,%r8 296 | shlq $13,%r9 297 | andq %rbp,%rcx 298 | orq %r8,%r9 299 | addq %r9,%rdx 300 | 301 | movq %r14,%r10 302 | shrq $51,%r14 303 | shlq $13,%r15 304 | andq %rbp,%r10 305 | orq %r14,%r15 306 | 307 | leaq (%r15,%r15,8),%r14 308 | leaq (%r15,%r14,2),%r15 309 | addq %r15,%rax 310 | 311 | movq %rdx,%r8 312 | andq %rbp,%rdx 313 | shrq $51,%r8 314 | addq %r8,%rbx 315 | 316 | movq %rax,%r9 317 | andq %rbp,%rax 318 | shrq $51,%r9 319 | addq %r9,%rcx 320 | 321 | movq %rax,0(%rdi) 322 | movq %rcx,8(%rdi) 323 | movq %rdx,16(%rdi) 324 | movq %rbx,24(%rdi) 325 | movq %r10,32(%rdi) 326 | 327 | movq 40(%rsp),%r15 328 | .cfi_restore %r15 329 | movq 48(%rsp),%r14 330 | .cfi_restore %r14 331 | movq 56(%rsp),%r13 332 | .cfi_restore %r13 333 | movq 64(%rsp),%r12 334 | .cfi_restore %r12 335 | movq 72(%rsp),%rbx 336 | .cfi_restore %rbx 337 | movq 80(%rsp),%rbp 338 | .cfi_restore %rbp 339 | leaq 88(%rsp),%rsp 340 | .cfi_adjust_cfa_offset 88 341 | .Lfe51_sqr_epilogue: 342 | .byte 0xf3,0xc3 343 | .cfi_endproc 344 | .size x25519_fe51_sqr,.-x25519_fe51_sqr 345 | 346 | .globl x25519_fe51_mul121666 347 | .type x25519_fe51_mul121666,@function 348 | .align 32 349 | x25519_fe51_mul121666: 350 | .cfi_startproc 351 | pushq %rbp 352 | .cfi_adjust_cfa_offset 8 353 | .cfi_offset %rbp,-16 354 | pushq %rbx 355 | .cfi_adjust_cfa_offset 8 356 | .cfi_offset %rbx,-24 357 | pushq %r12 358 | .cfi_adjust_cfa_offset 8 359 | .cfi_offset %r12,-32 360 | pushq %r13 361 | .cfi_adjust_cfa_offset 8 362 | .cfi_offset %r13,-40 363 | pushq %r14 364 | .cfi_adjust_cfa_offset 8 365 | .cfi_offset %r14,-48 366 | pushq %r15 367 | .cfi_adjust_cfa_offset 8 368 | .cfi_offset %r15,-56 369 | leaq -40(%rsp),%rsp 370 | .cfi_adjust_cfa_offset 40 371 | .Lfe51_mul121666_body: 372 | movl $121666,%eax 373 | 374 | mulq 0(%rsi) 375 | movq %rax,%rbx 376 | movl $121666,%eax 377 | movq %rdx,%rcx 378 | mulq 8(%rsi) 379 | movq %rax,%r8 380 | movl $121666,%eax 381 | movq %rdx,%r9 382 | mulq 16(%rsi) 383 | movq %rax,%r10 384 | movl $121666,%eax 385 | movq %rdx,%r11 386 | mulq 24(%rsi) 387 | movq %rax,%r12 388 | movl $121666,%eax 389 | movq %rdx,%r13 390 | mulq 32(%rsi) 391 | movq %rax,%r14 392 | movq %rdx,%r15 393 | 394 | jmp .Lreduce51 395 | .Lfe51_mul121666_epilogue: 396 | .cfi_endproc 397 | .size x25519_fe51_mul121666,.-x25519_fe51_mul121666 398 | 399 | .globl x25519_fe64_eligible 400 | .type x25519_fe64_eligible,@function 401 | .align 32 402 | x25519_fe64_eligible: 403 | .cfi_startproc 404 | movl OPENSSL_ia32cap_P+8(%rip),%ecx 405 | xorl %eax,%eax 406 | andl $0x80100,%ecx 407 | cmpl $0x80100,%ecx 408 | cmovel %ecx,%eax 409 | .byte 0xf3,0xc3 410 | .cfi_endproc 411 | .size x25519_fe64_eligible,.-x25519_fe64_eligible 412 | 413 | .globl x25519_fe64_mul 414 | .type x25519_fe64_mul,@function 415 | .align 32 416 | x25519_fe64_mul: 417 | .cfi_startproc 418 | pushq %rbp 419 | .cfi_adjust_cfa_offset 8 420 | .cfi_offset %rbp,-16 421 | pushq %rbx 422 | .cfi_adjust_cfa_offset 8 423 | .cfi_offset %rbx,-24 424 | pushq %r12 425 | .cfi_adjust_cfa_offset 8 426 | .cfi_offset %r12,-32 427 | pushq %r13 428 | .cfi_adjust_cfa_offset 8 429 | .cfi_offset %r13,-40 430 | pushq %r14 431 | .cfi_adjust_cfa_offset 8 432 | .cfi_offset %r14,-48 433 | pushq %r15 434 | .cfi_adjust_cfa_offset 8 435 | .cfi_offset %r15,-56 436 | pushq %rdi 437 | .cfi_adjust_cfa_offset 8 438 | .cfi_offset %rdi,-64 439 | leaq -16(%rsp),%rsp 440 | .cfi_adjust_cfa_offset 16 441 | .Lfe64_mul_body: 442 | 443 | movq %rdx,%rax 444 | movq 0(%rdx),%rbp 445 | movq 0(%rsi),%rdx 446 | movq 8(%rax),%rcx 447 | movq 16(%rax),%r14 448 | movq 24(%rax),%r15 449 | 450 | mulxq %rbp,%r8,%rax 451 | xorl %edi,%edi 452 | mulxq %rcx,%r9,%rbx 453 | adcxq %rax,%r9 454 | mulxq %r14,%r10,%rax 455 | adcxq %rbx,%r10 456 | mulxq %r15,%r11,%r12 457 | movq 8(%rsi),%rdx 458 | adcxq %rax,%r11 459 | movq %r14,(%rsp) 460 | adcxq %rdi,%r12 461 | 462 | mulxq %rbp,%rax,%rbx 463 | adoxq %rax,%r9 464 | adcxq %rbx,%r10 465 | mulxq %rcx,%rax,%rbx 466 | adoxq %rax,%r10 467 | adcxq %rbx,%r11 468 | mulxq %r14,%rax,%rbx 469 | adoxq %rax,%r11 470 | adcxq %rbx,%r12 471 | mulxq %r15,%rax,%r13 472 | movq 16(%rsi),%rdx 473 | adoxq %rax,%r12 474 | adcxq %rdi,%r13 475 | adoxq %rdi,%r13 476 | 477 | mulxq %rbp,%rax,%rbx 478 | adcxq %rax,%r10 479 | adoxq %rbx,%r11 480 | mulxq %rcx,%rax,%rbx 481 | adcxq %rax,%r11 482 | adoxq %rbx,%r12 483 | mulxq %r14,%rax,%rbx 484 | adcxq %rax,%r12 485 | adoxq %rbx,%r13 486 | mulxq %r15,%rax,%r14 487 | movq 24(%rsi),%rdx 488 | adcxq %rax,%r13 489 | adoxq %rdi,%r14 490 | adcxq %rdi,%r14 491 | 492 | mulxq %rbp,%rax,%rbx 493 | adoxq %rax,%r11 494 | adcxq %rbx,%r12 495 | mulxq %rcx,%rax,%rbx 496 | adoxq %rax,%r12 497 | adcxq %rbx,%r13 498 | mulxq (%rsp),%rax,%rbx 499 | adoxq %rax,%r13 500 | adcxq %rbx,%r14 501 | mulxq %r15,%rax,%r15 502 | movl $38,%edx 503 | adoxq %rax,%r14 504 | adcxq %rdi,%r15 505 | adoxq %rdi,%r15 506 | 507 | jmp .Lreduce64 508 | .Lfe64_mul_epilogue: 509 | .cfi_endproc 510 | .size x25519_fe64_mul,.-x25519_fe64_mul 511 | 512 | .globl x25519_fe64_sqr 513 | .type x25519_fe64_sqr,@function 514 | .align 32 515 | x25519_fe64_sqr: 516 | .cfi_startproc 517 | pushq %rbp 518 | .cfi_adjust_cfa_offset 8 519 | .cfi_offset %rbp,-16 520 | pushq %rbx 521 | .cfi_adjust_cfa_offset 8 522 | .cfi_offset %rbx,-24 523 | pushq %r12 524 | .cfi_adjust_cfa_offset 8 525 | .cfi_offset %r12,-32 526 | pushq %r13 527 | .cfi_adjust_cfa_offset 8 528 | .cfi_offset %r13,-40 529 | pushq %r14 530 | .cfi_adjust_cfa_offset 8 531 | .cfi_offset %r14,-48 532 | pushq %r15 533 | .cfi_adjust_cfa_offset 8 534 | .cfi_offset %r15,-56 535 | pushq %rdi 536 | .cfi_adjust_cfa_offset 8 537 | .cfi_offset %rdi,-64 538 | leaq -16(%rsp),%rsp 539 | .cfi_adjust_cfa_offset 16 540 | .Lfe64_sqr_body: 541 | 542 | movq 0(%rsi),%rdx 543 | movq 8(%rsi),%rcx 544 | movq 16(%rsi),%rbp 545 | movq 24(%rsi),%rsi 546 | 547 | 548 | mulxq %rdx,%r8,%r15 549 | mulxq %rcx,%r9,%rax 550 | xorl %edi,%edi 551 | mulxq %rbp,%r10,%rbx 552 | adcxq %rax,%r10 553 | mulxq %rsi,%r11,%r12 554 | movq %rcx,%rdx 555 | adcxq %rbx,%r11 556 | adcxq %rdi,%r12 557 | 558 | 559 | mulxq %rbp,%rax,%rbx 560 | adoxq %rax,%r11 561 | adcxq %rbx,%r12 562 | mulxq %rsi,%rax,%r13 563 | movq %rbp,%rdx 564 | adoxq %rax,%r12 565 | adcxq %rdi,%r13 566 | 567 | 568 | mulxq %rsi,%rax,%r14 569 | movq %rcx,%rdx 570 | adoxq %rax,%r13 571 | adcxq %rdi,%r14 572 | adoxq %rdi,%r14 573 | 574 | adcxq %r9,%r9 575 | adoxq %r15,%r9 576 | adcxq %r10,%r10 577 | mulxq %rdx,%rax,%rbx 578 | movq %rbp,%rdx 579 | adcxq %r11,%r11 580 | adoxq %rax,%r10 581 | adcxq %r12,%r12 582 | adoxq %rbx,%r11 583 | mulxq %rdx,%rax,%rbx 584 | movq %rsi,%rdx 585 | adcxq %r13,%r13 586 | adoxq %rax,%r12 587 | adcxq %r14,%r14 588 | adoxq %rbx,%r13 589 | mulxq %rdx,%rax,%r15 590 | movl $38,%edx 591 | adoxq %rax,%r14 592 | adcxq %rdi,%r15 593 | adoxq %rdi,%r15 594 | jmp .Lreduce64 595 | 596 | .align 32 597 | .Lreduce64: 598 | mulxq %r12,%rax,%rbx 599 | adcxq %rax,%r8 600 | adoxq %rbx,%r9 601 | mulxq %r13,%rax,%rbx 602 | adcxq %rax,%r9 603 | adoxq %rbx,%r10 604 | mulxq %r14,%rax,%rbx 605 | adcxq %rax,%r10 606 | adoxq %rbx,%r11 607 | mulxq %r15,%rax,%r12 608 | adcxq %rax,%r11 609 | adoxq %rdi,%r12 610 | adcxq %rdi,%r12 611 | 612 | movq 16(%rsp),%rdi 613 | imulq %rdx,%r12 614 | 615 | addq %r12,%r8 616 | adcq $0,%r9 617 | adcq $0,%r10 618 | adcq $0,%r11 619 | 620 | sbbq %rax,%rax 621 | andq $38,%rax 622 | 623 | addq %rax,%r8 624 | movq %r9,8(%rdi) 625 | movq %r10,16(%rdi) 626 | movq %r11,24(%rdi) 627 | movq %r8,0(%rdi) 628 | 629 | movq 24(%rsp),%r15 630 | .cfi_restore %r15 631 | movq 32(%rsp),%r14 632 | .cfi_restore %r14 633 | movq 40(%rsp),%r13 634 | .cfi_restore %r13 635 | movq 48(%rsp),%r12 636 | .cfi_restore %r12 637 | movq 56(%rsp),%rbx 638 | .cfi_restore %rbx 639 | movq 64(%rsp),%rbp 640 | .cfi_restore %rbp 641 | leaq 72(%rsp),%rsp 642 | .cfi_adjust_cfa_offset 88 643 | .Lfe64_sqr_epilogue: 644 | .byte 0xf3,0xc3 645 | .cfi_endproc 646 | .size x25519_fe64_sqr,.-x25519_fe64_sqr 647 | 648 | .globl x25519_fe64_mul121666 649 | .type x25519_fe64_mul121666,@function 650 | .align 32 651 | x25519_fe64_mul121666: 652 | .Lfe64_mul121666_body: 653 | .cfi_startproc 654 | movl $121666,%edx 655 | mulxq 0(%rsi),%r8,%rcx 656 | mulxq 8(%rsi),%r9,%rax 657 | addq %rcx,%r9 658 | mulxq 16(%rsi),%r10,%rcx 659 | adcq %rax,%r10 660 | mulxq 24(%rsi),%r11,%rax 661 | adcq %rcx,%r11 662 | adcq $0,%rax 663 | 664 | imulq $38,%rax,%rax 665 | 666 | addq %rax,%r8 667 | adcq $0,%r9 668 | adcq $0,%r10 669 | adcq $0,%r11 670 | 671 | sbbq %rax,%rax 672 | andq $38,%rax 673 | 674 | addq %rax,%r8 675 | movq %r9,8(%rdi) 676 | movq %r10,16(%rdi) 677 | movq %r11,24(%rdi) 678 | movq %r8,0(%rdi) 679 | 680 | .Lfe64_mul121666_epilogue: 681 | .byte 0xf3,0xc3 682 | .cfi_endproc 683 | .size x25519_fe64_mul121666,.-x25519_fe64_mul121666 684 | 685 | .globl x25519_fe64_add 686 | .type x25519_fe64_add,@function 687 | .align 32 688 | x25519_fe64_add: 689 | .Lfe64_add_body: 690 | .cfi_startproc 691 | movq 0(%rsi),%r8 692 | movq 8(%rsi),%r9 693 | movq 16(%rsi),%r10 694 | movq 24(%rsi),%r11 695 | 696 | addq 0(%rdx),%r8 697 | adcq 8(%rdx),%r9 698 | adcq 16(%rdx),%r10 699 | adcq 24(%rdx),%r11 700 | 701 | sbbq %rax,%rax 702 | andq $38,%rax 703 | 704 | addq %rax,%r8 705 | adcq $0,%r9 706 | adcq $0,%r10 707 | movq %r9,8(%rdi) 708 | adcq $0,%r11 709 | movq %r10,16(%rdi) 710 | sbbq %rax,%rax 711 | movq %r11,24(%rdi) 712 | andq $38,%rax 713 | 714 | addq %rax,%r8 715 | movq %r8,0(%rdi) 716 | 717 | .Lfe64_add_epilogue: 718 | .byte 0xf3,0xc3 719 | .cfi_endproc 720 | .size x25519_fe64_add,.-x25519_fe64_add 721 | 722 | .globl x25519_fe64_sub 723 | .type x25519_fe64_sub,@function 724 | .align 32 725 | x25519_fe64_sub: 726 | .Lfe64_sub_body: 727 | .cfi_startproc 728 | movq 0(%rsi),%r8 729 | movq 8(%rsi),%r9 730 | movq 16(%rsi),%r10 731 | movq 24(%rsi),%r11 732 | 733 | subq 0(%rdx),%r8 734 | sbbq 8(%rdx),%r9 735 | sbbq 16(%rdx),%r10 736 | sbbq 24(%rdx),%r11 737 | 738 | sbbq %rax,%rax 739 | andq $38,%rax 740 | 741 | subq %rax,%r8 742 | sbbq $0,%r9 743 | sbbq $0,%r10 744 | movq %r9,8(%rdi) 745 | sbbq $0,%r11 746 | movq %r10,16(%rdi) 747 | sbbq %rax,%rax 748 | movq %r11,24(%rdi) 749 | andq $38,%rax 750 | 751 | subq %rax,%r8 752 | movq %r8,0(%rdi) 753 | 754 | .Lfe64_sub_epilogue: 755 | .byte 0xf3,0xc3 756 | .cfi_endproc 757 | .size x25519_fe64_sub,.-x25519_fe64_sub 758 | 759 | .globl x25519_fe64_tobytes 760 | .type x25519_fe64_tobytes,@function 761 | .align 32 762 | x25519_fe64_tobytes: 763 | .Lfe64_to_body: 764 | .cfi_startproc 765 | movq 0(%rsi),%r8 766 | movq 8(%rsi),%r9 767 | movq 16(%rsi),%r10 768 | movq 24(%rsi),%r11 769 | 770 | 771 | leaq (%r11,%r11,1),%rax 772 | sarq $63,%r11 773 | shrq $1,%rax 774 | andq $19,%r11 775 | addq $19,%r11 776 | 777 | addq %r11,%r8 778 | adcq $0,%r9 779 | adcq $0,%r10 780 | adcq $0,%rax 781 | 782 | leaq (%rax,%rax,1),%r11 783 | sarq $63,%rax 784 | shrq $1,%r11 785 | notq %rax 786 | andq $19,%rax 787 | 788 | subq %rax,%r8 789 | sbbq $0,%r9 790 | sbbq $0,%r10 791 | sbbq $0,%r11 792 | 793 | movq %r8,0(%rdi) 794 | movq %r9,8(%rdi) 795 | movq %r10,16(%rdi) 796 | movq %r11,24(%rdi) 797 | 798 | .Lfe64_to_epilogue: 799 | .byte 0xf3,0xc3 800 | .cfi_endproc 801 | .size x25519_fe64_tobytes,.-x25519_fe64_tobytes 802 | .byte 88,50,53,53,49,57,32,112,114,105,109,105,116,105,118,101,115,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 803 | .section ".note.gnu.property", "a" 804 | .p2align 3 805 | .long 1f - 0f 806 | .long 4f - 1f 807 | .long 5 808 | 0: 809 | # "GNU" encoded with .byte, since .asciz isn't supported 810 | # on Solaris. 811 | .byte 0x47 812 | .byte 0x4e 813 | .byte 0x55 814 | .byte 0 815 | 1: 816 | .p2align 3 817 | .long 0xc0000002 818 | .long 3f - 2f 819 | 2: 820 | .long 3 821 | 3: 822 | .p2align 3 823 | 4: 824 | -------------------------------------------------------------------------------- /crypto/md5/md5-x86_64.s: -------------------------------------------------------------------------------- 1 | .text 2 | .align 16 3 | 4 | .globl ossl_md5_block_asm_data_order 5 | .type ossl_md5_block_asm_data_order,@function 6 | ossl_md5_block_asm_data_order: 7 | .cfi_startproc 8 | pushq %rbp 9 | .cfi_adjust_cfa_offset 8 10 | .cfi_offset %rbp,-16 11 | pushq %rbx 12 | .cfi_adjust_cfa_offset 8 13 | .cfi_offset %rbx,-24 14 | pushq %r12 15 | .cfi_adjust_cfa_offset 8 16 | .cfi_offset %r12,-32 17 | pushq %r14 18 | .cfi_adjust_cfa_offset 8 19 | .cfi_offset %r14,-40 20 | pushq %r15 21 | .cfi_adjust_cfa_offset 8 22 | .cfi_offset %r15,-48 23 | .Lprologue: 24 | 25 | 26 | 27 | 28 | movq %rdi,%rbp 29 | shlq $6,%rdx 30 | leaq (%rsi,%rdx,1),%rdi 31 | movl 0(%rbp),%eax 32 | movl 4(%rbp),%ebx 33 | movl 8(%rbp),%ecx 34 | movl 12(%rbp),%edx 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | cmpq %rdi,%rsi 43 | je .Lend 44 | 45 | 46 | .Lloop: 47 | movl %eax,%r8d 48 | movl %ebx,%r9d 49 | movl %ecx,%r14d 50 | movl %edx,%r15d 51 | movl 0(%rsi),%r10d 52 | movl %edx,%r11d 53 | xorl %ecx,%r11d 54 | leal -680876936(%rax,%r10,1),%eax 55 | andl %ebx,%r11d 56 | movl 4(%rsi),%r10d 57 | xorl %edx,%r11d 58 | addl %r11d,%eax 59 | roll $7,%eax 60 | movl %ecx,%r11d 61 | addl %ebx,%eax 62 | xorl %ebx,%r11d 63 | leal -389564586(%rdx,%r10,1),%edx 64 | andl %eax,%r11d 65 | movl 8(%rsi),%r10d 66 | xorl %ecx,%r11d 67 | addl %r11d,%edx 68 | roll $12,%edx 69 | movl %ebx,%r11d 70 | addl %eax,%edx 71 | xorl %eax,%r11d 72 | leal 606105819(%rcx,%r10,1),%ecx 73 | andl %edx,%r11d 74 | movl 12(%rsi),%r10d 75 | xorl %ebx,%r11d 76 | addl %r11d,%ecx 77 | roll $17,%ecx 78 | movl %eax,%r11d 79 | addl %edx,%ecx 80 | xorl %edx,%r11d 81 | leal -1044525330(%rbx,%r10,1),%ebx 82 | andl %ecx,%r11d 83 | movl 16(%rsi),%r10d 84 | xorl %eax,%r11d 85 | addl %r11d,%ebx 86 | roll $22,%ebx 87 | movl %edx,%r11d 88 | addl %ecx,%ebx 89 | xorl %ecx,%r11d 90 | leal -176418897(%rax,%r10,1),%eax 91 | andl %ebx,%r11d 92 | movl 20(%rsi),%r10d 93 | xorl %edx,%r11d 94 | addl %r11d,%eax 95 | roll $7,%eax 96 | movl %ecx,%r11d 97 | addl %ebx,%eax 98 | xorl %ebx,%r11d 99 | leal 1200080426(%rdx,%r10,1),%edx 100 | andl %eax,%r11d 101 | movl 24(%rsi),%r10d 102 | xorl %ecx,%r11d 103 | addl %r11d,%edx 104 | roll $12,%edx 105 | movl %ebx,%r11d 106 | addl %eax,%edx 107 | xorl %eax,%r11d 108 | leal -1473231341(%rcx,%r10,1),%ecx 109 | andl %edx,%r11d 110 | movl 28(%rsi),%r10d 111 | xorl %ebx,%r11d 112 | addl %r11d,%ecx 113 | roll $17,%ecx 114 | movl %eax,%r11d 115 | addl %edx,%ecx 116 | xorl %edx,%r11d 117 | leal -45705983(%rbx,%r10,1),%ebx 118 | andl %ecx,%r11d 119 | movl 32(%rsi),%r10d 120 | xorl %eax,%r11d 121 | addl %r11d,%ebx 122 | roll $22,%ebx 123 | movl %edx,%r11d 124 | addl %ecx,%ebx 125 | xorl %ecx,%r11d 126 | leal 1770035416(%rax,%r10,1),%eax 127 | andl %ebx,%r11d 128 | movl 36(%rsi),%r10d 129 | xorl %edx,%r11d 130 | addl %r11d,%eax 131 | roll $7,%eax 132 | movl %ecx,%r11d 133 | addl %ebx,%eax 134 | xorl %ebx,%r11d 135 | leal -1958414417(%rdx,%r10,1),%edx 136 | andl %eax,%r11d 137 | movl 40(%rsi),%r10d 138 | xorl %ecx,%r11d 139 | addl %r11d,%edx 140 | roll $12,%edx 141 | movl %ebx,%r11d 142 | addl %eax,%edx 143 | xorl %eax,%r11d 144 | leal -42063(%rcx,%r10,1),%ecx 145 | andl %edx,%r11d 146 | movl 44(%rsi),%r10d 147 | xorl %ebx,%r11d 148 | addl %r11d,%ecx 149 | roll $17,%ecx 150 | movl %eax,%r11d 151 | addl %edx,%ecx 152 | xorl %edx,%r11d 153 | leal -1990404162(%rbx,%r10,1),%ebx 154 | andl %ecx,%r11d 155 | movl 48(%rsi),%r10d 156 | xorl %eax,%r11d 157 | addl %r11d,%ebx 158 | roll $22,%ebx 159 | movl %edx,%r11d 160 | addl %ecx,%ebx 161 | xorl %ecx,%r11d 162 | leal 1804603682(%rax,%r10,1),%eax 163 | andl %ebx,%r11d 164 | movl 52(%rsi),%r10d 165 | xorl %edx,%r11d 166 | addl %r11d,%eax 167 | roll $7,%eax 168 | movl %ecx,%r11d 169 | addl %ebx,%eax 170 | xorl %ebx,%r11d 171 | leal -40341101(%rdx,%r10,1),%edx 172 | andl %eax,%r11d 173 | movl 56(%rsi),%r10d 174 | xorl %ecx,%r11d 175 | addl %r11d,%edx 176 | roll $12,%edx 177 | movl %ebx,%r11d 178 | addl %eax,%edx 179 | xorl %eax,%r11d 180 | leal -1502002290(%rcx,%r10,1),%ecx 181 | andl %edx,%r11d 182 | movl 60(%rsi),%r10d 183 | xorl %ebx,%r11d 184 | addl %r11d,%ecx 185 | roll $17,%ecx 186 | movl %eax,%r11d 187 | addl %edx,%ecx 188 | xorl %edx,%r11d 189 | leal 1236535329(%rbx,%r10,1),%ebx 190 | andl %ecx,%r11d 191 | movl 4(%rsi),%r10d 192 | xorl %eax,%r11d 193 | addl %r11d,%ebx 194 | roll $22,%ebx 195 | movl %edx,%r11d 196 | addl %ecx,%ebx 197 | movl %edx,%r11d 198 | movl %edx,%r12d 199 | notl %r11d 200 | andl %ebx,%r12d 201 | leal -165796510(%rax,%r10,1),%eax 202 | andl %ecx,%r11d 203 | movl 24(%rsi),%r10d 204 | orl %r11d,%r12d 205 | movl %ecx,%r11d 206 | addl %r12d,%eax 207 | movl %ecx,%r12d 208 | roll $5,%eax 209 | addl %ebx,%eax 210 | notl %r11d 211 | andl %eax,%r12d 212 | leal -1069501632(%rdx,%r10,1),%edx 213 | andl %ebx,%r11d 214 | movl 44(%rsi),%r10d 215 | orl %r11d,%r12d 216 | movl %ebx,%r11d 217 | addl %r12d,%edx 218 | movl %ebx,%r12d 219 | roll $9,%edx 220 | addl %eax,%edx 221 | notl %r11d 222 | andl %edx,%r12d 223 | leal 643717713(%rcx,%r10,1),%ecx 224 | andl %eax,%r11d 225 | movl 0(%rsi),%r10d 226 | orl %r11d,%r12d 227 | movl %eax,%r11d 228 | addl %r12d,%ecx 229 | movl %eax,%r12d 230 | roll $14,%ecx 231 | addl %edx,%ecx 232 | notl %r11d 233 | andl %ecx,%r12d 234 | leal -373897302(%rbx,%r10,1),%ebx 235 | andl %edx,%r11d 236 | movl 20(%rsi),%r10d 237 | orl %r11d,%r12d 238 | movl %edx,%r11d 239 | addl %r12d,%ebx 240 | movl %edx,%r12d 241 | roll $20,%ebx 242 | addl %ecx,%ebx 243 | notl %r11d 244 | andl %ebx,%r12d 245 | leal -701558691(%rax,%r10,1),%eax 246 | andl %ecx,%r11d 247 | movl 40(%rsi),%r10d 248 | orl %r11d,%r12d 249 | movl %ecx,%r11d 250 | addl %r12d,%eax 251 | movl %ecx,%r12d 252 | roll $5,%eax 253 | addl %ebx,%eax 254 | notl %r11d 255 | andl %eax,%r12d 256 | leal 38016083(%rdx,%r10,1),%edx 257 | andl %ebx,%r11d 258 | movl 60(%rsi),%r10d 259 | orl %r11d,%r12d 260 | movl %ebx,%r11d 261 | addl %r12d,%edx 262 | movl %ebx,%r12d 263 | roll $9,%edx 264 | addl %eax,%edx 265 | notl %r11d 266 | andl %edx,%r12d 267 | leal -660478335(%rcx,%r10,1),%ecx 268 | andl %eax,%r11d 269 | movl 16(%rsi),%r10d 270 | orl %r11d,%r12d 271 | movl %eax,%r11d 272 | addl %r12d,%ecx 273 | movl %eax,%r12d 274 | roll $14,%ecx 275 | addl %edx,%ecx 276 | notl %r11d 277 | andl %ecx,%r12d 278 | leal -405537848(%rbx,%r10,1),%ebx 279 | andl %edx,%r11d 280 | movl 36(%rsi),%r10d 281 | orl %r11d,%r12d 282 | movl %edx,%r11d 283 | addl %r12d,%ebx 284 | movl %edx,%r12d 285 | roll $20,%ebx 286 | addl %ecx,%ebx 287 | notl %r11d 288 | andl %ebx,%r12d 289 | leal 568446438(%rax,%r10,1),%eax 290 | andl %ecx,%r11d 291 | movl 56(%rsi),%r10d 292 | orl %r11d,%r12d 293 | movl %ecx,%r11d 294 | addl %r12d,%eax 295 | movl %ecx,%r12d 296 | roll $5,%eax 297 | addl %ebx,%eax 298 | notl %r11d 299 | andl %eax,%r12d 300 | leal -1019803690(%rdx,%r10,1),%edx 301 | andl %ebx,%r11d 302 | movl 12(%rsi),%r10d 303 | orl %r11d,%r12d 304 | movl %ebx,%r11d 305 | addl %r12d,%edx 306 | movl %ebx,%r12d 307 | roll $9,%edx 308 | addl %eax,%edx 309 | notl %r11d 310 | andl %edx,%r12d 311 | leal -187363961(%rcx,%r10,1),%ecx 312 | andl %eax,%r11d 313 | movl 32(%rsi),%r10d 314 | orl %r11d,%r12d 315 | movl %eax,%r11d 316 | addl %r12d,%ecx 317 | movl %eax,%r12d 318 | roll $14,%ecx 319 | addl %edx,%ecx 320 | notl %r11d 321 | andl %ecx,%r12d 322 | leal 1163531501(%rbx,%r10,1),%ebx 323 | andl %edx,%r11d 324 | movl 52(%rsi),%r10d 325 | orl %r11d,%r12d 326 | movl %edx,%r11d 327 | addl %r12d,%ebx 328 | movl %edx,%r12d 329 | roll $20,%ebx 330 | addl %ecx,%ebx 331 | notl %r11d 332 | andl %ebx,%r12d 333 | leal -1444681467(%rax,%r10,1),%eax 334 | andl %ecx,%r11d 335 | movl 8(%rsi),%r10d 336 | orl %r11d,%r12d 337 | movl %ecx,%r11d 338 | addl %r12d,%eax 339 | movl %ecx,%r12d 340 | roll $5,%eax 341 | addl %ebx,%eax 342 | notl %r11d 343 | andl %eax,%r12d 344 | leal -51403784(%rdx,%r10,1),%edx 345 | andl %ebx,%r11d 346 | movl 28(%rsi),%r10d 347 | orl %r11d,%r12d 348 | movl %ebx,%r11d 349 | addl %r12d,%edx 350 | movl %ebx,%r12d 351 | roll $9,%edx 352 | addl %eax,%edx 353 | notl %r11d 354 | andl %edx,%r12d 355 | leal 1735328473(%rcx,%r10,1),%ecx 356 | andl %eax,%r11d 357 | movl 48(%rsi),%r10d 358 | orl %r11d,%r12d 359 | movl %eax,%r11d 360 | addl %r12d,%ecx 361 | movl %eax,%r12d 362 | roll $14,%ecx 363 | addl %edx,%ecx 364 | notl %r11d 365 | andl %ecx,%r12d 366 | leal -1926607734(%rbx,%r10,1),%ebx 367 | andl %edx,%r11d 368 | movl 20(%rsi),%r10d 369 | orl %r11d,%r12d 370 | movl %edx,%r11d 371 | addl %r12d,%ebx 372 | movl %edx,%r12d 373 | roll $20,%ebx 374 | addl %ecx,%ebx 375 | movl %ecx,%r11d 376 | leal -378558(%rax,%r10,1),%eax 377 | xorl %edx,%r11d 378 | movl 32(%rsi),%r10d 379 | xorl %ebx,%r11d 380 | addl %r11d,%eax 381 | movl %ebx,%r11d 382 | roll $4,%eax 383 | addl %ebx,%eax 384 | leal -2022574463(%rdx,%r10,1),%edx 385 | xorl %ecx,%r11d 386 | movl 44(%rsi),%r10d 387 | xorl %eax,%r11d 388 | addl %r11d,%edx 389 | roll $11,%edx 390 | movl %eax,%r11d 391 | addl %eax,%edx 392 | leal 1839030562(%rcx,%r10,1),%ecx 393 | xorl %ebx,%r11d 394 | movl 56(%rsi),%r10d 395 | xorl %edx,%r11d 396 | addl %r11d,%ecx 397 | movl %edx,%r11d 398 | roll $16,%ecx 399 | addl %edx,%ecx 400 | leal -35309556(%rbx,%r10,1),%ebx 401 | xorl %eax,%r11d 402 | movl 4(%rsi),%r10d 403 | xorl %ecx,%r11d 404 | addl %r11d,%ebx 405 | roll $23,%ebx 406 | movl %ecx,%r11d 407 | addl %ecx,%ebx 408 | leal -1530992060(%rax,%r10,1),%eax 409 | xorl %edx,%r11d 410 | movl 16(%rsi),%r10d 411 | xorl %ebx,%r11d 412 | addl %r11d,%eax 413 | movl %ebx,%r11d 414 | roll $4,%eax 415 | addl %ebx,%eax 416 | leal 1272893353(%rdx,%r10,1),%edx 417 | xorl %ecx,%r11d 418 | movl 28(%rsi),%r10d 419 | xorl %eax,%r11d 420 | addl %r11d,%edx 421 | roll $11,%edx 422 | movl %eax,%r11d 423 | addl %eax,%edx 424 | leal -155497632(%rcx,%r10,1),%ecx 425 | xorl %ebx,%r11d 426 | movl 40(%rsi),%r10d 427 | xorl %edx,%r11d 428 | addl %r11d,%ecx 429 | movl %edx,%r11d 430 | roll $16,%ecx 431 | addl %edx,%ecx 432 | leal -1094730640(%rbx,%r10,1),%ebx 433 | xorl %eax,%r11d 434 | movl 52(%rsi),%r10d 435 | xorl %ecx,%r11d 436 | addl %r11d,%ebx 437 | roll $23,%ebx 438 | movl %ecx,%r11d 439 | addl %ecx,%ebx 440 | leal 681279174(%rax,%r10,1),%eax 441 | xorl %edx,%r11d 442 | movl 0(%rsi),%r10d 443 | xorl %ebx,%r11d 444 | addl %r11d,%eax 445 | movl %ebx,%r11d 446 | roll $4,%eax 447 | addl %ebx,%eax 448 | leal -358537222(%rdx,%r10,1),%edx 449 | xorl %ecx,%r11d 450 | movl 12(%rsi),%r10d 451 | xorl %eax,%r11d 452 | addl %r11d,%edx 453 | roll $11,%edx 454 | movl %eax,%r11d 455 | addl %eax,%edx 456 | leal -722521979(%rcx,%r10,1),%ecx 457 | xorl %ebx,%r11d 458 | movl 24(%rsi),%r10d 459 | xorl %edx,%r11d 460 | addl %r11d,%ecx 461 | movl %edx,%r11d 462 | roll $16,%ecx 463 | addl %edx,%ecx 464 | leal 76029189(%rbx,%r10,1),%ebx 465 | xorl %eax,%r11d 466 | movl 36(%rsi),%r10d 467 | xorl %ecx,%r11d 468 | addl %r11d,%ebx 469 | roll $23,%ebx 470 | movl %ecx,%r11d 471 | addl %ecx,%ebx 472 | leal -640364487(%rax,%r10,1),%eax 473 | xorl %edx,%r11d 474 | movl 48(%rsi),%r10d 475 | xorl %ebx,%r11d 476 | addl %r11d,%eax 477 | movl %ebx,%r11d 478 | roll $4,%eax 479 | addl %ebx,%eax 480 | leal -421815835(%rdx,%r10,1),%edx 481 | xorl %ecx,%r11d 482 | movl 60(%rsi),%r10d 483 | xorl %eax,%r11d 484 | addl %r11d,%edx 485 | roll $11,%edx 486 | movl %eax,%r11d 487 | addl %eax,%edx 488 | leal 530742520(%rcx,%r10,1),%ecx 489 | xorl %ebx,%r11d 490 | movl 8(%rsi),%r10d 491 | xorl %edx,%r11d 492 | addl %r11d,%ecx 493 | movl %edx,%r11d 494 | roll $16,%ecx 495 | addl %edx,%ecx 496 | leal -995338651(%rbx,%r10,1),%ebx 497 | xorl %eax,%r11d 498 | movl 0(%rsi),%r10d 499 | xorl %ecx,%r11d 500 | addl %r11d,%ebx 501 | roll $23,%ebx 502 | movl %ecx,%r11d 503 | addl %ecx,%ebx 504 | movl $0xffffffff,%r11d 505 | xorl %edx,%r11d 506 | leal -198630844(%rax,%r10,1),%eax 507 | orl %ebx,%r11d 508 | movl 28(%rsi),%r10d 509 | xorl %ecx,%r11d 510 | addl %r11d,%eax 511 | movl $0xffffffff,%r11d 512 | roll $6,%eax 513 | xorl %ecx,%r11d 514 | addl %ebx,%eax 515 | leal 1126891415(%rdx,%r10,1),%edx 516 | orl %eax,%r11d 517 | movl 56(%rsi),%r10d 518 | xorl %ebx,%r11d 519 | addl %r11d,%edx 520 | movl $0xffffffff,%r11d 521 | roll $10,%edx 522 | xorl %ebx,%r11d 523 | addl %eax,%edx 524 | leal -1416354905(%rcx,%r10,1),%ecx 525 | orl %edx,%r11d 526 | movl 20(%rsi),%r10d 527 | xorl %eax,%r11d 528 | addl %r11d,%ecx 529 | movl $0xffffffff,%r11d 530 | roll $15,%ecx 531 | xorl %eax,%r11d 532 | addl %edx,%ecx 533 | leal -57434055(%rbx,%r10,1),%ebx 534 | orl %ecx,%r11d 535 | movl 48(%rsi),%r10d 536 | xorl %edx,%r11d 537 | addl %r11d,%ebx 538 | movl $0xffffffff,%r11d 539 | roll $21,%ebx 540 | xorl %edx,%r11d 541 | addl %ecx,%ebx 542 | leal 1700485571(%rax,%r10,1),%eax 543 | orl %ebx,%r11d 544 | movl 12(%rsi),%r10d 545 | xorl %ecx,%r11d 546 | addl %r11d,%eax 547 | movl $0xffffffff,%r11d 548 | roll $6,%eax 549 | xorl %ecx,%r11d 550 | addl %ebx,%eax 551 | leal -1894986606(%rdx,%r10,1),%edx 552 | orl %eax,%r11d 553 | movl 40(%rsi),%r10d 554 | xorl %ebx,%r11d 555 | addl %r11d,%edx 556 | movl $0xffffffff,%r11d 557 | roll $10,%edx 558 | xorl %ebx,%r11d 559 | addl %eax,%edx 560 | leal -1051523(%rcx,%r10,1),%ecx 561 | orl %edx,%r11d 562 | movl 4(%rsi),%r10d 563 | xorl %eax,%r11d 564 | addl %r11d,%ecx 565 | movl $0xffffffff,%r11d 566 | roll $15,%ecx 567 | xorl %eax,%r11d 568 | addl %edx,%ecx 569 | leal -2054922799(%rbx,%r10,1),%ebx 570 | orl %ecx,%r11d 571 | movl 32(%rsi),%r10d 572 | xorl %edx,%r11d 573 | addl %r11d,%ebx 574 | movl $0xffffffff,%r11d 575 | roll $21,%ebx 576 | xorl %edx,%r11d 577 | addl %ecx,%ebx 578 | leal 1873313359(%rax,%r10,1),%eax 579 | orl %ebx,%r11d 580 | movl 60(%rsi),%r10d 581 | xorl %ecx,%r11d 582 | addl %r11d,%eax 583 | movl $0xffffffff,%r11d 584 | roll $6,%eax 585 | xorl %ecx,%r11d 586 | addl %ebx,%eax 587 | leal -30611744(%rdx,%r10,1),%edx 588 | orl %eax,%r11d 589 | movl 24(%rsi),%r10d 590 | xorl %ebx,%r11d 591 | addl %r11d,%edx 592 | movl $0xffffffff,%r11d 593 | roll $10,%edx 594 | xorl %ebx,%r11d 595 | addl %eax,%edx 596 | leal -1560198380(%rcx,%r10,1),%ecx 597 | orl %edx,%r11d 598 | movl 52(%rsi),%r10d 599 | xorl %eax,%r11d 600 | addl %r11d,%ecx 601 | movl $0xffffffff,%r11d 602 | roll $15,%ecx 603 | xorl %eax,%r11d 604 | addl %edx,%ecx 605 | leal 1309151649(%rbx,%r10,1),%ebx 606 | orl %ecx,%r11d 607 | movl 16(%rsi),%r10d 608 | xorl %edx,%r11d 609 | addl %r11d,%ebx 610 | movl $0xffffffff,%r11d 611 | roll $21,%ebx 612 | xorl %edx,%r11d 613 | addl %ecx,%ebx 614 | leal -145523070(%rax,%r10,1),%eax 615 | orl %ebx,%r11d 616 | movl 44(%rsi),%r10d 617 | xorl %ecx,%r11d 618 | addl %r11d,%eax 619 | movl $0xffffffff,%r11d 620 | roll $6,%eax 621 | xorl %ecx,%r11d 622 | addl %ebx,%eax 623 | leal -1120210379(%rdx,%r10,1),%edx 624 | orl %eax,%r11d 625 | movl 8(%rsi),%r10d 626 | xorl %ebx,%r11d 627 | addl %r11d,%edx 628 | movl $0xffffffff,%r11d 629 | roll $10,%edx 630 | xorl %ebx,%r11d 631 | addl %eax,%edx 632 | leal 718787259(%rcx,%r10,1),%ecx 633 | orl %edx,%r11d 634 | movl 36(%rsi),%r10d 635 | xorl %eax,%r11d 636 | addl %r11d,%ecx 637 | movl $0xffffffff,%r11d 638 | roll $15,%ecx 639 | xorl %eax,%r11d 640 | addl %edx,%ecx 641 | leal -343485551(%rbx,%r10,1),%ebx 642 | orl %ecx,%r11d 643 | movl 0(%rsi),%r10d 644 | xorl %edx,%r11d 645 | addl %r11d,%ebx 646 | movl $0xffffffff,%r11d 647 | roll $21,%ebx 648 | xorl %edx,%r11d 649 | addl %ecx,%ebx 650 | 651 | addl %r8d,%eax 652 | addl %r9d,%ebx 653 | addl %r14d,%ecx 654 | addl %r15d,%edx 655 | 656 | 657 | addq $64,%rsi 658 | cmpq %rdi,%rsi 659 | jb .Lloop 660 | 661 | 662 | .Lend: 663 | movl %eax,0(%rbp) 664 | movl %ebx,4(%rbp) 665 | movl %ecx,8(%rbp) 666 | movl %edx,12(%rbp) 667 | 668 | movq (%rsp),%r15 669 | .cfi_restore %r15 670 | movq 8(%rsp),%r14 671 | .cfi_restore %r14 672 | movq 16(%rsp),%r12 673 | .cfi_restore %r12 674 | movq 24(%rsp),%rbx 675 | .cfi_restore %rbx 676 | movq 32(%rsp),%rbp 677 | .cfi_restore %rbp 678 | addq $40,%rsp 679 | .cfi_adjust_cfa_offset -40 680 | .Lepilogue: 681 | .byte 0xf3,0xc3 682 | .cfi_endproc 683 | .size ossl_md5_block_asm_data_order,.-ossl_md5_block_asm_data_order 684 | .section ".note.gnu.property", "a" 685 | .p2align 3 686 | .long 1f - 0f 687 | .long 4f - 1f 688 | .long 5 689 | 0: 690 | # "GNU" encoded with .byte, since .asciz isn't supported 691 | # on Solaris. 692 | .byte 0x47 693 | .byte 0x4e 694 | .byte 0x55 695 | .byte 0 696 | 1: 697 | .p2align 3 698 | .long 0xc0000002 699 | .long 3f - 2f 700 | 2: 701 | .long 3 702 | 3: 703 | .p2align 3 704 | 4: 705 | -------------------------------------------------------------------------------- /crypto/rc4/rc4-x86_64.s: -------------------------------------------------------------------------------- 1 | .text 2 | 3 | 4 | .globl RC4 5 | .type RC4,@function 6 | .align 16 7 | RC4: 8 | .cfi_startproc 9 | .byte 243,15,30,250 10 | orq %rsi,%rsi 11 | jne .Lentry 12 | .byte 0xf3,0xc3 13 | .Lentry: 14 | pushq %rbx 15 | .cfi_adjust_cfa_offset 8 16 | .cfi_offset %rbx,-16 17 | pushq %r12 18 | .cfi_adjust_cfa_offset 8 19 | .cfi_offset %r12,-24 20 | pushq %r13 21 | .cfi_adjust_cfa_offset 8 22 | .cfi_offset %r13,-32 23 | .Lprologue: 24 | movq %rsi,%r11 25 | movq %rdx,%r12 26 | movq %rcx,%r13 27 | xorq %r10,%r10 28 | xorq %rcx,%rcx 29 | 30 | leaq 8(%rdi),%rdi 31 | movb -8(%rdi),%r10b 32 | movb -4(%rdi),%cl 33 | cmpl $-1,256(%rdi) 34 | je .LRC4_CHAR 35 | movl OPENSSL_ia32cap_P(%rip),%r8d 36 | xorq %rbx,%rbx 37 | incb %r10b 38 | subq %r10,%rbx 39 | subq %r12,%r13 40 | movl (%rdi,%r10,4),%eax 41 | testq $-16,%r11 42 | jz .Lloop1 43 | btl $30,%r8d 44 | jc .Lintel 45 | andq $7,%rbx 46 | leaq 1(%r10),%rsi 47 | jz .Loop8 48 | subq %rbx,%r11 49 | .Loop8_warmup: 50 | addb %al,%cl 51 | movl (%rdi,%rcx,4),%edx 52 | movl %eax,(%rdi,%rcx,4) 53 | movl %edx,(%rdi,%r10,4) 54 | addb %dl,%al 55 | incb %r10b 56 | movl (%rdi,%rax,4),%edx 57 | movl (%rdi,%r10,4),%eax 58 | xorb (%r12),%dl 59 | movb %dl,(%r12,%r13,1) 60 | leaq 1(%r12),%r12 61 | decq %rbx 62 | jnz .Loop8_warmup 63 | 64 | leaq 1(%r10),%rsi 65 | jmp .Loop8 66 | .align 16 67 | .Loop8: 68 | addb %al,%cl 69 | movl (%rdi,%rcx,4),%edx 70 | movl %eax,(%rdi,%rcx,4) 71 | movl 0(%rdi,%rsi,4),%ebx 72 | rorq $8,%r8 73 | movl %edx,0(%rdi,%r10,4) 74 | addb %al,%dl 75 | movb (%rdi,%rdx,4),%r8b 76 | addb %bl,%cl 77 | movl (%rdi,%rcx,4),%edx 78 | movl %ebx,(%rdi,%rcx,4) 79 | movl 4(%rdi,%rsi,4),%eax 80 | rorq $8,%r8 81 | movl %edx,4(%rdi,%r10,4) 82 | addb %bl,%dl 83 | movb (%rdi,%rdx,4),%r8b 84 | addb %al,%cl 85 | movl (%rdi,%rcx,4),%edx 86 | movl %eax,(%rdi,%rcx,4) 87 | movl 8(%rdi,%rsi,4),%ebx 88 | rorq $8,%r8 89 | movl %edx,8(%rdi,%r10,4) 90 | addb %al,%dl 91 | movb (%rdi,%rdx,4),%r8b 92 | addb %bl,%cl 93 | movl (%rdi,%rcx,4),%edx 94 | movl %ebx,(%rdi,%rcx,4) 95 | movl 12(%rdi,%rsi,4),%eax 96 | rorq $8,%r8 97 | movl %edx,12(%rdi,%r10,4) 98 | addb %bl,%dl 99 | movb (%rdi,%rdx,4),%r8b 100 | addb %al,%cl 101 | movl (%rdi,%rcx,4),%edx 102 | movl %eax,(%rdi,%rcx,4) 103 | movl 16(%rdi,%rsi,4),%ebx 104 | rorq $8,%r8 105 | movl %edx,16(%rdi,%r10,4) 106 | addb %al,%dl 107 | movb (%rdi,%rdx,4),%r8b 108 | addb %bl,%cl 109 | movl (%rdi,%rcx,4),%edx 110 | movl %ebx,(%rdi,%rcx,4) 111 | movl 20(%rdi,%rsi,4),%eax 112 | rorq $8,%r8 113 | movl %edx,20(%rdi,%r10,4) 114 | addb %bl,%dl 115 | movb (%rdi,%rdx,4),%r8b 116 | addb %al,%cl 117 | movl (%rdi,%rcx,4),%edx 118 | movl %eax,(%rdi,%rcx,4) 119 | movl 24(%rdi,%rsi,4),%ebx 120 | rorq $8,%r8 121 | movl %edx,24(%rdi,%r10,4) 122 | addb %al,%dl 123 | movb (%rdi,%rdx,4),%r8b 124 | addb $8,%sil 125 | addb %bl,%cl 126 | movl (%rdi,%rcx,4),%edx 127 | movl %ebx,(%rdi,%rcx,4) 128 | movl -4(%rdi,%rsi,4),%eax 129 | rorq $8,%r8 130 | movl %edx,28(%rdi,%r10,4) 131 | addb %bl,%dl 132 | movb (%rdi,%rdx,4),%r8b 133 | addb $8,%r10b 134 | rorq $8,%r8 135 | subq $8,%r11 136 | 137 | xorq (%r12),%r8 138 | movq %r8,(%r12,%r13,1) 139 | leaq 8(%r12),%r12 140 | 141 | testq $-8,%r11 142 | jnz .Loop8 143 | cmpq $0,%r11 144 | jne .Lloop1 145 | jmp .Lexit 146 | 147 | .align 16 148 | .Lintel: 149 | testq $-32,%r11 150 | jz .Lloop1 151 | andq $15,%rbx 152 | jz .Loop16_is_hot 153 | subq %rbx,%r11 154 | .Loop16_warmup: 155 | addb %al,%cl 156 | movl (%rdi,%rcx,4),%edx 157 | movl %eax,(%rdi,%rcx,4) 158 | movl %edx,(%rdi,%r10,4) 159 | addb %dl,%al 160 | incb %r10b 161 | movl (%rdi,%rax,4),%edx 162 | movl (%rdi,%r10,4),%eax 163 | xorb (%r12),%dl 164 | movb %dl,(%r12,%r13,1) 165 | leaq 1(%r12),%r12 166 | decq %rbx 167 | jnz .Loop16_warmup 168 | 169 | movq %rcx,%rbx 170 | xorq %rcx,%rcx 171 | movb %bl,%cl 172 | 173 | .Loop16_is_hot: 174 | leaq (%rdi,%r10,4),%rsi 175 | addb %al,%cl 176 | movl (%rdi,%rcx,4),%edx 177 | pxor %xmm0,%xmm0 178 | movl %eax,(%rdi,%rcx,4) 179 | addb %dl,%al 180 | movl 4(%rsi),%ebx 181 | movzbl %al,%eax 182 | movl %edx,0(%rsi) 183 | addb %bl,%cl 184 | pinsrw $0,(%rdi,%rax,4),%xmm0 185 | jmp .Loop16_enter 186 | .align 16 187 | .Loop16: 188 | addb %al,%cl 189 | movl (%rdi,%rcx,4),%edx 190 | pxor %xmm0,%xmm2 191 | psllq $8,%xmm1 192 | pxor %xmm0,%xmm0 193 | movl %eax,(%rdi,%rcx,4) 194 | addb %dl,%al 195 | movl 4(%rsi),%ebx 196 | movzbl %al,%eax 197 | movl %edx,0(%rsi) 198 | pxor %xmm1,%xmm2 199 | addb %bl,%cl 200 | pinsrw $0,(%rdi,%rax,4),%xmm0 201 | movdqu %xmm2,(%r12,%r13,1) 202 | leaq 16(%r12),%r12 203 | .Loop16_enter: 204 | movl (%rdi,%rcx,4),%edx 205 | pxor %xmm1,%xmm1 206 | movl %ebx,(%rdi,%rcx,4) 207 | addb %dl,%bl 208 | movl 8(%rsi),%eax 209 | movzbl %bl,%ebx 210 | movl %edx,4(%rsi) 211 | addb %al,%cl 212 | pinsrw $0,(%rdi,%rbx,4),%xmm1 213 | movl (%rdi,%rcx,4),%edx 214 | movl %eax,(%rdi,%rcx,4) 215 | addb %dl,%al 216 | movl 12(%rsi),%ebx 217 | movzbl %al,%eax 218 | movl %edx,8(%rsi) 219 | addb %bl,%cl 220 | pinsrw $1,(%rdi,%rax,4),%xmm0 221 | movl (%rdi,%rcx,4),%edx 222 | movl %ebx,(%rdi,%rcx,4) 223 | addb %dl,%bl 224 | movl 16(%rsi),%eax 225 | movzbl %bl,%ebx 226 | movl %edx,12(%rsi) 227 | addb %al,%cl 228 | pinsrw $1,(%rdi,%rbx,4),%xmm1 229 | movl (%rdi,%rcx,4),%edx 230 | movl %eax,(%rdi,%rcx,4) 231 | addb %dl,%al 232 | movl 20(%rsi),%ebx 233 | movzbl %al,%eax 234 | movl %edx,16(%rsi) 235 | addb %bl,%cl 236 | pinsrw $2,(%rdi,%rax,4),%xmm0 237 | movl (%rdi,%rcx,4),%edx 238 | movl %ebx,(%rdi,%rcx,4) 239 | addb %dl,%bl 240 | movl 24(%rsi),%eax 241 | movzbl %bl,%ebx 242 | movl %edx,20(%rsi) 243 | addb %al,%cl 244 | pinsrw $2,(%rdi,%rbx,4),%xmm1 245 | movl (%rdi,%rcx,4),%edx 246 | movl %eax,(%rdi,%rcx,4) 247 | addb %dl,%al 248 | movl 28(%rsi),%ebx 249 | movzbl %al,%eax 250 | movl %edx,24(%rsi) 251 | addb %bl,%cl 252 | pinsrw $3,(%rdi,%rax,4),%xmm0 253 | movl (%rdi,%rcx,4),%edx 254 | movl %ebx,(%rdi,%rcx,4) 255 | addb %dl,%bl 256 | movl 32(%rsi),%eax 257 | movzbl %bl,%ebx 258 | movl %edx,28(%rsi) 259 | addb %al,%cl 260 | pinsrw $3,(%rdi,%rbx,4),%xmm1 261 | movl (%rdi,%rcx,4),%edx 262 | movl %eax,(%rdi,%rcx,4) 263 | addb %dl,%al 264 | movl 36(%rsi),%ebx 265 | movzbl %al,%eax 266 | movl %edx,32(%rsi) 267 | addb %bl,%cl 268 | pinsrw $4,(%rdi,%rax,4),%xmm0 269 | movl (%rdi,%rcx,4),%edx 270 | movl %ebx,(%rdi,%rcx,4) 271 | addb %dl,%bl 272 | movl 40(%rsi),%eax 273 | movzbl %bl,%ebx 274 | movl %edx,36(%rsi) 275 | addb %al,%cl 276 | pinsrw $4,(%rdi,%rbx,4),%xmm1 277 | movl (%rdi,%rcx,4),%edx 278 | movl %eax,(%rdi,%rcx,4) 279 | addb %dl,%al 280 | movl 44(%rsi),%ebx 281 | movzbl %al,%eax 282 | movl %edx,40(%rsi) 283 | addb %bl,%cl 284 | pinsrw $5,(%rdi,%rax,4),%xmm0 285 | movl (%rdi,%rcx,4),%edx 286 | movl %ebx,(%rdi,%rcx,4) 287 | addb %dl,%bl 288 | movl 48(%rsi),%eax 289 | movzbl %bl,%ebx 290 | movl %edx,44(%rsi) 291 | addb %al,%cl 292 | pinsrw $5,(%rdi,%rbx,4),%xmm1 293 | movl (%rdi,%rcx,4),%edx 294 | movl %eax,(%rdi,%rcx,4) 295 | addb %dl,%al 296 | movl 52(%rsi),%ebx 297 | movzbl %al,%eax 298 | movl %edx,48(%rsi) 299 | addb %bl,%cl 300 | pinsrw $6,(%rdi,%rax,4),%xmm0 301 | movl (%rdi,%rcx,4),%edx 302 | movl %ebx,(%rdi,%rcx,4) 303 | addb %dl,%bl 304 | movl 56(%rsi),%eax 305 | movzbl %bl,%ebx 306 | movl %edx,52(%rsi) 307 | addb %al,%cl 308 | pinsrw $6,(%rdi,%rbx,4),%xmm1 309 | movl (%rdi,%rcx,4),%edx 310 | movl %eax,(%rdi,%rcx,4) 311 | addb %dl,%al 312 | movl 60(%rsi),%ebx 313 | movzbl %al,%eax 314 | movl %edx,56(%rsi) 315 | addb %bl,%cl 316 | pinsrw $7,(%rdi,%rax,4),%xmm0 317 | addb $16,%r10b 318 | movdqu (%r12),%xmm2 319 | movl (%rdi,%rcx,4),%edx 320 | movl %ebx,(%rdi,%rcx,4) 321 | addb %dl,%bl 322 | movzbl %bl,%ebx 323 | movl %edx,60(%rsi) 324 | leaq (%rdi,%r10,4),%rsi 325 | pinsrw $7,(%rdi,%rbx,4),%xmm1 326 | movl (%rsi),%eax 327 | movq %rcx,%rbx 328 | xorq %rcx,%rcx 329 | subq $16,%r11 330 | movb %bl,%cl 331 | testq $-16,%r11 332 | jnz .Loop16 333 | 334 | psllq $8,%xmm1 335 | pxor %xmm0,%xmm2 336 | pxor %xmm1,%xmm2 337 | movdqu %xmm2,(%r12,%r13,1) 338 | leaq 16(%r12),%r12 339 | 340 | cmpq $0,%r11 341 | jne .Lloop1 342 | jmp .Lexit 343 | 344 | .align 16 345 | .Lloop1: 346 | addb %al,%cl 347 | movl (%rdi,%rcx,4),%edx 348 | movl %eax,(%rdi,%rcx,4) 349 | movl %edx,(%rdi,%r10,4) 350 | addb %dl,%al 351 | incb %r10b 352 | movl (%rdi,%rax,4),%edx 353 | movl (%rdi,%r10,4),%eax 354 | xorb (%r12),%dl 355 | movb %dl,(%r12,%r13,1) 356 | leaq 1(%r12),%r12 357 | decq %r11 358 | jnz .Lloop1 359 | jmp .Lexit 360 | 361 | .align 16 362 | .LRC4_CHAR: 363 | addb $1,%r10b 364 | movzbl (%rdi,%r10,1),%eax 365 | testq $-8,%r11 366 | jz .Lcloop1 367 | jmp .Lcloop8 368 | .align 16 369 | .Lcloop8: 370 | movl (%r12),%r8d 371 | movl 4(%r12),%r9d 372 | addb %al,%cl 373 | leaq 1(%r10),%rsi 374 | movzbl (%rdi,%rcx,1),%edx 375 | movzbl %sil,%esi 376 | movzbl (%rdi,%rsi,1),%ebx 377 | movb %al,(%rdi,%rcx,1) 378 | cmpq %rsi,%rcx 379 | movb %dl,(%rdi,%r10,1) 380 | jne .Lcmov0 381 | movq %rax,%rbx 382 | .Lcmov0: 383 | addb %al,%dl 384 | xorb (%rdi,%rdx,1),%r8b 385 | rorl $8,%r8d 386 | addb %bl,%cl 387 | leaq 1(%rsi),%r10 388 | movzbl (%rdi,%rcx,1),%edx 389 | movzbl %r10b,%r10d 390 | movzbl (%rdi,%r10,1),%eax 391 | movb %bl,(%rdi,%rcx,1) 392 | cmpq %r10,%rcx 393 | movb %dl,(%rdi,%rsi,1) 394 | jne .Lcmov1 395 | movq %rbx,%rax 396 | .Lcmov1: 397 | addb %bl,%dl 398 | xorb (%rdi,%rdx,1),%r8b 399 | rorl $8,%r8d 400 | addb %al,%cl 401 | leaq 1(%r10),%rsi 402 | movzbl (%rdi,%rcx,1),%edx 403 | movzbl %sil,%esi 404 | movzbl (%rdi,%rsi,1),%ebx 405 | movb %al,(%rdi,%rcx,1) 406 | cmpq %rsi,%rcx 407 | movb %dl,(%rdi,%r10,1) 408 | jne .Lcmov2 409 | movq %rax,%rbx 410 | .Lcmov2: 411 | addb %al,%dl 412 | xorb (%rdi,%rdx,1),%r8b 413 | rorl $8,%r8d 414 | addb %bl,%cl 415 | leaq 1(%rsi),%r10 416 | movzbl (%rdi,%rcx,1),%edx 417 | movzbl %r10b,%r10d 418 | movzbl (%rdi,%r10,1),%eax 419 | movb %bl,(%rdi,%rcx,1) 420 | cmpq %r10,%rcx 421 | movb %dl,(%rdi,%rsi,1) 422 | jne .Lcmov3 423 | movq %rbx,%rax 424 | .Lcmov3: 425 | addb %bl,%dl 426 | xorb (%rdi,%rdx,1),%r8b 427 | rorl $8,%r8d 428 | addb %al,%cl 429 | leaq 1(%r10),%rsi 430 | movzbl (%rdi,%rcx,1),%edx 431 | movzbl %sil,%esi 432 | movzbl (%rdi,%rsi,1),%ebx 433 | movb %al,(%rdi,%rcx,1) 434 | cmpq %rsi,%rcx 435 | movb %dl,(%rdi,%r10,1) 436 | jne .Lcmov4 437 | movq %rax,%rbx 438 | .Lcmov4: 439 | addb %al,%dl 440 | xorb (%rdi,%rdx,1),%r9b 441 | rorl $8,%r9d 442 | addb %bl,%cl 443 | leaq 1(%rsi),%r10 444 | movzbl (%rdi,%rcx,1),%edx 445 | movzbl %r10b,%r10d 446 | movzbl (%rdi,%r10,1),%eax 447 | movb %bl,(%rdi,%rcx,1) 448 | cmpq %r10,%rcx 449 | movb %dl,(%rdi,%rsi,1) 450 | jne .Lcmov5 451 | movq %rbx,%rax 452 | .Lcmov5: 453 | addb %bl,%dl 454 | xorb (%rdi,%rdx,1),%r9b 455 | rorl $8,%r9d 456 | addb %al,%cl 457 | leaq 1(%r10),%rsi 458 | movzbl (%rdi,%rcx,1),%edx 459 | movzbl %sil,%esi 460 | movzbl (%rdi,%rsi,1),%ebx 461 | movb %al,(%rdi,%rcx,1) 462 | cmpq %rsi,%rcx 463 | movb %dl,(%rdi,%r10,1) 464 | jne .Lcmov6 465 | movq %rax,%rbx 466 | .Lcmov6: 467 | addb %al,%dl 468 | xorb (%rdi,%rdx,1),%r9b 469 | rorl $8,%r9d 470 | addb %bl,%cl 471 | leaq 1(%rsi),%r10 472 | movzbl (%rdi,%rcx,1),%edx 473 | movzbl %r10b,%r10d 474 | movzbl (%rdi,%r10,1),%eax 475 | movb %bl,(%rdi,%rcx,1) 476 | cmpq %r10,%rcx 477 | movb %dl,(%rdi,%rsi,1) 478 | jne .Lcmov7 479 | movq %rbx,%rax 480 | .Lcmov7: 481 | addb %bl,%dl 482 | xorb (%rdi,%rdx,1),%r9b 483 | rorl $8,%r9d 484 | leaq -8(%r11),%r11 485 | movl %r8d,(%r13) 486 | leaq 8(%r12),%r12 487 | movl %r9d,4(%r13) 488 | leaq 8(%r13),%r13 489 | 490 | testq $-8,%r11 491 | jnz .Lcloop8 492 | cmpq $0,%r11 493 | jne .Lcloop1 494 | jmp .Lexit 495 | .align 16 496 | .Lcloop1: 497 | addb %al,%cl 498 | movzbl %cl,%ecx 499 | movzbl (%rdi,%rcx,1),%edx 500 | movb %al,(%rdi,%rcx,1) 501 | movb %dl,(%rdi,%r10,1) 502 | addb %al,%dl 503 | addb $1,%r10b 504 | movzbl %dl,%edx 505 | movzbl %r10b,%r10d 506 | movzbl (%rdi,%rdx,1),%edx 507 | movzbl (%rdi,%r10,1),%eax 508 | xorb (%r12),%dl 509 | leaq 1(%r12),%r12 510 | movb %dl,(%r13) 511 | leaq 1(%r13),%r13 512 | subq $1,%r11 513 | jnz .Lcloop1 514 | jmp .Lexit 515 | 516 | .align 16 517 | .Lexit: 518 | subb $1,%r10b 519 | movl %r10d,-8(%rdi) 520 | movl %ecx,-4(%rdi) 521 | 522 | movq (%rsp),%r13 523 | .cfi_restore %r13 524 | movq 8(%rsp),%r12 525 | .cfi_restore %r12 526 | movq 16(%rsp),%rbx 527 | .cfi_restore %rbx 528 | addq $24,%rsp 529 | .cfi_adjust_cfa_offset -24 530 | .Lepilogue: 531 | .byte 0xf3,0xc3 532 | .cfi_endproc 533 | .size RC4,.-RC4 534 | .globl RC4_set_key 535 | .type RC4_set_key,@function 536 | .align 16 537 | RC4_set_key: 538 | .cfi_startproc 539 | .byte 243,15,30,250 540 | leaq 8(%rdi),%rdi 541 | leaq (%rdx,%rsi,1),%rdx 542 | negq %rsi 543 | movq %rsi,%rcx 544 | xorl %eax,%eax 545 | xorq %r9,%r9 546 | xorq %r10,%r10 547 | xorq %r11,%r11 548 | 549 | movl OPENSSL_ia32cap_P(%rip),%r8d 550 | btl $20,%r8d 551 | jc .Lc1stloop 552 | jmp .Lw1stloop 553 | 554 | .align 16 555 | .Lw1stloop: 556 | movl %eax,(%rdi,%rax,4) 557 | addb $1,%al 558 | jnc .Lw1stloop 559 | 560 | xorq %r9,%r9 561 | xorq %r8,%r8 562 | .align 16 563 | .Lw2ndloop: 564 | movl (%rdi,%r9,4),%r10d 565 | addb (%rdx,%rsi,1),%r8b 566 | addb %r10b,%r8b 567 | addq $1,%rsi 568 | movl (%rdi,%r8,4),%r11d 569 | cmovzq %rcx,%rsi 570 | movl %r10d,(%rdi,%r8,4) 571 | movl %r11d,(%rdi,%r9,4) 572 | addb $1,%r9b 573 | jnc .Lw2ndloop 574 | jmp .Lexit_key 575 | 576 | .align 16 577 | .Lc1stloop: 578 | movb %al,(%rdi,%rax,1) 579 | addb $1,%al 580 | jnc .Lc1stloop 581 | 582 | xorq %r9,%r9 583 | xorq %r8,%r8 584 | .align 16 585 | .Lc2ndloop: 586 | movb (%rdi,%r9,1),%r10b 587 | addb (%rdx,%rsi,1),%r8b 588 | addb %r10b,%r8b 589 | addq $1,%rsi 590 | movb (%rdi,%r8,1),%r11b 591 | jnz .Lcnowrap 592 | movq %rcx,%rsi 593 | .Lcnowrap: 594 | movb %r10b,(%rdi,%r8,1) 595 | movb %r11b,(%rdi,%r9,1) 596 | addb $1,%r9b 597 | jnc .Lc2ndloop 598 | movl $-1,256(%rdi) 599 | 600 | .align 16 601 | .Lexit_key: 602 | xorl %eax,%eax 603 | movl %eax,-8(%rdi) 604 | movl %eax,-4(%rdi) 605 | .byte 0xf3,0xc3 606 | .cfi_endproc 607 | .size RC4_set_key,.-RC4_set_key 608 | 609 | .globl RC4_options 610 | .type RC4_options,@function 611 | .align 16 612 | RC4_options: 613 | .cfi_startproc 614 | .byte 243,15,30,250 615 | leaq .Lopts(%rip),%rax 616 | movl OPENSSL_ia32cap_P(%rip),%edx 617 | btl $20,%edx 618 | jc .L8xchar 619 | btl $30,%edx 620 | jnc .Ldone 621 | addq $25,%rax 622 | .byte 0xf3,0xc3 623 | .L8xchar: 624 | addq $12,%rax 625 | .Ldone: 626 | .byte 0xf3,0xc3 627 | .cfi_endproc 628 | .align 64 629 | .Lopts: 630 | .byte 114,99,52,40,56,120,44,105,110,116,41,0 631 | .byte 114,99,52,40,56,120,44,99,104,97,114,41,0 632 | .byte 114,99,52,40,49,54,120,44,105,110,116,41,0 633 | .byte 82,67,52,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 634 | .align 64 635 | .size RC4_options,.-RC4_options 636 | .section ".note.gnu.property", "a" 637 | .p2align 3 638 | .long 1f - 0f 639 | .long 4f - 1f 640 | .long 5 641 | 0: 642 | # "GNU" encoded with .byte, since .asciz isn't supported 643 | # on Solaris. 644 | .byte 0x47 645 | .byte 0x4e 646 | .byte 0x55 647 | .byte 0 648 | 1: 649 | .p2align 3 650 | .long 0xc0000002 651 | .long 3f - 2f 652 | 2: 653 | .long 3 654 | 3: 655 | .p2align 3 656 | 4: 657 | -------------------------------------------------------------------------------- /crypto/sha/keccak1600-x86_64.s: -------------------------------------------------------------------------------- 1 | .text 2 | 3 | .type __KeccakF1600,@function 4 | .align 32 5 | __KeccakF1600: 6 | .cfi_startproc 7 | movq 60(%rdi),%rax 8 | movq 68(%rdi),%rbx 9 | movq 76(%rdi),%rcx 10 | movq 84(%rdi),%rdx 11 | movq 92(%rdi),%rbp 12 | jmp .Loop 13 | 14 | .align 32 15 | .Loop: 16 | movq -100(%rdi),%r8 17 | movq -52(%rdi),%r9 18 | movq -4(%rdi),%r10 19 | movq 44(%rdi),%r11 20 | 21 | xorq -84(%rdi),%rcx 22 | xorq -76(%rdi),%rdx 23 | xorq %r8,%rax 24 | xorq -92(%rdi),%rbx 25 | xorq -44(%rdi),%rcx 26 | xorq -60(%rdi),%rax 27 | movq %rbp,%r12 28 | xorq -68(%rdi),%rbp 29 | 30 | xorq %r10,%rcx 31 | xorq -20(%rdi),%rax 32 | xorq -36(%rdi),%rdx 33 | xorq %r9,%rbx 34 | xorq -28(%rdi),%rbp 35 | 36 | xorq 36(%rdi),%rcx 37 | xorq 20(%rdi),%rax 38 | xorq 4(%rdi),%rdx 39 | xorq -12(%rdi),%rbx 40 | xorq 12(%rdi),%rbp 41 | 42 | movq %rcx,%r13 43 | rolq $1,%rcx 44 | xorq %rax,%rcx 45 | xorq %r11,%rdx 46 | 47 | rolq $1,%rax 48 | xorq %rdx,%rax 49 | xorq 28(%rdi),%rbx 50 | 51 | rolq $1,%rdx 52 | xorq %rbx,%rdx 53 | xorq 52(%rdi),%rbp 54 | 55 | rolq $1,%rbx 56 | xorq %rbp,%rbx 57 | 58 | rolq $1,%rbp 59 | xorq %r13,%rbp 60 | xorq %rcx,%r9 61 | xorq %rdx,%r10 62 | rolq $44,%r9 63 | xorq %rbp,%r11 64 | xorq %rax,%r12 65 | rolq $43,%r10 66 | xorq %rbx,%r8 67 | movq %r9,%r13 68 | rolq $21,%r11 69 | orq %r10,%r9 70 | xorq %r8,%r9 71 | rolq $14,%r12 72 | 73 | xorq (%r15),%r9 74 | leaq 8(%r15),%r15 75 | 76 | movq %r12,%r14 77 | andq %r11,%r12 78 | movq %r9,-100(%rsi) 79 | xorq %r10,%r12 80 | notq %r10 81 | movq %r12,-84(%rsi) 82 | 83 | orq %r11,%r10 84 | movq 76(%rdi),%r12 85 | xorq %r13,%r10 86 | movq %r10,-92(%rsi) 87 | 88 | andq %r8,%r13 89 | movq -28(%rdi),%r9 90 | xorq %r14,%r13 91 | movq -20(%rdi),%r10 92 | movq %r13,-68(%rsi) 93 | 94 | orq %r8,%r14 95 | movq -76(%rdi),%r8 96 | xorq %r11,%r14 97 | movq 28(%rdi),%r11 98 | movq %r14,-76(%rsi) 99 | 100 | 101 | xorq %rbp,%r8 102 | xorq %rdx,%r12 103 | rolq $28,%r8 104 | xorq %rcx,%r11 105 | xorq %rax,%r9 106 | rolq $61,%r12 107 | rolq $45,%r11 108 | xorq %rbx,%r10 109 | rolq $20,%r9 110 | movq %r8,%r13 111 | orq %r12,%r8 112 | rolq $3,%r10 113 | 114 | xorq %r11,%r8 115 | movq %r8,-36(%rsi) 116 | 117 | movq %r9,%r14 118 | andq %r13,%r9 119 | movq -92(%rdi),%r8 120 | xorq %r12,%r9 121 | notq %r12 122 | movq %r9,-28(%rsi) 123 | 124 | orq %r11,%r12 125 | movq -44(%rdi),%r9 126 | xorq %r10,%r12 127 | movq %r12,-44(%rsi) 128 | 129 | andq %r10,%r11 130 | movq 60(%rdi),%r12 131 | xorq %r14,%r11 132 | movq %r11,-52(%rsi) 133 | 134 | orq %r10,%r14 135 | movq 4(%rdi),%r10 136 | xorq %r13,%r14 137 | movq 52(%rdi),%r11 138 | movq %r14,-60(%rsi) 139 | 140 | 141 | xorq %rbp,%r10 142 | xorq %rax,%r11 143 | rolq $25,%r10 144 | xorq %rdx,%r9 145 | rolq $8,%r11 146 | xorq %rbx,%r12 147 | rolq $6,%r9 148 | xorq %rcx,%r8 149 | rolq $18,%r12 150 | movq %r10,%r13 151 | andq %r11,%r10 152 | rolq $1,%r8 153 | 154 | notq %r11 155 | xorq %r9,%r10 156 | movq %r10,-12(%rsi) 157 | 158 | movq %r12,%r14 159 | andq %r11,%r12 160 | movq -12(%rdi),%r10 161 | xorq %r13,%r12 162 | movq %r12,-4(%rsi) 163 | 164 | orq %r9,%r13 165 | movq 84(%rdi),%r12 166 | xorq %r8,%r13 167 | movq %r13,-20(%rsi) 168 | 169 | andq %r8,%r9 170 | xorq %r14,%r9 171 | movq %r9,12(%rsi) 172 | 173 | orq %r8,%r14 174 | movq -60(%rdi),%r9 175 | xorq %r11,%r14 176 | movq 36(%rdi),%r11 177 | movq %r14,4(%rsi) 178 | 179 | 180 | movq -68(%rdi),%r8 181 | 182 | xorq %rcx,%r10 183 | xorq %rdx,%r11 184 | rolq $10,%r10 185 | xorq %rbx,%r9 186 | rolq $15,%r11 187 | xorq %rbp,%r12 188 | rolq $36,%r9 189 | xorq %rax,%r8 190 | rolq $56,%r12 191 | movq %r10,%r13 192 | orq %r11,%r10 193 | rolq $27,%r8 194 | 195 | notq %r11 196 | xorq %r9,%r10 197 | movq %r10,28(%rsi) 198 | 199 | movq %r12,%r14 200 | orq %r11,%r12 201 | xorq %r13,%r12 202 | movq %r12,36(%rsi) 203 | 204 | andq %r9,%r13 205 | xorq %r8,%r13 206 | movq %r13,20(%rsi) 207 | 208 | orq %r8,%r9 209 | xorq %r14,%r9 210 | movq %r9,52(%rsi) 211 | 212 | andq %r14,%r8 213 | xorq %r11,%r8 214 | movq %r8,44(%rsi) 215 | 216 | 217 | xorq -84(%rdi),%rdx 218 | xorq -36(%rdi),%rbp 219 | rolq $62,%rdx 220 | xorq 68(%rdi),%rcx 221 | rolq $55,%rbp 222 | xorq 12(%rdi),%rax 223 | rolq $2,%rcx 224 | xorq 20(%rdi),%rbx 225 | xchgq %rsi,%rdi 226 | rolq $39,%rax 227 | rolq $41,%rbx 228 | movq %rdx,%r13 229 | andq %rbp,%rdx 230 | notq %rbp 231 | xorq %rcx,%rdx 232 | movq %rdx,92(%rdi) 233 | 234 | movq %rax,%r14 235 | andq %rbp,%rax 236 | xorq %r13,%rax 237 | movq %rax,60(%rdi) 238 | 239 | orq %rcx,%r13 240 | xorq %rbx,%r13 241 | movq %r13,84(%rdi) 242 | 243 | andq %rbx,%rcx 244 | xorq %r14,%rcx 245 | movq %rcx,76(%rdi) 246 | 247 | orq %r14,%rbx 248 | xorq %rbp,%rbx 249 | movq %rbx,68(%rdi) 250 | 251 | movq %rdx,%rbp 252 | movq %r13,%rdx 253 | 254 | testq $255,%r15 255 | jnz .Loop 256 | 257 | leaq -192(%r15),%r15 258 | .byte 0xf3,0xc3 259 | .cfi_endproc 260 | .size __KeccakF1600,.-__KeccakF1600 261 | 262 | .type KeccakF1600,@function 263 | .align 32 264 | KeccakF1600: 265 | .cfi_startproc 266 | pushq %rbx 267 | .cfi_adjust_cfa_offset 8 268 | .cfi_offset %rbx,-16 269 | pushq %rbp 270 | .cfi_adjust_cfa_offset 8 271 | .cfi_offset %rbp,-24 272 | pushq %r12 273 | .cfi_adjust_cfa_offset 8 274 | .cfi_offset %r12,-32 275 | pushq %r13 276 | .cfi_adjust_cfa_offset 8 277 | .cfi_offset %r13,-40 278 | pushq %r14 279 | .cfi_adjust_cfa_offset 8 280 | .cfi_offset %r14,-48 281 | pushq %r15 282 | .cfi_adjust_cfa_offset 8 283 | .cfi_offset %r15,-56 284 | 285 | leaq 100(%rdi),%rdi 286 | subq $200,%rsp 287 | .cfi_adjust_cfa_offset 200 288 | 289 | notq -92(%rdi) 290 | notq -84(%rdi) 291 | notq -36(%rdi) 292 | notq -4(%rdi) 293 | notq 36(%rdi) 294 | notq 60(%rdi) 295 | 296 | leaq iotas(%rip),%r15 297 | leaq 100(%rsp),%rsi 298 | 299 | call __KeccakF1600 300 | 301 | notq -92(%rdi) 302 | notq -84(%rdi) 303 | notq -36(%rdi) 304 | notq -4(%rdi) 305 | notq 36(%rdi) 306 | notq 60(%rdi) 307 | leaq -100(%rdi),%rdi 308 | 309 | addq $200,%rsp 310 | .cfi_adjust_cfa_offset -200 311 | 312 | popq %r15 313 | .cfi_adjust_cfa_offset -8 314 | .cfi_restore %r15 315 | popq %r14 316 | .cfi_adjust_cfa_offset -8 317 | .cfi_restore %r14 318 | popq %r13 319 | .cfi_adjust_cfa_offset -8 320 | .cfi_restore %r13 321 | popq %r12 322 | .cfi_adjust_cfa_offset -8 323 | .cfi_restore %r12 324 | popq %rbp 325 | .cfi_adjust_cfa_offset -8 326 | .cfi_restore %rbp 327 | popq %rbx 328 | .cfi_adjust_cfa_offset -8 329 | .cfi_restore %rbx 330 | .byte 0xf3,0xc3 331 | .cfi_endproc 332 | .size KeccakF1600,.-KeccakF1600 333 | .globl SHA3_absorb 334 | .type SHA3_absorb,@function 335 | .align 32 336 | SHA3_absorb: 337 | .cfi_startproc 338 | pushq %rbx 339 | .cfi_adjust_cfa_offset 8 340 | .cfi_offset %rbx,-16 341 | pushq %rbp 342 | .cfi_adjust_cfa_offset 8 343 | .cfi_offset %rbp,-24 344 | pushq %r12 345 | .cfi_adjust_cfa_offset 8 346 | .cfi_offset %r12,-32 347 | pushq %r13 348 | .cfi_adjust_cfa_offset 8 349 | .cfi_offset %r13,-40 350 | pushq %r14 351 | .cfi_adjust_cfa_offset 8 352 | .cfi_offset %r14,-48 353 | pushq %r15 354 | .cfi_adjust_cfa_offset 8 355 | .cfi_offset %r15,-56 356 | 357 | leaq 100(%rdi),%rdi 358 | subq $232,%rsp 359 | .cfi_adjust_cfa_offset 232 360 | 361 | movq %rsi,%r9 362 | leaq 100(%rsp),%rsi 363 | 364 | notq -92(%rdi) 365 | notq -84(%rdi) 366 | notq -36(%rdi) 367 | notq -4(%rdi) 368 | notq 36(%rdi) 369 | notq 60(%rdi) 370 | leaq iotas(%rip),%r15 371 | 372 | movq %rcx,216-100(%rsi) 373 | 374 | .Loop_absorb: 375 | cmpq %rcx,%rdx 376 | jc .Ldone_absorb 377 | 378 | shrq $3,%rcx 379 | leaq -100(%rdi),%r8 380 | 381 | .Lblock_absorb: 382 | movq (%r9),%rax 383 | leaq 8(%r9),%r9 384 | xorq (%r8),%rax 385 | leaq 8(%r8),%r8 386 | subq $8,%rdx 387 | movq %rax,-8(%r8) 388 | subq $1,%rcx 389 | jnz .Lblock_absorb 390 | 391 | movq %r9,200-100(%rsi) 392 | movq %rdx,208-100(%rsi) 393 | call __KeccakF1600 394 | movq 200-100(%rsi),%r9 395 | movq 208-100(%rsi),%rdx 396 | movq 216-100(%rsi),%rcx 397 | jmp .Loop_absorb 398 | 399 | .align 32 400 | .Ldone_absorb: 401 | movq %rdx,%rax 402 | 403 | notq -92(%rdi) 404 | notq -84(%rdi) 405 | notq -36(%rdi) 406 | notq -4(%rdi) 407 | notq 36(%rdi) 408 | notq 60(%rdi) 409 | 410 | addq $232,%rsp 411 | .cfi_adjust_cfa_offset -232 412 | 413 | popq %r15 414 | .cfi_adjust_cfa_offset -8 415 | .cfi_restore %r15 416 | popq %r14 417 | .cfi_adjust_cfa_offset -8 418 | .cfi_restore %r14 419 | popq %r13 420 | .cfi_adjust_cfa_offset -8 421 | .cfi_restore %r13 422 | popq %r12 423 | .cfi_adjust_cfa_offset -8 424 | .cfi_restore %r12 425 | popq %rbp 426 | .cfi_adjust_cfa_offset -8 427 | .cfi_restore %rbp 428 | popq %rbx 429 | .cfi_adjust_cfa_offset -8 430 | .cfi_restore %rbx 431 | .byte 0xf3,0xc3 432 | .cfi_endproc 433 | .size SHA3_absorb,.-SHA3_absorb 434 | .globl SHA3_squeeze 435 | .type SHA3_squeeze,@function 436 | .align 32 437 | SHA3_squeeze: 438 | .cfi_startproc 439 | pushq %r12 440 | .cfi_adjust_cfa_offset 8 441 | .cfi_offset %r12,-16 442 | pushq %r13 443 | .cfi_adjust_cfa_offset 8 444 | .cfi_offset %r13,-24 445 | pushq %r14 446 | .cfi_adjust_cfa_offset 8 447 | .cfi_offset %r14,-32 448 | 449 | shrq $3,%rcx 450 | movq %rdi,%r9 451 | movq %rsi,%r12 452 | movq %rdx,%r13 453 | movq %rcx,%r14 454 | btl $0,%r8d 455 | jc .Lnext_block 456 | jmp .Loop_squeeze 457 | 458 | .align 32 459 | .Loop_squeeze: 460 | cmpq $8,%r13 461 | jb .Ltail_squeeze 462 | 463 | movq (%r9),%rax 464 | leaq 8(%r9),%r9 465 | movq %rax,(%r12) 466 | leaq 8(%r12),%r12 467 | subq $8,%r13 468 | jz .Ldone_squeeze 469 | 470 | subq $1,%rcx 471 | jnz .Loop_squeeze 472 | .Lnext_block: 473 | call KeccakF1600 474 | movq %rdi,%r9 475 | movq %r14,%rcx 476 | jmp .Loop_squeeze 477 | 478 | .Ltail_squeeze: 479 | movq %r9,%rsi 480 | movq %r12,%rdi 481 | movq %r13,%rcx 482 | .byte 0xf3,0xa4 483 | 484 | .Ldone_squeeze: 485 | popq %r14 486 | .cfi_adjust_cfa_offset -8 487 | .cfi_restore %r14 488 | popq %r13 489 | .cfi_adjust_cfa_offset -8 490 | .cfi_restore %r13 491 | popq %r12 492 | .cfi_adjust_cfa_offset -8 493 | .cfi_restore %r13 494 | .byte 0xf3,0xc3 495 | .cfi_endproc 496 | .size SHA3_squeeze,.-SHA3_squeeze 497 | .align 256 498 | .quad 0,0,0,0,0,0,0,0 499 | .type iotas,@object 500 | iotas: 501 | .quad 0x0000000000000001 502 | .quad 0x0000000000008082 503 | .quad 0x800000000000808a 504 | .quad 0x8000000080008000 505 | .quad 0x000000000000808b 506 | .quad 0x0000000080000001 507 | .quad 0x8000000080008081 508 | .quad 0x8000000000008009 509 | .quad 0x000000000000008a 510 | .quad 0x0000000000000088 511 | .quad 0x0000000080008009 512 | .quad 0x000000008000000a 513 | .quad 0x000000008000808b 514 | .quad 0x800000000000008b 515 | .quad 0x8000000000008089 516 | .quad 0x8000000000008003 517 | .quad 0x8000000000008002 518 | .quad 0x8000000000000080 519 | .quad 0x000000000000800a 520 | .quad 0x800000008000000a 521 | .quad 0x8000000080008081 522 | .quad 0x8000000000008080 523 | .quad 0x0000000080000001 524 | .quad 0x8000000080008008 525 | .size iotas,.-iotas 526 | .byte 75,101,99,99,97,107,45,49,54,48,48,32,97,98,115,111,114,98,32,97,110,100,32,115,113,117,101,101,122,101,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 527 | .section ".note.gnu.property", "a" 528 | .p2align 3 529 | .long 1f - 0f 530 | .long 4f - 1f 531 | .long 5 532 | 0: 533 | # "GNU" encoded with .byte, since .asciz isn't supported 534 | # on Solaris. 535 | .byte 0x47 536 | .byte 0x4e 537 | .byte 0x55 538 | .byte 0 539 | 1: 540 | .p2align 3 541 | .long 0xc0000002 542 | .long 3f - 2f 543 | 2: 544 | .long 3 545 | 3: 546 | .p2align 3 547 | 4: 548 | -------------------------------------------------------------------------------- /crypto/x86_64cpuid.s: -------------------------------------------------------------------------------- 1 | 2 | .hidden OPENSSL_cpuid_setup 3 | .section .init 4 | call OPENSSL_cpuid_setup 5 | 6 | .hidden OPENSSL_ia32cap_P 7 | .comm OPENSSL_ia32cap_P,16,4 8 | 9 | .text 10 | 11 | .globl OPENSSL_atomic_add 12 | .type OPENSSL_atomic_add,@function 13 | .align 16 14 | OPENSSL_atomic_add: 15 | .cfi_startproc 16 | .byte 243,15,30,250 17 | movl (%rdi),%eax 18 | .Lspin: leaq (%rsi,%rax,1),%r8 19 | .byte 0xf0 20 | cmpxchgl %r8d,(%rdi) 21 | jne .Lspin 22 | movl %r8d,%eax 23 | .byte 0x48,0x98 24 | .byte 0xf3,0xc3 25 | .cfi_endproc 26 | .size OPENSSL_atomic_add,.-OPENSSL_atomic_add 27 | 28 | .globl OPENSSL_rdtsc 29 | .type OPENSSL_rdtsc,@function 30 | .align 16 31 | OPENSSL_rdtsc: 32 | .cfi_startproc 33 | .byte 243,15,30,250 34 | rdtsc 35 | shlq $32,%rdx 36 | orq %rdx,%rax 37 | .byte 0xf3,0xc3 38 | .cfi_endproc 39 | .size OPENSSL_rdtsc,.-OPENSSL_rdtsc 40 | 41 | .globl OPENSSL_ia32_cpuid 42 | .type OPENSSL_ia32_cpuid,@function 43 | .align 16 44 | OPENSSL_ia32_cpuid: 45 | .cfi_startproc 46 | .byte 243,15,30,250 47 | movq %rbx,%r8 48 | .cfi_register %rbx,%r8 49 | 50 | xorl %eax,%eax 51 | movq %rax,8(%rdi) 52 | cpuid 53 | movl %eax,%r11d 54 | 55 | xorl %eax,%eax 56 | cmpl $0x756e6547,%ebx 57 | setne %al 58 | movl %eax,%r9d 59 | cmpl $0x49656e69,%edx 60 | setne %al 61 | orl %eax,%r9d 62 | cmpl $0x6c65746e,%ecx 63 | setne %al 64 | orl %eax,%r9d 65 | jz .Lintel 66 | 67 | cmpl $0x68747541,%ebx 68 | setne %al 69 | movl %eax,%r10d 70 | cmpl $0x69746E65,%edx 71 | setne %al 72 | orl %eax,%r10d 73 | cmpl $0x444D4163,%ecx 74 | setne %al 75 | orl %eax,%r10d 76 | jnz .Lintel 77 | 78 | 79 | movl $0x80000000,%eax 80 | cpuid 81 | cmpl $0x80000001,%eax 82 | jb .Lintel 83 | movl %eax,%r10d 84 | movl $0x80000001,%eax 85 | cpuid 86 | orl %ecx,%r9d 87 | andl $0x00000801,%r9d 88 | 89 | cmpl $0x80000008,%r10d 90 | jb .Lintel 91 | 92 | movl $0x80000008,%eax 93 | cpuid 94 | movzbq %cl,%r10 95 | incq %r10 96 | 97 | movl $1,%eax 98 | cpuid 99 | btl $28,%edx 100 | jnc .Lgeneric 101 | shrl $16,%ebx 102 | cmpb %r10b,%bl 103 | ja .Lgeneric 104 | andl $0xefffffff,%edx 105 | jmp .Lgeneric 106 | 107 | .Lintel: 108 | cmpl $4,%r11d 109 | movl $-1,%r10d 110 | jb .Lnocacheinfo 111 | 112 | movl $4,%eax 113 | movl $0,%ecx 114 | cpuid 115 | movl %eax,%r10d 116 | shrl $14,%r10d 117 | andl $0xfff,%r10d 118 | 119 | .Lnocacheinfo: 120 | movl $1,%eax 121 | cpuid 122 | movd %eax,%xmm0 123 | andl $0xbfefffff,%edx 124 | cmpl $0,%r9d 125 | jne .Lnotintel 126 | orl $0x40000000,%edx 127 | andb $15,%ah 128 | cmpb $15,%ah 129 | jne .LnotP4 130 | orl $0x00100000,%edx 131 | .LnotP4: 132 | cmpb $6,%ah 133 | jne .Lnotintel 134 | andl $0x0fff0ff0,%eax 135 | cmpl $0x00050670,%eax 136 | je .Lknights 137 | cmpl $0x00080650,%eax 138 | jne .Lnotintel 139 | .Lknights: 140 | andl $0xfbffffff,%ecx 141 | 142 | .Lnotintel: 143 | btl $28,%edx 144 | jnc .Lgeneric 145 | andl $0xefffffff,%edx 146 | cmpl $0,%r10d 147 | je .Lgeneric 148 | 149 | orl $0x10000000,%edx 150 | shrl $16,%ebx 151 | cmpb $1,%bl 152 | ja .Lgeneric 153 | andl $0xefffffff,%edx 154 | .Lgeneric: 155 | andl $0x00000800,%r9d 156 | andl $0xfffff7ff,%ecx 157 | orl %ecx,%r9d 158 | 159 | movl %edx,%r10d 160 | 161 | cmpl $7,%r11d 162 | jb .Lno_extended_info 163 | movl $7,%eax 164 | xorl %ecx,%ecx 165 | cpuid 166 | btl $26,%r9d 167 | jc .Lnotknights 168 | andl $0xfff7ffff,%ebx 169 | .Lnotknights: 170 | movd %xmm0,%eax 171 | andl $0x0fff0ff0,%eax 172 | cmpl $0x00050650,%eax 173 | jne .Lnotskylakex 174 | andl $0xfffeffff,%ebx 175 | 176 | .Lnotskylakex: 177 | movl %ebx,8(%rdi) 178 | movl %ecx,12(%rdi) 179 | .Lno_extended_info: 180 | 181 | btl $27,%r9d 182 | jnc .Lclear_avx 183 | xorl %ecx,%ecx 184 | .byte 0x0f,0x01,0xd0 185 | andl $0xe6,%eax 186 | cmpl $0xe6,%eax 187 | je .Ldone 188 | andl $0x3fdeffff,8(%rdi) 189 | 190 | 191 | 192 | 193 | andl $6,%eax 194 | cmpl $6,%eax 195 | je .Ldone 196 | .Lclear_avx: 197 | movl $0xefffe7ff,%eax 198 | andl %eax,%r9d 199 | movl $0x3fdeffdf,%eax 200 | andl %eax,8(%rdi) 201 | .Ldone: 202 | shlq $32,%r9 203 | movl %r10d,%eax 204 | movq %r8,%rbx 205 | .cfi_restore %rbx 206 | orq %r9,%rax 207 | .byte 0xf3,0xc3 208 | .cfi_endproc 209 | .size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid 210 | 211 | .globl OPENSSL_cleanse 212 | .type OPENSSL_cleanse,@function 213 | .align 16 214 | OPENSSL_cleanse: 215 | .cfi_startproc 216 | .byte 243,15,30,250 217 | xorq %rax,%rax 218 | cmpq $15,%rsi 219 | jae .Lot 220 | cmpq $0,%rsi 221 | je .Lret 222 | .Little: 223 | movb %al,(%rdi) 224 | subq $1,%rsi 225 | leaq 1(%rdi),%rdi 226 | jnz .Little 227 | .Lret: 228 | .byte 0xf3,0xc3 229 | .align 16 230 | .Lot: 231 | testq $7,%rdi 232 | jz .Laligned 233 | movb %al,(%rdi) 234 | leaq -1(%rsi),%rsi 235 | leaq 1(%rdi),%rdi 236 | jmp .Lot 237 | .Laligned: 238 | movq %rax,(%rdi) 239 | leaq -8(%rsi),%rsi 240 | testq $-8,%rsi 241 | leaq 8(%rdi),%rdi 242 | jnz .Laligned 243 | cmpq $0,%rsi 244 | jne .Little 245 | .byte 0xf3,0xc3 246 | .cfi_endproc 247 | .size OPENSSL_cleanse,.-OPENSSL_cleanse 248 | 249 | .globl CRYPTO_memcmp 250 | .type CRYPTO_memcmp,@function 251 | .align 16 252 | CRYPTO_memcmp: 253 | .cfi_startproc 254 | .byte 243,15,30,250 255 | xorq %rax,%rax 256 | xorq %r10,%r10 257 | cmpq $0,%rdx 258 | je .Lno_data 259 | cmpq $16,%rdx 260 | jne .Loop_cmp 261 | movq (%rdi),%r10 262 | movq 8(%rdi),%r11 263 | movq $1,%rdx 264 | xorq (%rsi),%r10 265 | xorq 8(%rsi),%r11 266 | orq %r11,%r10 267 | cmovnzq %rdx,%rax 268 | .byte 0xf3,0xc3 269 | 270 | .align 16 271 | .Loop_cmp: 272 | movb (%rdi),%r10b 273 | leaq 1(%rdi),%rdi 274 | xorb (%rsi),%r10b 275 | leaq 1(%rsi),%rsi 276 | orb %r10b,%al 277 | decq %rdx 278 | jnz .Loop_cmp 279 | negq %rax 280 | shrq $63,%rax 281 | .Lno_data: 282 | .byte 0xf3,0xc3 283 | .cfi_endproc 284 | .size CRYPTO_memcmp,.-CRYPTO_memcmp 285 | .globl OPENSSL_wipe_cpu 286 | .type OPENSSL_wipe_cpu,@function 287 | .align 16 288 | OPENSSL_wipe_cpu: 289 | .cfi_startproc 290 | .byte 243,15,30,250 291 | pxor %xmm0,%xmm0 292 | pxor %xmm1,%xmm1 293 | pxor %xmm2,%xmm2 294 | pxor %xmm3,%xmm3 295 | pxor %xmm4,%xmm4 296 | pxor %xmm5,%xmm5 297 | pxor %xmm6,%xmm6 298 | pxor %xmm7,%xmm7 299 | pxor %xmm8,%xmm8 300 | pxor %xmm9,%xmm9 301 | pxor %xmm10,%xmm10 302 | pxor %xmm11,%xmm11 303 | pxor %xmm12,%xmm12 304 | pxor %xmm13,%xmm13 305 | pxor %xmm14,%xmm14 306 | pxor %xmm15,%xmm15 307 | xorq %rcx,%rcx 308 | xorq %rdx,%rdx 309 | xorq %rsi,%rsi 310 | xorq %rdi,%rdi 311 | xorq %r8,%r8 312 | xorq %r9,%r9 313 | xorq %r10,%r10 314 | xorq %r11,%r11 315 | leaq 8(%rsp),%rax 316 | .byte 0xf3,0xc3 317 | .cfi_endproc 318 | .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu 319 | .globl OPENSSL_instrument_bus 320 | .type OPENSSL_instrument_bus,@function 321 | .align 16 322 | OPENSSL_instrument_bus: 323 | .cfi_startproc 324 | .byte 243,15,30,250 325 | movq %rdi,%r10 326 | movq %rsi,%rcx 327 | movq %rsi,%r11 328 | 329 | rdtsc 330 | movl %eax,%r8d 331 | movl $0,%r9d 332 | clflush (%r10) 333 | .byte 0xf0 334 | addl %r9d,(%r10) 335 | jmp .Loop 336 | .align 16 337 | .Loop: rdtsc 338 | movl %eax,%edx 339 | subl %r8d,%eax 340 | movl %edx,%r8d 341 | movl %eax,%r9d 342 | clflush (%r10) 343 | .byte 0xf0 344 | addl %eax,(%r10) 345 | leaq 4(%r10),%r10 346 | subq $1,%rcx 347 | jnz .Loop 348 | 349 | movq %r11,%rax 350 | .byte 0xf3,0xc3 351 | .cfi_endproc 352 | .size OPENSSL_instrument_bus,.-OPENSSL_instrument_bus 353 | 354 | .globl OPENSSL_instrument_bus2 355 | .type OPENSSL_instrument_bus2,@function 356 | .align 16 357 | OPENSSL_instrument_bus2: 358 | .cfi_startproc 359 | .byte 243,15,30,250 360 | movq %rdi,%r10 361 | movq %rsi,%rcx 362 | movq %rdx,%r11 363 | movq %rcx,8(%rsp) 364 | 365 | rdtsc 366 | movl %eax,%r8d 367 | movl $0,%r9d 368 | 369 | clflush (%r10) 370 | .byte 0xf0 371 | addl %r9d,(%r10) 372 | 373 | rdtsc 374 | movl %eax,%edx 375 | subl %r8d,%eax 376 | movl %edx,%r8d 377 | movl %eax,%r9d 378 | .Loop2: 379 | clflush (%r10) 380 | .byte 0xf0 381 | addl %eax,(%r10) 382 | 383 | subq $1,%r11 384 | jz .Ldone2 385 | 386 | rdtsc 387 | movl %eax,%edx 388 | subl %r8d,%eax 389 | movl %edx,%r8d 390 | cmpl %r9d,%eax 391 | movl %eax,%r9d 392 | movl $0,%edx 393 | setne %dl 394 | subq %rdx,%rcx 395 | leaq (%r10,%rdx,4),%r10 396 | jnz .Loop2 397 | 398 | .Ldone2: 399 | movq 8(%rsp),%rax 400 | subq %rcx,%rax 401 | .byte 0xf3,0xc3 402 | .cfi_endproc 403 | .size OPENSSL_instrument_bus2,.-OPENSSL_instrument_bus2 404 | .globl OPENSSL_ia32_rdrand_bytes 405 | .type OPENSSL_ia32_rdrand_bytes,@function 406 | .align 16 407 | OPENSSL_ia32_rdrand_bytes: 408 | .cfi_startproc 409 | .byte 243,15,30,250 410 | xorq %rax,%rax 411 | cmpq $0,%rsi 412 | je .Ldone_rdrand_bytes 413 | 414 | movq $8,%r11 415 | .Loop_rdrand_bytes: 416 | .byte 73,15,199,242 417 | jc .Lbreak_rdrand_bytes 418 | decq %r11 419 | jnz .Loop_rdrand_bytes 420 | jmp .Ldone_rdrand_bytes 421 | 422 | .align 16 423 | .Lbreak_rdrand_bytes: 424 | cmpq $8,%rsi 425 | jb .Ltail_rdrand_bytes 426 | movq %r10,(%rdi) 427 | leaq 8(%rdi),%rdi 428 | addq $8,%rax 429 | subq $8,%rsi 430 | jz .Ldone_rdrand_bytes 431 | movq $8,%r11 432 | jmp .Loop_rdrand_bytes 433 | 434 | .align 16 435 | .Ltail_rdrand_bytes: 436 | movb %r10b,(%rdi) 437 | leaq 1(%rdi),%rdi 438 | incq %rax 439 | shrq $8,%r10 440 | decq %rsi 441 | jnz .Ltail_rdrand_bytes 442 | 443 | .Ldone_rdrand_bytes: 444 | xorq %r10,%r10 445 | .byte 0xf3,0xc3 446 | .cfi_endproc 447 | .size OPENSSL_ia32_rdrand_bytes,.-OPENSSL_ia32_rdrand_bytes 448 | .globl OPENSSL_ia32_rdseed_bytes 449 | .type OPENSSL_ia32_rdseed_bytes,@function 450 | .align 16 451 | OPENSSL_ia32_rdseed_bytes: 452 | .cfi_startproc 453 | .byte 243,15,30,250 454 | xorq %rax,%rax 455 | cmpq $0,%rsi 456 | je .Ldone_rdseed_bytes 457 | 458 | movq $8,%r11 459 | .Loop_rdseed_bytes: 460 | .byte 73,15,199,250 461 | jc .Lbreak_rdseed_bytes 462 | decq %r11 463 | jnz .Loop_rdseed_bytes 464 | jmp .Ldone_rdseed_bytes 465 | 466 | .align 16 467 | .Lbreak_rdseed_bytes: 468 | cmpq $8,%rsi 469 | jb .Ltail_rdseed_bytes 470 | movq %r10,(%rdi) 471 | leaq 8(%rdi),%rdi 472 | addq $8,%rax 473 | subq $8,%rsi 474 | jz .Ldone_rdseed_bytes 475 | movq $8,%r11 476 | jmp .Loop_rdseed_bytes 477 | 478 | .align 16 479 | .Ltail_rdseed_bytes: 480 | movb %r10b,(%rdi) 481 | leaq 1(%rdi),%rdi 482 | incq %rax 483 | shrq $8,%r10 484 | decq %rsi 485 | jnz .Ltail_rdseed_bytes 486 | 487 | .Ldone_rdseed_bytes: 488 | xorq %r10,%r10 489 | .byte 0xf3,0xc3 490 | .cfi_endproc 491 | .size OPENSSL_ia32_rdseed_bytes,.-OPENSSL_ia32_rdseed_bytes 492 | .section ".note.gnu.property", "a" 493 | .p2align 3 494 | .long 1f - 0f 495 | .long 4f - 1f 496 | .long 5 497 | 0: 498 | # "GNU" encoded with .byte, since .asciz isn't supported 499 | # on Solaris. 500 | .byte 0x47 501 | .byte 0x4e 502 | .byte 0x55 503 | .byte 0 504 | 1: 505 | .p2align 3 506 | .long 0xc0000002 507 | .long 3f - 2f 508 | 2: 509 | .long 3 510 | 3: 511 | .p2align 3 512 | 4: 513 | -------------------------------------------------------------------------------- /include/crypto/bn_conf.h: -------------------------------------------------------------------------------- 1 | /* WARNING: do not edit! */ 2 | /* Generated by Makefile from include/crypto/bn_conf.h.in */ 3 | /* 4 | * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. 5 | * 6 | * Licensed under the Apache License 2.0 (the "License"). You may not use 7 | * this file except in compliance with the License. You can obtain a copy 8 | * in the file LICENSE in the source distribution or at 9 | * https://www.openssl.org/source/license.html 10 | */ 11 | 12 | #ifndef OSSL_CRYPTO_BN_CONF_H 13 | # define OSSL_CRYPTO_BN_CONF_H 14 | # pragma once 15 | 16 | /* 17 | * The contents of this file are not used in the UEFI build, as 18 | * both 32-bit and 64-bit builds are supported from a single run 19 | * of the Configure script. 20 | */ 21 | 22 | /* Should we define BN_DIV2W here? */ 23 | 24 | /* Only one for the following should be defined */ 25 | #define SIXTY_FOUR_BIT_LONG 26 | #undef SIXTY_FOUR_BIT 27 | #undef THIRTY_TWO_BIT 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/crypto/dso_conf.h: -------------------------------------------------------------------------------- 1 | /* WARNING: do not edit! */ 2 | /* Generated by Makefile from include/crypto/dso_conf.h.in */ 3 | /* 4 | * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. 5 | * 6 | * Licensed under the Apache License 2.0 (the "License"). You may not use 7 | * this file except in compliance with the License. You can obtain a copy 8 | * in the file LICENSE in the source distribution or at 9 | * https://www.openssl.org/source/license.html 10 | */ 11 | 12 | #ifndef OSSL_CRYPTO_DSO_CONF_H 13 | # define OSSL_CRYPTO_DSO_CONF_H 14 | # pragma once 15 | 16 | # define DSO_DLFCN 17 | # define HAVE_DLFCN_H 18 | # define DSO_EXTENSION ".so" 19 | #endif 20 | -------------------------------------------------------------------------------- /include/internal/param_names.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from include/internal/param_names.h.in 4 | * 5 | * Copyright 2023 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | 14 | int ossl_param_find_pidx(const char *s); 15 | 16 | /* Parameter name definitions - generated by util/perl/OpenSSL/paramnames.pm */ 17 | #define NUM_PIDX 291 18 | 19 | #define PIDX_ALG_PARAM_CIPHER 0 20 | #define PIDX_ALG_PARAM_DIGEST 1 21 | #define PIDX_ALG_PARAM_ENGINE 2 22 | #define PIDX_ALG_PARAM_MAC 3 23 | #define PIDX_ALG_PARAM_PROPERTIES 4 24 | #define PIDX_ASYM_CIPHER_PARAM_DIGEST PIDX_PKEY_PARAM_DIGEST 25 | #define PIDX_ASYM_CIPHER_PARAM_ENGINE PIDX_PKEY_PARAM_ENGINE 26 | #define PIDX_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION 5 27 | #define PIDX_ASYM_CIPHER_PARAM_MGF1_DIGEST PIDX_PKEY_PARAM_MGF1_DIGEST 28 | #define PIDX_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS PIDX_PKEY_PARAM_MGF1_PROPERTIES 29 | #define PIDX_ASYM_CIPHER_PARAM_OAEP_DIGEST PIDX_ALG_PARAM_DIGEST 30 | #define PIDX_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS 6 31 | #define PIDX_ASYM_CIPHER_PARAM_OAEP_LABEL 7 32 | #define PIDX_ASYM_CIPHER_PARAM_PAD_MODE PIDX_PKEY_PARAM_PAD_MODE 33 | #define PIDX_ASYM_CIPHER_PARAM_PROPERTIES PIDX_PKEY_PARAM_PROPERTIES 34 | #define PIDX_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION 8 35 | #define PIDX_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION 9 36 | #define PIDX_CAPABILITY_TLS_GROUP_ALG 10 37 | #define PIDX_CAPABILITY_TLS_GROUP_ID 11 38 | #define PIDX_CAPABILITY_TLS_GROUP_IS_KEM 12 39 | #define PIDX_CAPABILITY_TLS_GROUP_MAX_DTLS 13 40 | #define PIDX_CAPABILITY_TLS_GROUP_MAX_TLS 14 41 | #define PIDX_CAPABILITY_TLS_GROUP_MIN_DTLS 15 42 | #define PIDX_CAPABILITY_TLS_GROUP_MIN_TLS 16 43 | #define PIDX_CAPABILITY_TLS_GROUP_NAME 17 44 | #define PIDX_CAPABILITY_TLS_GROUP_NAME_INTERNAL 18 45 | #define PIDX_CAPABILITY_TLS_GROUP_SECURITY_BITS 19 46 | #define PIDX_CAPABILITY_TLS_SIGALG_CODE_POINT 20 47 | #define PIDX_CAPABILITY_TLS_SIGALG_HASH_NAME 21 48 | #define PIDX_CAPABILITY_TLS_SIGALG_HASH_OID 22 49 | #define PIDX_CAPABILITY_TLS_SIGALG_IANA_NAME 23 50 | #define PIDX_CAPABILITY_TLS_SIGALG_KEYTYPE 24 51 | #define PIDX_CAPABILITY_TLS_SIGALG_KEYTYPE_OID 25 52 | #define PIDX_CAPABILITY_TLS_SIGALG_MAX_TLS 14 53 | #define PIDX_CAPABILITY_TLS_SIGALG_MIN_TLS 16 54 | #define PIDX_CAPABILITY_TLS_SIGALG_NAME 26 55 | #define PIDX_CAPABILITY_TLS_SIGALG_OID 27 56 | #define PIDX_CAPABILITY_TLS_SIGALG_SECURITY_BITS 28 57 | #define PIDX_CAPABILITY_TLS_SIGALG_SIG_NAME 29 58 | #define PIDX_CAPABILITY_TLS_SIGALG_SIG_OID 30 59 | #define PIDX_CIPHER_PARAM_AEAD 31 60 | #define PIDX_CIPHER_PARAM_AEAD_IVLEN PIDX_CIPHER_PARAM_IVLEN 61 | #define PIDX_CIPHER_PARAM_AEAD_MAC_KEY 32 62 | #define PIDX_CIPHER_PARAM_AEAD_TAG 33 63 | #define PIDX_CIPHER_PARAM_AEAD_TAGLEN 34 64 | #define PIDX_CIPHER_PARAM_AEAD_TLS1_AAD 35 65 | #define PIDX_CIPHER_PARAM_AEAD_TLS1_AAD_PAD 36 66 | #define PIDX_CIPHER_PARAM_AEAD_TLS1_GET_IV_GEN 37 67 | #define PIDX_CIPHER_PARAM_AEAD_TLS1_IV_FIXED 38 68 | #define PIDX_CIPHER_PARAM_AEAD_TLS1_SET_IV_INV 39 69 | #define PIDX_CIPHER_PARAM_ALGORITHM_ID_PARAMS 40 70 | #define PIDX_CIPHER_PARAM_BLOCK_SIZE 41 71 | #define PIDX_CIPHER_PARAM_CTS 42 72 | #define PIDX_CIPHER_PARAM_CTS_MODE 43 73 | #define PIDX_CIPHER_PARAM_CUSTOM_IV 44 74 | #define PIDX_CIPHER_PARAM_HAS_RAND_KEY 45 75 | #define PIDX_CIPHER_PARAM_IV 46 76 | #define PIDX_CIPHER_PARAM_IVLEN 47 77 | #define PIDX_CIPHER_PARAM_KEYLEN 48 78 | #define PIDX_CIPHER_PARAM_MODE 49 79 | #define PIDX_CIPHER_PARAM_NUM 50 80 | #define PIDX_CIPHER_PARAM_PADDING 51 81 | #define PIDX_CIPHER_PARAM_RANDOM_KEY 52 82 | #define PIDX_CIPHER_PARAM_RC2_KEYBITS 53 83 | #define PIDX_CIPHER_PARAM_ROUNDS 54 84 | #define PIDX_CIPHER_PARAM_SPEED 55 85 | #define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK 56 86 | #define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD 57 87 | #define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN 58 88 | #define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC 59 89 | #define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN 60 90 | #define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN 61 91 | #define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE 62 92 | #define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE 63 93 | #define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT 64 94 | #define PIDX_CIPHER_PARAM_TLS_MAC 65 95 | #define PIDX_CIPHER_PARAM_TLS_MAC_SIZE 66 96 | #define PIDX_CIPHER_PARAM_TLS_VERSION 67 97 | #define PIDX_CIPHER_PARAM_UPDATED_IV 68 98 | #define PIDX_CIPHER_PARAM_USE_BITS 69 99 | #define PIDX_CIPHER_PARAM_XTS_STANDARD 70 100 | #define PIDX_DECODER_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES 101 | #define PIDX_DIGEST_PARAM_ALGID_ABSENT 71 102 | #define PIDX_DIGEST_PARAM_BLOCK_SIZE 41 103 | #define PIDX_DIGEST_PARAM_MICALG 72 104 | #define PIDX_DIGEST_PARAM_PAD_TYPE 73 105 | #define PIDX_DIGEST_PARAM_SIZE 74 106 | #define PIDX_DIGEST_PARAM_SSL3_MS 75 107 | #define PIDX_DIGEST_PARAM_XOF 76 108 | #define PIDX_DIGEST_PARAM_XOFLEN 77 109 | #define PIDX_DRBG_PARAM_CIPHER PIDX_ALG_PARAM_CIPHER 110 | #define PIDX_DRBG_PARAM_DIGEST PIDX_ALG_PARAM_DIGEST 111 | #define PIDX_DRBG_PARAM_ENTROPY_REQUIRED 78 112 | #define PIDX_DRBG_PARAM_MAC PIDX_ALG_PARAM_MAC 113 | #define PIDX_DRBG_PARAM_MAX_ADINLEN 79 114 | #define PIDX_DRBG_PARAM_MAX_ENTROPYLEN 80 115 | #define PIDX_DRBG_PARAM_MAX_LENGTH 81 116 | #define PIDX_DRBG_PARAM_MAX_NONCELEN 82 117 | #define PIDX_DRBG_PARAM_MAX_PERSLEN 83 118 | #define PIDX_DRBG_PARAM_MIN_ENTROPYLEN 84 119 | #define PIDX_DRBG_PARAM_MIN_LENGTH 85 120 | #define PIDX_DRBG_PARAM_MIN_NONCELEN 86 121 | #define PIDX_DRBG_PARAM_PREDICTION_RESISTANCE 87 122 | #define PIDX_DRBG_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES 123 | #define PIDX_DRBG_PARAM_RANDOM_DATA 88 124 | #define PIDX_DRBG_PARAM_RESEED_COUNTER 89 125 | #define PIDX_DRBG_PARAM_RESEED_REQUESTS 90 126 | #define PIDX_DRBG_PARAM_RESEED_TIME 91 127 | #define PIDX_DRBG_PARAM_RESEED_TIME_INTERVAL 92 128 | #define PIDX_DRBG_PARAM_SIZE 74 129 | #define PIDX_DRBG_PARAM_USE_DF 93 130 | #define PIDX_ENCODER_PARAM_CIPHER PIDX_ALG_PARAM_CIPHER 131 | #define PIDX_ENCODER_PARAM_ENCRYPT_LEVEL 94 132 | #define PIDX_ENCODER_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES 133 | #define PIDX_ENCODER_PARAM_SAVE_PARAMETERS 95 134 | #define PIDX_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE 96 135 | #define PIDX_EXCHANGE_PARAM_KDF_DIGEST 97 136 | #define PIDX_EXCHANGE_PARAM_KDF_DIGEST_PROPS 98 137 | #define PIDX_EXCHANGE_PARAM_KDF_OUTLEN 99 138 | #define PIDX_EXCHANGE_PARAM_KDF_TYPE 100 139 | #define PIDX_EXCHANGE_PARAM_KDF_UKM 101 140 | #define PIDX_EXCHANGE_PARAM_PAD 102 141 | #define PIDX_GEN_PARAM_ITERATION 103 142 | #define PIDX_GEN_PARAM_POTENTIAL 104 143 | #define PIDX_KDF_PARAM_ARGON2_AD 105 144 | #define PIDX_KDF_PARAM_ARGON2_LANES 106 145 | #define PIDX_KDF_PARAM_ARGON2_MEMCOST 107 146 | #define PIDX_KDF_PARAM_ARGON2_VERSION 108 147 | #define PIDX_KDF_PARAM_CEK_ALG 109 148 | #define PIDX_KDF_PARAM_CIPHER PIDX_ALG_PARAM_CIPHER 149 | #define PIDX_KDF_PARAM_CONSTANT 110 150 | #define PIDX_KDF_PARAM_DATA 111 151 | #define PIDX_KDF_PARAM_DIGEST PIDX_ALG_PARAM_DIGEST 152 | #define PIDX_KDF_PARAM_EARLY_CLEAN 112 153 | #define PIDX_KDF_PARAM_HMACDRBG_ENTROPY 113 154 | #define PIDX_KDF_PARAM_HMACDRBG_NONCE 114 155 | #define PIDX_KDF_PARAM_INFO 115 156 | #define PIDX_KDF_PARAM_ITER 116 157 | #define PIDX_KDF_PARAM_KBKDF_R 117 158 | #define PIDX_KDF_PARAM_KBKDF_USE_L 118 159 | #define PIDX_KDF_PARAM_KBKDF_USE_SEPARATOR 119 160 | #define PIDX_KDF_PARAM_KEY 120 161 | #define PIDX_KDF_PARAM_LABEL 121 162 | #define PIDX_KDF_PARAM_MAC PIDX_ALG_PARAM_MAC 163 | #define PIDX_KDF_PARAM_MAC_SIZE 122 164 | #define PIDX_KDF_PARAM_MODE 49 165 | #define PIDX_KDF_PARAM_PASSWORD 123 166 | #define PIDX_KDF_PARAM_PKCS12_ID 124 167 | #define PIDX_KDF_PARAM_PKCS5 125 168 | #define PIDX_KDF_PARAM_PREFIX 126 169 | #define PIDX_KDF_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES 170 | #define PIDX_KDF_PARAM_SALT 127 171 | #define PIDX_KDF_PARAM_SCRYPT_MAXMEM 128 172 | #define PIDX_KDF_PARAM_SCRYPT_N 129 173 | #define PIDX_KDF_PARAM_SCRYPT_P 130 174 | #define PIDX_KDF_PARAM_SCRYPT_R 117 175 | #define PIDX_KDF_PARAM_SECRET 131 176 | #define PIDX_KDF_PARAM_SEED 132 177 | #define PIDX_KDF_PARAM_SIZE 74 178 | #define PIDX_KDF_PARAM_SSHKDF_SESSION_ID 133 179 | #define PIDX_KDF_PARAM_SSHKDF_TYPE 134 180 | #define PIDX_KDF_PARAM_SSHKDF_XCGHASH 135 181 | #define PIDX_KDF_PARAM_THREADS 136 182 | #define PIDX_KDF_PARAM_UKM 137 183 | #define PIDX_KDF_PARAM_X942_ACVPINFO 138 184 | #define PIDX_KDF_PARAM_X942_PARTYUINFO 139 185 | #define PIDX_KDF_PARAM_X942_PARTYVINFO 140 186 | #define PIDX_KDF_PARAM_X942_SUPP_PRIVINFO 141 187 | #define PIDX_KDF_PARAM_X942_SUPP_PUBINFO 142 188 | #define PIDX_KDF_PARAM_X942_USE_KEYBITS 143 189 | #define PIDX_KEM_PARAM_IKME 144 190 | #define PIDX_KEM_PARAM_OPERATION 145 191 | #define PIDX_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING 146 192 | #define PIDX_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA 147 193 | #define PIDX_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN 148 194 | #define PIDX_LIBSSL_RECORD_LAYER_PARAM_MODE 49 195 | #define PIDX_LIBSSL_RECORD_LAYER_PARAM_OPTIONS 149 196 | #define PIDX_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD 150 197 | #define PIDX_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC 151 198 | #define PIDX_LIBSSL_RECORD_LAYER_PARAM_TLSTREE 152 199 | #define PIDX_LIBSSL_RECORD_LAYER_PARAM_USE_ETM 153 200 | #define PIDX_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN 154 201 | #define PIDX_MAC_PARAM_BLOCK_SIZE 155 202 | #define PIDX_MAC_PARAM_CIPHER PIDX_ALG_PARAM_CIPHER 203 | #define PIDX_MAC_PARAM_CUSTOM 156 204 | #define PIDX_MAC_PARAM_C_ROUNDS 157 205 | #define PIDX_MAC_PARAM_DIGEST PIDX_ALG_PARAM_DIGEST 206 | #define PIDX_MAC_PARAM_DIGEST_NOINIT 158 207 | #define PIDX_MAC_PARAM_DIGEST_ONESHOT 159 208 | #define PIDX_MAC_PARAM_D_ROUNDS 160 209 | #define PIDX_MAC_PARAM_IV 46 210 | #define PIDX_MAC_PARAM_KEY 120 211 | #define PIDX_MAC_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES 212 | #define PIDX_MAC_PARAM_SALT 127 213 | #define PIDX_MAC_PARAM_SIZE 74 214 | #define PIDX_MAC_PARAM_TLS_DATA_SIZE 161 215 | #define PIDX_MAC_PARAM_XOF 76 216 | #define PIDX_OBJECT_PARAM_DATA 111 217 | #define PIDX_OBJECT_PARAM_DATA_STRUCTURE 162 218 | #define PIDX_OBJECT_PARAM_DATA_TYPE 163 219 | #define PIDX_OBJECT_PARAM_DESC 164 220 | #define PIDX_OBJECT_PARAM_REFERENCE 165 221 | #define PIDX_OBJECT_PARAM_TYPE 134 222 | #define PIDX_PASSPHRASE_PARAM_INFO 115 223 | #define PIDX_PKEY_PARAM_BITS 166 224 | #define PIDX_PKEY_PARAM_CIPHER PIDX_ALG_PARAM_CIPHER 225 | #define PIDX_PKEY_PARAM_DEFAULT_DIGEST 167 226 | #define PIDX_PKEY_PARAM_DHKEM_IKM 168 227 | #define PIDX_PKEY_PARAM_DH_GENERATOR 169 228 | #define PIDX_PKEY_PARAM_DH_PRIV_LEN 170 229 | #define PIDX_PKEY_PARAM_DIGEST PIDX_ALG_PARAM_DIGEST 230 | #define PIDX_PKEY_PARAM_DIGEST_SIZE 171 231 | #define PIDX_PKEY_PARAM_DIST_ID 172 232 | #define PIDX_PKEY_PARAM_EC_A 173 233 | #define PIDX_PKEY_PARAM_EC_B 174 234 | #define PIDX_PKEY_PARAM_EC_CHAR2_M 175 235 | #define PIDX_PKEY_PARAM_EC_CHAR2_PP_K1 176 236 | #define PIDX_PKEY_PARAM_EC_CHAR2_PP_K2 177 237 | #define PIDX_PKEY_PARAM_EC_CHAR2_PP_K3 178 238 | #define PIDX_PKEY_PARAM_EC_CHAR2_TP_BASIS 179 239 | #define PIDX_PKEY_PARAM_EC_CHAR2_TYPE 180 240 | #define PIDX_PKEY_PARAM_EC_COFACTOR 181 241 | #define PIDX_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS 182 242 | #define PIDX_PKEY_PARAM_EC_ENCODING 183 243 | #define PIDX_PKEY_PARAM_EC_FIELD_TYPE 184 244 | #define PIDX_PKEY_PARAM_EC_GENERATOR 185 245 | #define PIDX_PKEY_PARAM_EC_GROUP_CHECK_TYPE 186 246 | #define PIDX_PKEY_PARAM_EC_INCLUDE_PUBLIC 187 247 | #define PIDX_PKEY_PARAM_EC_ORDER 188 248 | #define PIDX_PKEY_PARAM_EC_P 130 249 | #define PIDX_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT 189 250 | #define PIDX_PKEY_PARAM_EC_PUB_X 190 251 | #define PIDX_PKEY_PARAM_EC_PUB_Y 191 252 | #define PIDX_PKEY_PARAM_EC_SEED 132 253 | #define PIDX_PKEY_PARAM_ENCODED_PUBLIC_KEY 192 254 | #define PIDX_PKEY_PARAM_ENGINE PIDX_ALG_PARAM_ENGINE 255 | #define PIDX_PKEY_PARAM_FFC_COFACTOR 193 256 | #define PIDX_PKEY_PARAM_FFC_DIGEST PIDX_PKEY_PARAM_DIGEST 257 | #define PIDX_PKEY_PARAM_FFC_DIGEST_PROPS PIDX_PKEY_PARAM_PROPERTIES 258 | #define PIDX_PKEY_PARAM_FFC_G 194 259 | #define PIDX_PKEY_PARAM_FFC_GINDEX 195 260 | #define PIDX_PKEY_PARAM_FFC_H 196 261 | #define PIDX_PKEY_PARAM_FFC_P 130 262 | #define PIDX_PKEY_PARAM_FFC_PBITS 197 263 | #define PIDX_PKEY_PARAM_FFC_PCOUNTER 198 264 | #define PIDX_PKEY_PARAM_FFC_Q 199 265 | #define PIDX_PKEY_PARAM_FFC_QBITS 200 266 | #define PIDX_PKEY_PARAM_FFC_SEED 132 267 | #define PIDX_PKEY_PARAM_FFC_TYPE 134 268 | #define PIDX_PKEY_PARAM_FFC_VALIDATE_G 201 269 | #define PIDX_PKEY_PARAM_FFC_VALIDATE_LEGACY 202 270 | #define PIDX_PKEY_PARAM_FFC_VALIDATE_PQ 203 271 | #define PIDX_PKEY_PARAM_GROUP_NAME 204 272 | #define PIDX_PKEY_PARAM_IMPLICIT_REJECTION 5 273 | #define PIDX_PKEY_PARAM_MANDATORY_DIGEST 205 274 | #define PIDX_PKEY_PARAM_MASKGENFUNC 206 275 | #define PIDX_PKEY_PARAM_MAX_SIZE 207 276 | #define PIDX_PKEY_PARAM_MGF1_DIGEST 208 277 | #define PIDX_PKEY_PARAM_MGF1_PROPERTIES 209 278 | #define PIDX_PKEY_PARAM_PAD_MODE 210 279 | #define PIDX_PKEY_PARAM_PRIV_KEY 211 280 | #define PIDX_PKEY_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES 281 | #define PIDX_PKEY_PARAM_PUB_KEY 212 282 | #define PIDX_PKEY_PARAM_RSA_BITS PIDX_PKEY_PARAM_BITS 283 | #define PIDX_PKEY_PARAM_RSA_COEFFICIENT 213 284 | #define PIDX_PKEY_PARAM_RSA_COEFFICIENT1 214 285 | #define PIDX_PKEY_PARAM_RSA_COEFFICIENT2 215 286 | #define PIDX_PKEY_PARAM_RSA_COEFFICIENT3 216 287 | #define PIDX_PKEY_PARAM_RSA_COEFFICIENT4 217 288 | #define PIDX_PKEY_PARAM_RSA_COEFFICIENT5 218 289 | #define PIDX_PKEY_PARAM_RSA_COEFFICIENT6 219 290 | #define PIDX_PKEY_PARAM_RSA_COEFFICIENT7 220 291 | #define PIDX_PKEY_PARAM_RSA_COEFFICIENT8 221 292 | #define PIDX_PKEY_PARAM_RSA_COEFFICIENT9 222 293 | #define PIDX_PKEY_PARAM_RSA_D 223 294 | #define PIDX_PKEY_PARAM_RSA_DERIVE_FROM_PQ 224 295 | #define PIDX_PKEY_PARAM_RSA_DIGEST PIDX_PKEY_PARAM_DIGEST 296 | #define PIDX_PKEY_PARAM_RSA_DIGEST_PROPS PIDX_PKEY_PARAM_PROPERTIES 297 | #define PIDX_PKEY_PARAM_RSA_E 225 298 | #define PIDX_PKEY_PARAM_RSA_EXPONENT 226 299 | #define PIDX_PKEY_PARAM_RSA_EXPONENT1 227 300 | #define PIDX_PKEY_PARAM_RSA_EXPONENT10 228 301 | #define PIDX_PKEY_PARAM_RSA_EXPONENT2 229 302 | #define PIDX_PKEY_PARAM_RSA_EXPONENT3 230 303 | #define PIDX_PKEY_PARAM_RSA_EXPONENT4 231 304 | #define PIDX_PKEY_PARAM_RSA_EXPONENT5 232 305 | #define PIDX_PKEY_PARAM_RSA_EXPONENT6 233 306 | #define PIDX_PKEY_PARAM_RSA_EXPONENT7 234 307 | #define PIDX_PKEY_PARAM_RSA_EXPONENT8 235 308 | #define PIDX_PKEY_PARAM_RSA_EXPONENT9 236 309 | #define PIDX_PKEY_PARAM_RSA_FACTOR 237 310 | #define PIDX_PKEY_PARAM_RSA_FACTOR1 238 311 | #define PIDX_PKEY_PARAM_RSA_FACTOR10 239 312 | #define PIDX_PKEY_PARAM_RSA_FACTOR2 240 313 | #define PIDX_PKEY_PARAM_RSA_FACTOR3 241 314 | #define PIDX_PKEY_PARAM_RSA_FACTOR4 242 315 | #define PIDX_PKEY_PARAM_RSA_FACTOR5 243 316 | #define PIDX_PKEY_PARAM_RSA_FACTOR6 244 317 | #define PIDX_PKEY_PARAM_RSA_FACTOR7 245 318 | #define PIDX_PKEY_PARAM_RSA_FACTOR8 246 319 | #define PIDX_PKEY_PARAM_RSA_FACTOR9 247 320 | #define PIDX_PKEY_PARAM_RSA_MASKGENFUNC PIDX_PKEY_PARAM_MASKGENFUNC 321 | #define PIDX_PKEY_PARAM_RSA_MGF1_DIGEST PIDX_PKEY_PARAM_MGF1_DIGEST 322 | #define PIDX_PKEY_PARAM_RSA_N 129 323 | #define PIDX_PKEY_PARAM_RSA_PRIMES 248 324 | #define PIDX_PKEY_PARAM_RSA_PSS_SALTLEN 249 325 | #define PIDX_PKEY_PARAM_RSA_TEST_P1 250 326 | #define PIDX_PKEY_PARAM_RSA_TEST_P2 251 327 | #define PIDX_PKEY_PARAM_RSA_TEST_Q1 252 328 | #define PIDX_PKEY_PARAM_RSA_TEST_Q2 253 329 | #define PIDX_PKEY_PARAM_RSA_TEST_XP 254 330 | #define PIDX_PKEY_PARAM_RSA_TEST_XP1 255 331 | #define PIDX_PKEY_PARAM_RSA_TEST_XP2 256 332 | #define PIDX_PKEY_PARAM_RSA_TEST_XQ 257 333 | #define PIDX_PKEY_PARAM_RSA_TEST_XQ1 258 334 | #define PIDX_PKEY_PARAM_RSA_TEST_XQ2 259 335 | #define PIDX_PKEY_PARAM_SECURITY_BITS 260 336 | #define PIDX_PKEY_PARAM_USE_COFACTOR_ECDH PIDX_PKEY_PARAM_USE_COFACTOR_FLAG 337 | #define PIDX_PKEY_PARAM_USE_COFACTOR_FLAG 261 338 | #define PIDX_PROV_PARAM_BUILDINFO 262 339 | #define PIDX_PROV_PARAM_CORE_MODULE_FILENAME 263 340 | #define PIDX_PROV_PARAM_CORE_PROV_NAME 264 341 | #define PIDX_PROV_PARAM_CORE_VERSION 265 342 | #define PIDX_PROV_PARAM_DRBG_TRUNC_DIGEST 266 343 | #define PIDX_PROV_PARAM_NAME 267 344 | #define PIDX_PROV_PARAM_SECURITY_CHECKS 268 345 | #define PIDX_PROV_PARAM_SELF_TEST_DESC 269 346 | #define PIDX_PROV_PARAM_SELF_TEST_PHASE 270 347 | #define PIDX_PROV_PARAM_SELF_TEST_TYPE 271 348 | #define PIDX_PROV_PARAM_STATUS 272 349 | #define PIDX_PROV_PARAM_TLS1_PRF_EMS_CHECK 273 350 | #define PIDX_PROV_PARAM_VERSION 108 351 | #define PIDX_RAND_PARAM_GENERATE 274 352 | #define PIDX_RAND_PARAM_MAX_REQUEST 275 353 | #define PIDX_RAND_PARAM_STATE 276 354 | #define PIDX_RAND_PARAM_STRENGTH 277 355 | #define PIDX_RAND_PARAM_TEST_ENTROPY 278 356 | #define PIDX_RAND_PARAM_TEST_NONCE 279 357 | #define PIDX_SIGNATURE_PARAM_ALGORITHM_ID 280 358 | #define PIDX_SIGNATURE_PARAM_CONTEXT_STRING 281 359 | #define PIDX_SIGNATURE_PARAM_DIGEST PIDX_PKEY_PARAM_DIGEST 360 | #define PIDX_SIGNATURE_PARAM_DIGEST_SIZE PIDX_PKEY_PARAM_DIGEST_SIZE 361 | #define PIDX_SIGNATURE_PARAM_INSTANCE 282 362 | #define PIDX_SIGNATURE_PARAM_KAT 283 363 | #define PIDX_SIGNATURE_PARAM_MGF1_DIGEST PIDX_PKEY_PARAM_MGF1_DIGEST 364 | #define PIDX_SIGNATURE_PARAM_MGF1_PROPERTIES PIDX_PKEY_PARAM_MGF1_PROPERTIES 365 | #define PIDX_SIGNATURE_PARAM_NONCE_TYPE 284 366 | #define PIDX_SIGNATURE_PARAM_PAD_MODE PIDX_PKEY_PARAM_PAD_MODE 367 | #define PIDX_SIGNATURE_PARAM_PROPERTIES PIDX_PKEY_PARAM_PROPERTIES 368 | #define PIDX_SIGNATURE_PARAM_PSS_SALTLEN 249 369 | #define PIDX_STORE_PARAM_ALIAS 285 370 | #define PIDX_STORE_PARAM_DIGEST 1 371 | #define PIDX_STORE_PARAM_EXPECT 286 372 | #define PIDX_STORE_PARAM_FINGERPRINT 287 373 | #define PIDX_STORE_PARAM_INPUT_TYPE 288 374 | #define PIDX_STORE_PARAM_ISSUER 267 375 | #define PIDX_STORE_PARAM_PROPERTIES 4 376 | #define PIDX_STORE_PARAM_SERIAL 289 377 | #define PIDX_STORE_PARAM_SUBJECT 290 378 | -------------------------------------------------------------------------------- /include/openssl/conf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from include/openssl/conf.h.in 4 | * 5 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | 14 | 15 | #ifndef OPENSSL_CONF_H 16 | # define OPENSSL_CONF_H 17 | # pragma once 18 | 19 | # include 20 | # ifndef OPENSSL_NO_DEPRECATED_3_0 21 | # define HEADER_CONF_H 22 | # endif 23 | 24 | # include 25 | # include 26 | # include 27 | # include 28 | # include 29 | # include 30 | # ifndef OPENSSL_NO_STDIO 31 | # include 32 | # endif 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | typedef struct { 39 | char *section; 40 | char *name; 41 | char *value; 42 | } CONF_VALUE; 43 | 44 | SKM_DEFINE_STACK_OF_INTERNAL(CONF_VALUE, CONF_VALUE, CONF_VALUE) 45 | #define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk)) 46 | #define sk_CONF_VALUE_value(sk, idx) ((CONF_VALUE *)OPENSSL_sk_value(ossl_check_const_CONF_VALUE_sk_type(sk), (idx))) 47 | #define sk_CONF_VALUE_new(cmp) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new(ossl_check_CONF_VALUE_compfunc_type(cmp))) 48 | #define sk_CONF_VALUE_new_null() ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_null()) 49 | #define sk_CONF_VALUE_new_reserve(cmp, n) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_CONF_VALUE_compfunc_type(cmp), (n))) 50 | #define sk_CONF_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CONF_VALUE_sk_type(sk), (n)) 51 | #define sk_CONF_VALUE_free(sk) OPENSSL_sk_free(ossl_check_CONF_VALUE_sk_type(sk)) 52 | #define sk_CONF_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_CONF_VALUE_sk_type(sk)) 53 | #define sk_CONF_VALUE_delete(sk, i) ((CONF_VALUE *)OPENSSL_sk_delete(ossl_check_CONF_VALUE_sk_type(sk), (i))) 54 | #define sk_CONF_VALUE_delete_ptr(sk, ptr) ((CONF_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))) 55 | #define sk_CONF_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr)) 56 | #define sk_CONF_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr)) 57 | #define sk_CONF_VALUE_pop(sk) ((CONF_VALUE *)OPENSSL_sk_pop(ossl_check_CONF_VALUE_sk_type(sk))) 58 | #define sk_CONF_VALUE_shift(sk) ((CONF_VALUE *)OPENSSL_sk_shift(ossl_check_CONF_VALUE_sk_type(sk))) 59 | #define sk_CONF_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CONF_VALUE_sk_type(sk),ossl_check_CONF_VALUE_freefunc_type(freefunc)) 60 | #define sk_CONF_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), (idx)) 61 | #define sk_CONF_VALUE_set(sk, idx, ptr) ((CONF_VALUE *)OPENSSL_sk_set(ossl_check_CONF_VALUE_sk_type(sk), (idx), ossl_check_CONF_VALUE_type(ptr))) 62 | #define sk_CONF_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr)) 63 | #define sk_CONF_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr)) 64 | #define sk_CONF_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), pnum) 65 | #define sk_CONF_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_CONF_VALUE_sk_type(sk)) 66 | #define sk_CONF_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CONF_VALUE_sk_type(sk)) 67 | #define sk_CONF_VALUE_dup(sk) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_dup(ossl_check_const_CONF_VALUE_sk_type(sk))) 68 | #define sk_CONF_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_copyfunc_type(copyfunc), ossl_check_CONF_VALUE_freefunc_type(freefunc))) 69 | #define sk_CONF_VALUE_set_cmp_func(sk, cmp) ((sk_CONF_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_compfunc_type(cmp))) 70 | DEFINE_LHASH_OF_INTERNAL(CONF_VALUE); 71 | #define lh_CONF_VALUE_new(hfn, cmp) ((LHASH_OF(CONF_VALUE) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_CONF_VALUE_lh_hashfunc_type(hfn), ossl_check_CONF_VALUE_lh_compfunc_type(cmp)), lh_CONF_VALUE_hash_thunk, lh_CONF_VALUE_comp_thunk, lh_CONF_VALUE_doall_thunk, lh_CONF_VALUE_doall_arg_thunk)) 72 | #define lh_CONF_VALUE_free(lh) OPENSSL_LH_free(ossl_check_CONF_VALUE_lh_type(lh)) 73 | #define lh_CONF_VALUE_flush(lh) OPENSSL_LH_flush(ossl_check_CONF_VALUE_lh_type(lh)) 74 | #define lh_CONF_VALUE_insert(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_insert(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_plain_type(ptr))) 75 | #define lh_CONF_VALUE_delete(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_delete(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr))) 76 | #define lh_CONF_VALUE_retrieve(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_retrieve(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr))) 77 | #define lh_CONF_VALUE_error(lh) OPENSSL_LH_error(ossl_check_CONF_VALUE_lh_type(lh)) 78 | #define lh_CONF_VALUE_num_items(lh) OPENSSL_LH_num_items(ossl_check_CONF_VALUE_lh_type(lh)) 79 | #define lh_CONF_VALUE_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out) 80 | #define lh_CONF_VALUE_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out) 81 | #define lh_CONF_VALUE_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out) 82 | #define lh_CONF_VALUE_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_CONF_VALUE_lh_type(lh)) 83 | #define lh_CONF_VALUE_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_CONF_VALUE_lh_type(lh), dl) 84 | #define lh_CONF_VALUE_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_doallfunc_type(dfn)) 85 | 86 | 87 | struct conf_st; 88 | struct conf_method_st; 89 | typedef struct conf_method_st CONF_METHOD; 90 | 91 | # ifndef OPENSSL_NO_DEPRECATED_3_0 92 | # include 93 | # endif 94 | 95 | /* Module definitions */ 96 | typedef struct conf_imodule_st CONF_IMODULE; 97 | typedef struct conf_module_st CONF_MODULE; 98 | 99 | STACK_OF(CONF_MODULE); 100 | STACK_OF(CONF_IMODULE); 101 | 102 | /* DSO module function typedefs */ 103 | typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf); 104 | typedef void conf_finish_func (CONF_IMODULE *md); 105 | 106 | # define CONF_MFLAGS_IGNORE_ERRORS 0x1 107 | # define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2 108 | # define CONF_MFLAGS_SILENT 0x4 109 | # define CONF_MFLAGS_NO_DSO 0x8 110 | # define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10 111 | # define CONF_MFLAGS_DEFAULT_SECTION 0x20 112 | 113 | int CONF_set_default_method(CONF_METHOD *meth); 114 | void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash); 115 | LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, 116 | long *eline); 117 | # ifndef OPENSSL_NO_STDIO 118 | LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, 119 | long *eline); 120 | # endif 121 | LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, 122 | long *eline); 123 | STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf, 124 | const char *section); 125 | char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group, 126 | const char *name); 127 | long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group, 128 | const char *name); 129 | void CONF_free(LHASH_OF(CONF_VALUE) *conf); 130 | #ifndef OPENSSL_NO_STDIO 131 | int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out); 132 | #endif 133 | int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out); 134 | #ifndef OPENSSL_NO_DEPRECATED_1_1_0 135 | OSSL_DEPRECATEDIN_1_1_0 void OPENSSL_config(const char *config_name); 136 | #endif 137 | 138 | #ifndef OPENSSL_NO_DEPRECATED_1_1_0 139 | # define OPENSSL_no_config() \ 140 | OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL) 141 | #endif 142 | 143 | /* 144 | * New conf code. The semantics are different from the functions above. If 145 | * that wasn't the case, the above functions would have been replaced 146 | */ 147 | 148 | CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth); 149 | OSSL_LIB_CTX *NCONF_get0_libctx(const CONF *conf); 150 | CONF *NCONF_new(CONF_METHOD *meth); 151 | CONF_METHOD *NCONF_default(void); 152 | #ifndef OPENSSL_NO_DEPRECATED_3_0 153 | OSSL_DEPRECATEDIN_3_0 CONF_METHOD *NCONF_WIN32(void); 154 | #endif 155 | void NCONF_free(CONF *conf); 156 | void NCONF_free_data(CONF *conf); 157 | 158 | int NCONF_load(CONF *conf, const char *file, long *eline); 159 | # ifndef OPENSSL_NO_STDIO 160 | int NCONF_load_fp(CONF *conf, FILE *fp, long *eline); 161 | # endif 162 | int NCONF_load_bio(CONF *conf, BIO *bp, long *eline); 163 | STACK_OF(OPENSSL_CSTRING) *NCONF_get_section_names(const CONF *conf); 164 | STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf, 165 | const char *section); 166 | char *NCONF_get_string(const CONF *conf, const char *group, const char *name); 167 | int NCONF_get_number_e(const CONF *conf, const char *group, const char *name, 168 | long *result); 169 | #ifndef OPENSSL_NO_STDIO 170 | int NCONF_dump_fp(const CONF *conf, FILE *out); 171 | #endif 172 | int NCONF_dump_bio(const CONF *conf, BIO *out); 173 | 174 | #define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r) 175 | 176 | /* Module functions */ 177 | 178 | int CONF_modules_load(const CONF *cnf, const char *appname, 179 | unsigned long flags); 180 | int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename, 181 | const char *appname, unsigned long flags); 182 | int CONF_modules_load_file(const char *filename, const char *appname, 183 | unsigned long flags); 184 | void CONF_modules_unload(int all); 185 | void CONF_modules_finish(void); 186 | #ifndef OPENSSL_NO_DEPRECATED_1_1_0 187 | # define CONF_modules_free() while(0) continue 188 | #endif 189 | int CONF_module_add(const char *name, conf_init_func *ifunc, 190 | conf_finish_func *ffunc); 191 | 192 | const char *CONF_imodule_get_name(const CONF_IMODULE *md); 193 | const char *CONF_imodule_get_value(const CONF_IMODULE *md); 194 | void *CONF_imodule_get_usr_data(const CONF_IMODULE *md); 195 | void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data); 196 | CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md); 197 | unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md); 198 | void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags); 199 | void *CONF_module_get_usr_data(CONF_MODULE *pmod); 200 | void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data); 201 | 202 | char *CONF_get1_default_config_file(void); 203 | 204 | int CONF_parse_list(const char *list, int sep, int nospc, 205 | int (*list_cb) (const char *elem, int len, void *usr), 206 | void *arg); 207 | 208 | void OPENSSL_load_builtin_modules(void); 209 | 210 | 211 | # ifdef __cplusplus 212 | } 213 | # endif 214 | #endif 215 | -------------------------------------------------------------------------------- /include/openssl/configuration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by configdata.pm from Configurations/common0.tmpl, Configurations/unix-Makefile.tmpl 4 | * via Makefile.in 5 | * 6 | * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. 7 | * 8 | * Licensed under the Apache License 2.0 (the "License"). You may not use 9 | * this file except in compliance with the License. You can obtain a copy 10 | * in the file LICENSE in the source distribution or at 11 | * https://www.openssl.org/source/license.html 12 | */ 13 | 14 | #ifndef OPENSSL_CONFIGURATION_H 15 | # define OPENSSL_CONFIGURATION_H 16 | # pragma once 17 | 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | # ifdef OPENSSL_ALGORITHM_DEFINES 23 | # error OPENSSL_ALGORITHM_DEFINES no longer supported 24 | # endif 25 | 26 | /* 27 | * OpenSSL was configured with the following options: 28 | */ 29 | 30 | # define OPENSSL_CONFIGURED_API 30300 31 | # ifndef OPENSSL_RAND_SEED_OS 32 | # define OPENSSL_RAND_SEED_OS 33 | # endif 34 | # ifndef OPENSSL_THREADS 35 | # define OPENSSL_THREADS 36 | # endif 37 | # ifndef OPENSSL_NO_ACVP_TESTS 38 | # define OPENSSL_NO_ACVP_TESTS 39 | # endif 40 | # ifndef OPENSSL_NO_ASAN 41 | # define OPENSSL_NO_ASAN 42 | # endif 43 | # ifndef OPENSSL_NO_BROTLI 44 | # define OPENSSL_NO_BROTLI 45 | # endif 46 | # ifndef OPENSSL_NO_BROTLI_DYNAMIC 47 | # define OPENSSL_NO_BROTLI_DYNAMIC 48 | # endif 49 | # ifndef OPENSSL_NO_CRYPTO_MDEBUG 50 | # define OPENSSL_NO_CRYPTO_MDEBUG 51 | # endif 52 | # ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE 53 | # define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE 54 | # endif 55 | # ifndef OPENSSL_NO_DEVCRYPTOENG 56 | # define OPENSSL_NO_DEVCRYPTOENG 57 | # endif 58 | # ifdef OPENSSL_NO_EC_NISTP_64_GCC_128 59 | # undef OPENSSL_NO_EC_NISTP_64_GCC_128 60 | # endif 61 | # ifndef OPENSSL_NO_EGD 62 | # define OPENSSL_NO_EGD 63 | # endif 64 | # ifndef OPENSSL_NO_EXTERNAL_TESTS 65 | # define OPENSSL_NO_EXTERNAL_TESTS 66 | # endif 67 | # ifndef OPENSSL_NO_FIPS_SECURITYCHECKS 68 | # define OPENSSL_NO_FIPS_SECURITYCHECKS 69 | # endif 70 | # ifndef OPENSSL_NO_FUZZ_AFL 71 | # define OPENSSL_NO_FUZZ_AFL 72 | # endif 73 | # ifndef OPENSSL_NO_FUZZ_LIBFUZZER 74 | # define OPENSSL_NO_FUZZ_LIBFUZZER 75 | # endif 76 | # ifndef OPENSSL_NO_KTLS 77 | # define OPENSSL_NO_KTLS 78 | # endif 79 | # ifndef OPENSSL_NO_MD2 80 | # define OPENSSL_NO_MD2 81 | # endif 82 | # ifndef OPENSSL_NO_MSAN 83 | # define OPENSSL_NO_MSAN 84 | # endif 85 | # ifndef OPENSSL_NO_RC5 86 | # define OPENSSL_NO_RC5 87 | # endif 88 | # ifndef OPENSSL_NO_SCTP 89 | # define OPENSSL_NO_SCTP 90 | # endif 91 | # ifndef OPENSSL_NO_SSL3 92 | # define OPENSSL_NO_SSL3 93 | # endif 94 | # ifndef OPENSSL_NO_SSL3_METHOD 95 | # define OPENSSL_NO_SSL3_METHOD 96 | # endif 97 | # ifndef OPENSSL_NO_TFO 98 | # define OPENSSL_NO_TFO 99 | # endif 100 | # ifndef OPENSSL_NO_TRACE 101 | # define OPENSSL_NO_TRACE 102 | # endif 103 | # ifndef OPENSSL_NO_UBSAN 104 | # define OPENSSL_NO_UBSAN 105 | # endif 106 | # ifndef OPENSSL_NO_UNIT_TEST 107 | # define OPENSSL_NO_UNIT_TEST 108 | # endif 109 | # ifndef OPENSSL_NO_UPLINK 110 | # define OPENSSL_NO_UPLINK 111 | # endif 112 | # ifndef OPENSSL_NO_WEAK_SSL_CIPHERS 113 | # define OPENSSL_NO_WEAK_SSL_CIPHERS 114 | # endif 115 | # ifndef OPENSSL_NO_WINSTORE 116 | # define OPENSSL_NO_WINSTORE 117 | # endif 118 | # ifndef OPENSSL_NO_ZLIB 119 | # define OPENSSL_NO_ZLIB 120 | # endif 121 | # ifndef OPENSSL_NO_ZLIB_DYNAMIC 122 | # define OPENSSL_NO_ZLIB_DYNAMIC 123 | # endif 124 | # ifndef OPENSSL_NO_ZSTD 125 | # define OPENSSL_NO_ZSTD 126 | # endif 127 | # ifndef OPENSSL_NO_ZSTD_DYNAMIC 128 | # define OPENSSL_NO_ZSTD_DYNAMIC 129 | # endif 130 | # ifndef OPENSSL_NO_STATIC_ENGINE 131 | # define OPENSSL_NO_STATIC_ENGINE 132 | # endif 133 | 134 | 135 | /* Generate 80386 code? */ 136 | # undef I386_ONLY 137 | 138 | /* 139 | * The following are cipher-specific, but are part of the public API. 140 | */ 141 | # if !defined(OPENSSL_SYS_UEFI) 142 | # undef BN_LLONG 143 | /* Only one for the following should be defined */ 144 | # define SIXTY_FOUR_BIT_LONG 145 | # undef SIXTY_FOUR_BIT 146 | # undef THIRTY_TWO_BIT 147 | # endif 148 | 149 | # define RC4_INT unsigned int 150 | 151 | # if defined(OPENSSL_NO_COMP) || (defined(OPENSSL_NO_BROTLI) && defined(OPENSSL_NO_ZSTD) && defined(OPENSSL_NO_ZLIB)) 152 | # define OPENSSL_NO_COMP_ALG 153 | # else 154 | # undef OPENSSL_NO_COMP_ALG 155 | # endif 156 | 157 | # ifdef __cplusplus 158 | } 159 | # endif 160 | 161 | #endif /* OPENSSL_CONFIGURATION_H */ 162 | -------------------------------------------------------------------------------- /include/openssl/crmf.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * WARNING: do not edit! 3 | * Generated by Makefile from include/openssl/crmf.h.in 4 | * 5 | * Copyright 2007-2023 The OpenSSL Project Authors. All Rights Reserved. 6 | * Copyright Nokia 2007-2019 7 | * Copyright Siemens AG 2015-2019 8 | * 9 | * Licensed under the Apache License 2.0 (the "License"). You may not use 10 | * this file except in compliance with the License. You can obtain a copy 11 | * in the file LICENSE in the source distribution or at 12 | * https://www.openssl.org/source/license.html 13 | * 14 | * CRMF (RFC 4211) implementation by M. Peylo, M. Viljanen, and D. von Oheimb. 15 | */ 16 | 17 | 18 | 19 | #ifndef OPENSSL_CRMF_H 20 | # define OPENSSL_CRMF_H 21 | 22 | # include 23 | 24 | # ifndef OPENSSL_NO_CRMF 25 | # include 26 | # include 27 | # include 28 | # include /* for GENERAL_NAME etc. */ 29 | 30 | /* explicit #includes not strictly needed since implied by the above: */ 31 | # include 32 | # include 33 | 34 | # ifdef __cplusplus 35 | extern "C" { 36 | # endif 37 | 38 | # define OSSL_CRMF_POPOPRIVKEY_THISMESSAGE 0 39 | # define OSSL_CRMF_POPOPRIVKEY_SUBSEQUENTMESSAGE 1 40 | # define OSSL_CRMF_POPOPRIVKEY_DHMAC 2 41 | # define OSSL_CRMF_POPOPRIVKEY_AGREEMAC 3 42 | # define OSSL_CRMF_POPOPRIVKEY_ENCRYPTEDKEY 4 43 | 44 | # define OSSL_CRMF_SUBSEQUENTMESSAGE_ENCRCERT 0 45 | # define OSSL_CRMF_SUBSEQUENTMESSAGE_CHALLENGERESP 1 46 | typedef struct ossl_crmf_encryptedvalue_st OSSL_CRMF_ENCRYPTEDVALUE; 47 | 48 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDVALUE) 49 | typedef struct ossl_crmf_msg_st OSSL_CRMF_MSG; 50 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSG) 51 | DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_MSG) 52 | SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_MSG, OSSL_CRMF_MSG, OSSL_CRMF_MSG) 53 | #define sk_OSSL_CRMF_MSG_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk)) 54 | #define sk_OSSL_CRMF_MSG_value(sk, idx) ((OSSL_CRMF_MSG *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk), (idx))) 55 | #define sk_OSSL_CRMF_MSG_new(cmp) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new(ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp))) 56 | #define sk_OSSL_CRMF_MSG_new_null() ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new_null()) 57 | #define sk_OSSL_CRMF_MSG_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp), (n))) 58 | #define sk_OSSL_CRMF_MSG_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CRMF_MSG_sk_type(sk), (n)) 59 | #define sk_OSSL_CRMF_MSG_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CRMF_MSG_sk_type(sk)) 60 | #define sk_OSSL_CRMF_MSG_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CRMF_MSG_sk_type(sk)) 61 | #define sk_OSSL_CRMF_MSG_delete(sk, i) ((OSSL_CRMF_MSG *)OPENSSL_sk_delete(ossl_check_OSSL_CRMF_MSG_sk_type(sk), (i))) 62 | #define sk_OSSL_CRMF_MSG_delete_ptr(sk, ptr) ((OSSL_CRMF_MSG *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr))) 63 | #define sk_OSSL_CRMF_MSG_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr)) 64 | #define sk_OSSL_CRMF_MSG_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr)) 65 | #define sk_OSSL_CRMF_MSG_pop(sk) ((OSSL_CRMF_MSG *)OPENSSL_sk_pop(ossl_check_OSSL_CRMF_MSG_sk_type(sk))) 66 | #define sk_OSSL_CRMF_MSG_shift(sk) ((OSSL_CRMF_MSG *)OPENSSL_sk_shift(ossl_check_OSSL_CRMF_MSG_sk_type(sk))) 67 | #define sk_OSSL_CRMF_MSG_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_MSG_sk_type(sk),ossl_check_OSSL_CRMF_MSG_freefunc_type(freefunc)) 68 | #define sk_OSSL_CRMF_MSG_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr), (idx)) 69 | #define sk_OSSL_CRMF_MSG_set(sk, idx, ptr) ((OSSL_CRMF_MSG *)OPENSSL_sk_set(ossl_check_OSSL_CRMF_MSG_sk_type(sk), (idx), ossl_check_OSSL_CRMF_MSG_type(ptr))) 70 | #define sk_OSSL_CRMF_MSG_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr)) 71 | #define sk_OSSL_CRMF_MSG_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr)) 72 | #define sk_OSSL_CRMF_MSG_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr), pnum) 73 | #define sk_OSSL_CRMF_MSG_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CRMF_MSG_sk_type(sk)) 74 | #define sk_OSSL_CRMF_MSG_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk)) 75 | #define sk_OSSL_CRMF_MSG_dup(sk) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk))) 76 | #define sk_OSSL_CRMF_MSG_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_copyfunc_type(copyfunc), ossl_check_OSSL_CRMF_MSG_freefunc_type(freefunc))) 77 | #define sk_OSSL_CRMF_MSG_set_cmp_func(sk, cmp) ((sk_OSSL_CRMF_MSG_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp))) 78 | 79 | typedef struct ossl_crmf_attributetypeandvalue_st OSSL_CRMF_ATTRIBUTETYPEANDVALUE; 80 | typedef struct ossl_crmf_pbmparameter_st OSSL_CRMF_PBMPARAMETER; 81 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PBMPARAMETER) 82 | typedef struct ossl_crmf_poposigningkey_st OSSL_CRMF_POPOSIGNINGKEY; 83 | typedef struct ossl_crmf_certrequest_st OSSL_CRMF_CERTREQUEST; 84 | typedef struct ossl_crmf_certid_st OSSL_CRMF_CERTID; 85 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTID) 86 | DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_CERTID) 87 | SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_CERTID, OSSL_CRMF_CERTID, OSSL_CRMF_CERTID) 88 | #define sk_OSSL_CRMF_CERTID_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk)) 89 | #define sk_OSSL_CRMF_CERTID_value(sk, idx) ((OSSL_CRMF_CERTID *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk), (idx))) 90 | #define sk_OSSL_CRMF_CERTID_new(cmp) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new(ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp))) 91 | #define sk_OSSL_CRMF_CERTID_new_null() ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new_null()) 92 | #define sk_OSSL_CRMF_CERTID_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp), (n))) 93 | #define sk_OSSL_CRMF_CERTID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), (n)) 94 | #define sk_OSSL_CRMF_CERTID_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CRMF_CERTID_sk_type(sk)) 95 | #define sk_OSSL_CRMF_CERTID_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CRMF_CERTID_sk_type(sk)) 96 | #define sk_OSSL_CRMF_CERTID_delete(sk, i) ((OSSL_CRMF_CERTID *)OPENSSL_sk_delete(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), (i))) 97 | #define sk_OSSL_CRMF_CERTID_delete_ptr(sk, ptr) ((OSSL_CRMF_CERTID *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr))) 98 | #define sk_OSSL_CRMF_CERTID_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr)) 99 | #define sk_OSSL_CRMF_CERTID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr)) 100 | #define sk_OSSL_CRMF_CERTID_pop(sk) ((OSSL_CRMF_CERTID *)OPENSSL_sk_pop(ossl_check_OSSL_CRMF_CERTID_sk_type(sk))) 101 | #define sk_OSSL_CRMF_CERTID_shift(sk) ((OSSL_CRMF_CERTID *)OPENSSL_sk_shift(ossl_check_OSSL_CRMF_CERTID_sk_type(sk))) 102 | #define sk_OSSL_CRMF_CERTID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_CERTID_sk_type(sk),ossl_check_OSSL_CRMF_CERTID_freefunc_type(freefunc)) 103 | #define sk_OSSL_CRMF_CERTID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr), (idx)) 104 | #define sk_OSSL_CRMF_CERTID_set(sk, idx, ptr) ((OSSL_CRMF_CERTID *)OPENSSL_sk_set(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), (idx), ossl_check_OSSL_CRMF_CERTID_type(ptr))) 105 | #define sk_OSSL_CRMF_CERTID_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr)) 106 | #define sk_OSSL_CRMF_CERTID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr)) 107 | #define sk_OSSL_CRMF_CERTID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr), pnum) 108 | #define sk_OSSL_CRMF_CERTID_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CRMF_CERTID_sk_type(sk)) 109 | #define sk_OSSL_CRMF_CERTID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk)) 110 | #define sk_OSSL_CRMF_CERTID_dup(sk) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk))) 111 | #define sk_OSSL_CRMF_CERTID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_copyfunc_type(copyfunc), ossl_check_OSSL_CRMF_CERTID_freefunc_type(freefunc))) 112 | #define sk_OSSL_CRMF_CERTID_set_cmp_func(sk, cmp) ((sk_OSSL_CRMF_CERTID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp))) 113 | 114 | 115 | typedef struct ossl_crmf_pkipublicationinfo_st OSSL_CRMF_PKIPUBLICATIONINFO; 116 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PKIPUBLICATIONINFO) 117 | typedef struct ossl_crmf_singlepubinfo_st OSSL_CRMF_SINGLEPUBINFO; 118 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_SINGLEPUBINFO) 119 | typedef struct ossl_crmf_certtemplate_st OSSL_CRMF_CERTTEMPLATE; 120 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTTEMPLATE) 121 | typedef STACK_OF(OSSL_CRMF_MSG) OSSL_CRMF_MSGS; 122 | DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSGS) 123 | 124 | typedef struct ossl_crmf_optionalvalidity_st OSSL_CRMF_OPTIONALVALIDITY; 125 | 126 | /* crmf_pbm.c */ 127 | OSSL_CRMF_PBMPARAMETER *OSSL_CRMF_pbmp_new(OSSL_LIB_CTX *libctx, size_t slen, 128 | int owfnid, size_t itercnt, 129 | int macnid); 130 | int OSSL_CRMF_pbm_new(OSSL_LIB_CTX *libctx, const char *propq, 131 | const OSSL_CRMF_PBMPARAMETER *pbmp, 132 | const unsigned char *msg, size_t msglen, 133 | const unsigned char *sec, size_t seclen, 134 | unsigned char **mac, size_t *maclen); 135 | 136 | /* crmf_lib.c */ 137 | int OSSL_CRMF_MSG_set1_regCtrl_regToken(OSSL_CRMF_MSG *msg, 138 | const ASN1_UTF8STRING *tok); 139 | ASN1_UTF8STRING 140 | *OSSL_CRMF_MSG_get0_regCtrl_regToken(const OSSL_CRMF_MSG *msg); 141 | int OSSL_CRMF_MSG_set1_regCtrl_authenticator(OSSL_CRMF_MSG *msg, 142 | const ASN1_UTF8STRING *auth); 143 | ASN1_UTF8STRING 144 | *OSSL_CRMF_MSG_get0_regCtrl_authenticator(const OSSL_CRMF_MSG *msg); 145 | int 146 | OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo(OSSL_CRMF_PKIPUBLICATIONINFO *pi, 147 | OSSL_CRMF_SINGLEPUBINFO *spi); 148 | # define OSSL_CRMF_PUB_METHOD_DONTCARE 0 149 | # define OSSL_CRMF_PUB_METHOD_X500 1 150 | # define OSSL_CRMF_PUB_METHOD_WEB 2 151 | # define OSSL_CRMF_PUB_METHOD_LDAP 3 152 | int OSSL_CRMF_MSG_set0_SinglePubInfo(OSSL_CRMF_SINGLEPUBINFO *spi, 153 | int method, GENERAL_NAME *nm); 154 | # define OSSL_CRMF_PUB_ACTION_DONTPUBLISH 0 155 | # define OSSL_CRMF_PUB_ACTION_PLEASEPUBLISH 1 156 | int OSSL_CRMF_MSG_set_PKIPublicationInfo_action(OSSL_CRMF_PKIPUBLICATIONINFO *pi, 157 | int action); 158 | int OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo(OSSL_CRMF_MSG *msg, 159 | const OSSL_CRMF_PKIPUBLICATIONINFO *pi); 160 | OSSL_CRMF_PKIPUBLICATIONINFO 161 | *OSSL_CRMF_MSG_get0_regCtrl_pkiPublicationInfo(const OSSL_CRMF_MSG *msg); 162 | int OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey(OSSL_CRMF_MSG *msg, 163 | const X509_PUBKEY *pubkey); 164 | X509_PUBKEY 165 | *OSSL_CRMF_MSG_get0_regCtrl_protocolEncrKey(const OSSL_CRMF_MSG *msg); 166 | int OSSL_CRMF_MSG_set1_regCtrl_oldCertID(OSSL_CRMF_MSG *msg, 167 | const OSSL_CRMF_CERTID *cid); 168 | OSSL_CRMF_CERTID 169 | *OSSL_CRMF_MSG_get0_regCtrl_oldCertID(const OSSL_CRMF_MSG *msg); 170 | OSSL_CRMF_CERTID *OSSL_CRMF_CERTID_gen(const X509_NAME *issuer, 171 | const ASN1_INTEGER *serial); 172 | 173 | int OSSL_CRMF_MSG_set1_regInfo_utf8Pairs(OSSL_CRMF_MSG *msg, 174 | const ASN1_UTF8STRING *utf8pairs); 175 | ASN1_UTF8STRING 176 | *OSSL_CRMF_MSG_get0_regInfo_utf8Pairs(const OSSL_CRMF_MSG *msg); 177 | int OSSL_CRMF_MSG_set1_regInfo_certReq(OSSL_CRMF_MSG *msg, 178 | const OSSL_CRMF_CERTREQUEST *cr); 179 | OSSL_CRMF_CERTREQUEST 180 | *OSSL_CRMF_MSG_get0_regInfo_certReq(const OSSL_CRMF_MSG *msg); 181 | 182 | int OSSL_CRMF_MSG_set0_validity(OSSL_CRMF_MSG *crm, 183 | ASN1_TIME *notBefore, ASN1_TIME *notAfter); 184 | int OSSL_CRMF_MSG_set_certReqId(OSSL_CRMF_MSG *crm, int rid); 185 | int OSSL_CRMF_MSG_get_certReqId(const OSSL_CRMF_MSG *crm); 186 | int OSSL_CRMF_MSG_set0_extensions(OSSL_CRMF_MSG *crm, X509_EXTENSIONS *exts); 187 | 188 | int OSSL_CRMF_MSG_push0_extension(OSSL_CRMF_MSG *crm, X509_EXTENSION *ext); 189 | # define OSSL_CRMF_POPO_NONE -1 190 | # define OSSL_CRMF_POPO_RAVERIFIED 0 191 | # define OSSL_CRMF_POPO_SIGNATURE 1 192 | # define OSSL_CRMF_POPO_KEYENC 2 193 | # define OSSL_CRMF_POPO_KEYAGREE 3 194 | int OSSL_CRMF_MSG_create_popo(int meth, OSSL_CRMF_MSG *crm, 195 | EVP_PKEY *pkey, const EVP_MD *digest, 196 | OSSL_LIB_CTX *libctx, const char *propq); 197 | int OSSL_CRMF_MSGS_verify_popo(const OSSL_CRMF_MSGS *reqs, 198 | int rid, int acceptRAVerified, 199 | OSSL_LIB_CTX *libctx, const char *propq); 200 | OSSL_CRMF_CERTTEMPLATE *OSSL_CRMF_MSG_get0_tmpl(const OSSL_CRMF_MSG *crm); 201 | X509_PUBKEY 202 | *OSSL_CRMF_CERTTEMPLATE_get0_publicKey(const OSSL_CRMF_CERTTEMPLATE *tmpl); 203 | const X509_NAME 204 | *OSSL_CRMF_CERTTEMPLATE_get0_subject(const OSSL_CRMF_CERTTEMPLATE *tmpl); 205 | const X509_NAME 206 | *OSSL_CRMF_CERTTEMPLATE_get0_issuer(const OSSL_CRMF_CERTTEMPLATE *tmpl); 207 | const ASN1_INTEGER 208 | *OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(const OSSL_CRMF_CERTTEMPLATE *tmpl); 209 | X509_EXTENSIONS 210 | *OSSL_CRMF_CERTTEMPLATE_get0_extensions(const OSSL_CRMF_CERTTEMPLATE *tmpl); 211 | const X509_NAME 212 | *OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid); 213 | const ASN1_INTEGER 214 | *OSSL_CRMF_CERTID_get0_serialNumber(const OSSL_CRMF_CERTID *cid); 215 | int OSSL_CRMF_CERTTEMPLATE_fill(OSSL_CRMF_CERTTEMPLATE *tmpl, 216 | EVP_PKEY *pubkey, 217 | const X509_NAME *subject, 218 | const X509_NAME *issuer, 219 | const ASN1_INTEGER *serial); 220 | X509 221 | *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert, 222 | OSSL_LIB_CTX *libctx, const char *propq, 223 | EVP_PKEY *pkey); 224 | 225 | # ifdef __cplusplus 226 | } 227 | # endif 228 | # endif /* !defined(OPENSSL_NO_CRMF) */ 229 | #endif /* !defined(OPENSSL_CRMF_H) */ 230 | -------------------------------------------------------------------------------- /include/openssl/ess.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from include/openssl/ess.h.in 4 | * 5 | * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | 14 | 15 | #ifndef OPENSSL_ESS_H 16 | # define OPENSSL_ESS_H 17 | # pragma once 18 | 19 | # include 20 | 21 | # include 22 | # include 23 | # include 24 | 25 | # ifdef __cplusplus 26 | extern "C" { 27 | # endif 28 | 29 | 30 | typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL; 31 | typedef struct ESS_cert_id ESS_CERT_ID; 32 | typedef struct ESS_signing_cert ESS_SIGNING_CERT; 33 | 34 | SKM_DEFINE_STACK_OF_INTERNAL(ESS_CERT_ID, ESS_CERT_ID, ESS_CERT_ID) 35 | #define sk_ESS_CERT_ID_num(sk) OPENSSL_sk_num(ossl_check_const_ESS_CERT_ID_sk_type(sk)) 36 | #define sk_ESS_CERT_ID_value(sk, idx) ((ESS_CERT_ID *)OPENSSL_sk_value(ossl_check_const_ESS_CERT_ID_sk_type(sk), (idx))) 37 | #define sk_ESS_CERT_ID_new(cmp) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_new(ossl_check_ESS_CERT_ID_compfunc_type(cmp))) 38 | #define sk_ESS_CERT_ID_new_null() ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_new_null()) 39 | #define sk_ESS_CERT_ID_new_reserve(cmp, n) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_new_reserve(ossl_check_ESS_CERT_ID_compfunc_type(cmp), (n))) 40 | #define sk_ESS_CERT_ID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ESS_CERT_ID_sk_type(sk), (n)) 41 | #define sk_ESS_CERT_ID_free(sk) OPENSSL_sk_free(ossl_check_ESS_CERT_ID_sk_type(sk)) 42 | #define sk_ESS_CERT_ID_zero(sk) OPENSSL_sk_zero(ossl_check_ESS_CERT_ID_sk_type(sk)) 43 | #define sk_ESS_CERT_ID_delete(sk, i) ((ESS_CERT_ID *)OPENSSL_sk_delete(ossl_check_ESS_CERT_ID_sk_type(sk), (i))) 44 | #define sk_ESS_CERT_ID_delete_ptr(sk, ptr) ((ESS_CERT_ID *)OPENSSL_sk_delete_ptr(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr))) 45 | #define sk_ESS_CERT_ID_push(sk, ptr) OPENSSL_sk_push(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr)) 46 | #define sk_ESS_CERT_ID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr)) 47 | #define sk_ESS_CERT_ID_pop(sk) ((ESS_CERT_ID *)OPENSSL_sk_pop(ossl_check_ESS_CERT_ID_sk_type(sk))) 48 | #define sk_ESS_CERT_ID_shift(sk) ((ESS_CERT_ID *)OPENSSL_sk_shift(ossl_check_ESS_CERT_ID_sk_type(sk))) 49 | #define sk_ESS_CERT_ID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ESS_CERT_ID_sk_type(sk),ossl_check_ESS_CERT_ID_freefunc_type(freefunc)) 50 | #define sk_ESS_CERT_ID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr), (idx)) 51 | #define sk_ESS_CERT_ID_set(sk, idx, ptr) ((ESS_CERT_ID *)OPENSSL_sk_set(ossl_check_ESS_CERT_ID_sk_type(sk), (idx), ossl_check_ESS_CERT_ID_type(ptr))) 52 | #define sk_ESS_CERT_ID_find(sk, ptr) OPENSSL_sk_find(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr)) 53 | #define sk_ESS_CERT_ID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr)) 54 | #define sk_ESS_CERT_ID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr), pnum) 55 | #define sk_ESS_CERT_ID_sort(sk) OPENSSL_sk_sort(ossl_check_ESS_CERT_ID_sk_type(sk)) 56 | #define sk_ESS_CERT_ID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ESS_CERT_ID_sk_type(sk)) 57 | #define sk_ESS_CERT_ID_dup(sk) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_dup(ossl_check_const_ESS_CERT_ID_sk_type(sk))) 58 | #define sk_ESS_CERT_ID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_deep_copy(ossl_check_const_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_copyfunc_type(copyfunc), ossl_check_ESS_CERT_ID_freefunc_type(freefunc))) 59 | #define sk_ESS_CERT_ID_set_cmp_func(sk, cmp) ((sk_ESS_CERT_ID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_compfunc_type(cmp))) 60 | 61 | 62 | 63 | typedef struct ESS_signing_cert_v2_st ESS_SIGNING_CERT_V2; 64 | typedef struct ESS_cert_id_v2_st ESS_CERT_ID_V2; 65 | 66 | SKM_DEFINE_STACK_OF_INTERNAL(ESS_CERT_ID_V2, ESS_CERT_ID_V2, ESS_CERT_ID_V2) 67 | #define sk_ESS_CERT_ID_V2_num(sk) OPENSSL_sk_num(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk)) 68 | #define sk_ESS_CERT_ID_V2_value(sk, idx) ((ESS_CERT_ID_V2 *)OPENSSL_sk_value(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk), (idx))) 69 | #define sk_ESS_CERT_ID_V2_new(cmp) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_new(ossl_check_ESS_CERT_ID_V2_compfunc_type(cmp))) 70 | #define sk_ESS_CERT_ID_V2_new_null() ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_new_null()) 71 | #define sk_ESS_CERT_ID_V2_new_reserve(cmp, n) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_new_reserve(ossl_check_ESS_CERT_ID_V2_compfunc_type(cmp), (n))) 72 | #define sk_ESS_CERT_ID_V2_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ESS_CERT_ID_V2_sk_type(sk), (n)) 73 | #define sk_ESS_CERT_ID_V2_free(sk) OPENSSL_sk_free(ossl_check_ESS_CERT_ID_V2_sk_type(sk)) 74 | #define sk_ESS_CERT_ID_V2_zero(sk) OPENSSL_sk_zero(ossl_check_ESS_CERT_ID_V2_sk_type(sk)) 75 | #define sk_ESS_CERT_ID_V2_delete(sk, i) ((ESS_CERT_ID_V2 *)OPENSSL_sk_delete(ossl_check_ESS_CERT_ID_V2_sk_type(sk), (i))) 76 | #define sk_ESS_CERT_ID_V2_delete_ptr(sk, ptr) ((ESS_CERT_ID_V2 *)OPENSSL_sk_delete_ptr(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr))) 77 | #define sk_ESS_CERT_ID_V2_push(sk, ptr) OPENSSL_sk_push(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr)) 78 | #define sk_ESS_CERT_ID_V2_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr)) 79 | #define sk_ESS_CERT_ID_V2_pop(sk) ((ESS_CERT_ID_V2 *)OPENSSL_sk_pop(ossl_check_ESS_CERT_ID_V2_sk_type(sk))) 80 | #define sk_ESS_CERT_ID_V2_shift(sk) ((ESS_CERT_ID_V2 *)OPENSSL_sk_shift(ossl_check_ESS_CERT_ID_V2_sk_type(sk))) 81 | #define sk_ESS_CERT_ID_V2_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ESS_CERT_ID_V2_sk_type(sk),ossl_check_ESS_CERT_ID_V2_freefunc_type(freefunc)) 82 | #define sk_ESS_CERT_ID_V2_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr), (idx)) 83 | #define sk_ESS_CERT_ID_V2_set(sk, idx, ptr) ((ESS_CERT_ID_V2 *)OPENSSL_sk_set(ossl_check_ESS_CERT_ID_V2_sk_type(sk), (idx), ossl_check_ESS_CERT_ID_V2_type(ptr))) 84 | #define sk_ESS_CERT_ID_V2_find(sk, ptr) OPENSSL_sk_find(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr)) 85 | #define sk_ESS_CERT_ID_V2_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr)) 86 | #define sk_ESS_CERT_ID_V2_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr), pnum) 87 | #define sk_ESS_CERT_ID_V2_sort(sk) OPENSSL_sk_sort(ossl_check_ESS_CERT_ID_V2_sk_type(sk)) 88 | #define sk_ESS_CERT_ID_V2_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk)) 89 | #define sk_ESS_CERT_ID_V2_dup(sk) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_dup(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk))) 90 | #define sk_ESS_CERT_ID_V2_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_deep_copy(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_copyfunc_type(copyfunc), ossl_check_ESS_CERT_ID_V2_freefunc_type(freefunc))) 91 | #define sk_ESS_CERT_ID_V2_set_cmp_func(sk, cmp) ((sk_ESS_CERT_ID_V2_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_compfunc_type(cmp))) 92 | 93 | 94 | DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_ISSUER_SERIAL) 95 | DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_ISSUER_SERIAL, ESS_ISSUER_SERIAL) 96 | DECLARE_ASN1_DUP_FUNCTION(ESS_ISSUER_SERIAL) 97 | 98 | DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_CERT_ID) 99 | DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_CERT_ID, ESS_CERT_ID) 100 | DECLARE_ASN1_DUP_FUNCTION(ESS_CERT_ID) 101 | 102 | DECLARE_ASN1_FUNCTIONS(ESS_SIGNING_CERT) 103 | DECLARE_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT) 104 | 105 | DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_CERT_ID_V2) 106 | DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_CERT_ID_V2, ESS_CERT_ID_V2) 107 | DECLARE_ASN1_DUP_FUNCTION(ESS_CERT_ID_V2) 108 | 109 | DECLARE_ASN1_FUNCTIONS(ESS_SIGNING_CERT_V2) 110 | DECLARE_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT_V2) 111 | 112 | ESS_SIGNING_CERT *OSSL_ESS_signing_cert_new_init(const X509 *signcert, 113 | const STACK_OF(X509) *certs, 114 | int set_issuer_serial); 115 | ESS_SIGNING_CERT_V2 *OSSL_ESS_signing_cert_v2_new_init(const EVP_MD *hash_alg, 116 | const X509 *signcert, 117 | const 118 | STACK_OF(X509) *certs, 119 | int set_issuer_serial); 120 | int OSSL_ESS_check_signing_certs(const ESS_SIGNING_CERT *ss, 121 | const ESS_SIGNING_CERT_V2 *ssv2, 122 | const STACK_OF(X509) *chain, 123 | int require_signing_cert); 124 | 125 | # ifdef __cplusplus 126 | } 127 | # endif 128 | #endif 129 | -------------------------------------------------------------------------------- /include/openssl/fipskey.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from include/openssl/fipskey.h.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #ifndef OPENSSL_FIPSKEY_H 14 | # define OPENSSL_FIPSKEY_H 15 | # pragma once 16 | 17 | # ifdef __cplusplus 18 | extern "C" { 19 | # endif 20 | 21 | /* 22 | * The FIPS validation HMAC key, usable as an array initializer. 23 | */ 24 | #define FIPS_KEY_ELEMENTS \ 25 | 0xf4, 0x55, 0x66, 0x50, 0xac, 0x31, 0xd3, 0x54, 0x61, 0x61, 0x0b, 0xac, 0x4e, 0xd8, 0x1b, 0x1a, 0x18, 0x1b, 0x2d, 0x8a, 0x43, 0xea, 0x28, 0x54, 0xcb, 0xae, 0x22, 0xca, 0x74, 0x56, 0x08, 0x13 26 | 27 | /* 28 | * The FIPS validation key, as a string. 29 | */ 30 | #define FIPS_KEY_STRING "f4556650ac31d35461610bac4ed81b1a181b2d8a43ea2854cbae22ca74560813" 31 | 32 | # ifdef __cplusplus 33 | } 34 | # endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from include/openssl/opensslv.h.in 4 | * 5 | * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #ifndef OPENSSL_OPENSSLV_H 14 | # define OPENSSL_OPENSSLV_H 15 | # pragma once 16 | 17 | # ifdef __cplusplus 18 | extern "C" { 19 | # endif 20 | 21 | /* 22 | * SECTION 1: VERSION DATA. These will change for each release 23 | */ 24 | 25 | /* 26 | * Base version macros 27 | * 28 | * These macros express version number MAJOR.MINOR.PATCH exactly 29 | */ 30 | # define OPENSSL_VERSION_MAJOR 3 31 | # define OPENSSL_VERSION_MINOR 3 32 | # define OPENSSL_VERSION_PATCH 0 33 | 34 | /* 35 | * Additional version information 36 | * 37 | * These are also part of the new version scheme, but aren't part 38 | * of the version number itself. 39 | */ 40 | 41 | /* Could be: #define OPENSSL_VERSION_PRE_RELEASE "-alpha.1" */ 42 | # define OPENSSL_VERSION_PRE_RELEASE "" 43 | /* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+fips" */ 44 | /* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+vendor.1" */ 45 | # define OPENSSL_VERSION_BUILD_METADATA "" 46 | 47 | /* 48 | * Note: The OpenSSL Project will never define OPENSSL_VERSION_BUILD_METADATA 49 | * to be anything but the empty string. Its use is entirely reserved for 50 | * others 51 | */ 52 | 53 | /* 54 | * Shared library version 55 | * 56 | * This is strictly to express ABI version, which may or may not 57 | * be related to the API version expressed with the macros above. 58 | * This is defined in free form. 59 | */ 60 | # define OPENSSL_SHLIB_VERSION 3 61 | 62 | /* 63 | * SECTION 2: USEFUL MACROS 64 | */ 65 | 66 | /* For checking general API compatibility when preprocessing */ 67 | # define OPENSSL_VERSION_PREREQ(maj,min) \ 68 | ((OPENSSL_VERSION_MAJOR << 16) + OPENSSL_VERSION_MINOR >= ((maj) << 16) + (min)) 69 | 70 | /* 71 | * Macros to get the version in easily digested string form, both the short 72 | * "MAJOR.MINOR.PATCH" variant (where MAJOR, MINOR and PATCH are replaced 73 | * with the values from the corresponding OPENSSL_VERSION_ macros) and the 74 | * longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and 75 | * OPENSSL_VERSION_BUILD_METADATA_STR appended. 76 | */ 77 | # define OPENSSL_VERSION_STR "3.3.0" 78 | # define OPENSSL_FULL_VERSION_STR "3.3.0" 79 | 80 | /* 81 | * SECTION 3: ADDITIONAL METADATA 82 | * 83 | * These strings are defined separately to allow them to be parsable. 84 | */ 85 | # define OPENSSL_RELEASE_DATE "9 Apr 2024" 86 | 87 | /* 88 | * SECTION 4: BACKWARD COMPATIBILITY 89 | */ 90 | 91 | # define OPENSSL_VERSION_TEXT "OpenSSL 3.3.0 9 Apr 2024" 92 | 93 | /* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */ 94 | # ifdef OPENSSL_VERSION_PRE_RELEASE 95 | # define _OPENSSL_VERSION_PRE_RELEASE 0x0L 96 | # else 97 | # define _OPENSSL_VERSION_PRE_RELEASE 0xfL 98 | # endif 99 | # define OPENSSL_VERSION_NUMBER \ 100 | ( (OPENSSL_VERSION_MAJOR<<28) \ 101 | |(OPENSSL_VERSION_MINOR<<20) \ 102 | |(OPENSSL_VERSION_PATCH<<4) \ 103 | |_OPENSSL_VERSION_PRE_RELEASE ) 104 | 105 | # ifdef __cplusplus 106 | } 107 | # endif 108 | 109 | # include 110 | # ifndef OPENSSL_NO_DEPRECATED_3_0 111 | # define HEADER_OPENSSLV_H 112 | # endif 113 | 114 | #endif /* OPENSSL_OPENSSLV_H */ 115 | -------------------------------------------------------------------------------- /include/openssl/srp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from include/openssl/srp.h.in 4 | * 5 | * Copyright 2004-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * Copyright (c) 2004, EdelKey Project. All Rights Reserved. 7 | * 8 | * Licensed under the Apache License 2.0 (the "License"). You may not use 9 | * this file except in compliance with the License. You can obtain a copy 10 | * in the file LICENSE in the source distribution or at 11 | * https://www.openssl.org/source/license.html 12 | * 13 | * Originally written by Christophe Renou and Peter Sylvester, 14 | * for the EdelKey project. 15 | */ 16 | 17 | 18 | 19 | #ifndef OPENSSL_SRP_H 20 | # define OPENSSL_SRP_H 21 | # pragma once 22 | 23 | # include 24 | # ifndef OPENSSL_NO_DEPRECATED_3_0 25 | # define HEADER_SRP_H 26 | # endif 27 | 28 | #include 29 | 30 | #ifndef OPENSSL_NO_SRP 31 | # include 32 | # include 33 | # include 34 | # include 35 | # include 36 | 37 | # ifdef __cplusplus 38 | extern "C" { 39 | # endif 40 | 41 | # ifndef OPENSSL_NO_DEPRECATED_3_0 42 | 43 | typedef struct SRP_gN_cache_st { 44 | char *b64_bn; 45 | BIGNUM *bn; 46 | } SRP_gN_cache; 47 | SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN_cache, SRP_gN_cache, SRP_gN_cache) 48 | #define sk_SRP_gN_cache_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_gN_cache_sk_type(sk)) 49 | #define sk_SRP_gN_cache_value(sk, idx) ((SRP_gN_cache *)OPENSSL_sk_value(ossl_check_const_SRP_gN_cache_sk_type(sk), (idx))) 50 | #define sk_SRP_gN_cache_new(cmp) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new(ossl_check_SRP_gN_cache_compfunc_type(cmp))) 51 | #define sk_SRP_gN_cache_new_null() ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new_null()) 52 | #define sk_SRP_gN_cache_new_reserve(cmp, n) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new_reserve(ossl_check_SRP_gN_cache_compfunc_type(cmp), (n))) 53 | #define sk_SRP_gN_cache_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_gN_cache_sk_type(sk), (n)) 54 | #define sk_SRP_gN_cache_free(sk) OPENSSL_sk_free(ossl_check_SRP_gN_cache_sk_type(sk)) 55 | #define sk_SRP_gN_cache_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_gN_cache_sk_type(sk)) 56 | #define sk_SRP_gN_cache_delete(sk, i) ((SRP_gN_cache *)OPENSSL_sk_delete(ossl_check_SRP_gN_cache_sk_type(sk), (i))) 57 | #define sk_SRP_gN_cache_delete_ptr(sk, ptr) ((SRP_gN_cache *)OPENSSL_sk_delete_ptr(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr))) 58 | #define sk_SRP_gN_cache_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr)) 59 | #define sk_SRP_gN_cache_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr)) 60 | #define sk_SRP_gN_cache_pop(sk) ((SRP_gN_cache *)OPENSSL_sk_pop(ossl_check_SRP_gN_cache_sk_type(sk))) 61 | #define sk_SRP_gN_cache_shift(sk) ((SRP_gN_cache *)OPENSSL_sk_shift(ossl_check_SRP_gN_cache_sk_type(sk))) 62 | #define sk_SRP_gN_cache_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_gN_cache_sk_type(sk),ossl_check_SRP_gN_cache_freefunc_type(freefunc)) 63 | #define sk_SRP_gN_cache_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr), (idx)) 64 | #define sk_SRP_gN_cache_set(sk, idx, ptr) ((SRP_gN_cache *)OPENSSL_sk_set(ossl_check_SRP_gN_cache_sk_type(sk), (idx), ossl_check_SRP_gN_cache_type(ptr))) 65 | #define sk_SRP_gN_cache_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr)) 66 | #define sk_SRP_gN_cache_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr)) 67 | #define sk_SRP_gN_cache_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr), pnum) 68 | #define sk_SRP_gN_cache_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_gN_cache_sk_type(sk)) 69 | #define sk_SRP_gN_cache_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_gN_cache_sk_type(sk)) 70 | #define sk_SRP_gN_cache_dup(sk) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_dup(ossl_check_const_SRP_gN_cache_sk_type(sk))) 71 | #define sk_SRP_gN_cache_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_copyfunc_type(copyfunc), ossl_check_SRP_gN_cache_freefunc_type(freefunc))) 72 | #define sk_SRP_gN_cache_set_cmp_func(sk, cmp) ((sk_SRP_gN_cache_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_compfunc_type(cmp))) 73 | 74 | 75 | 76 | typedef struct SRP_user_pwd_st { 77 | /* Owned by us. */ 78 | char *id; 79 | BIGNUM *s; 80 | BIGNUM *v; 81 | /* Not owned by us. */ 82 | const BIGNUM *g; 83 | const BIGNUM *N; 84 | /* Owned by us. */ 85 | char *info; 86 | } SRP_user_pwd; 87 | SKM_DEFINE_STACK_OF_INTERNAL(SRP_user_pwd, SRP_user_pwd, SRP_user_pwd) 88 | #define sk_SRP_user_pwd_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_user_pwd_sk_type(sk)) 89 | #define sk_SRP_user_pwd_value(sk, idx) ((SRP_user_pwd *)OPENSSL_sk_value(ossl_check_const_SRP_user_pwd_sk_type(sk), (idx))) 90 | #define sk_SRP_user_pwd_new(cmp) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new(ossl_check_SRP_user_pwd_compfunc_type(cmp))) 91 | #define sk_SRP_user_pwd_new_null() ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new_null()) 92 | #define sk_SRP_user_pwd_new_reserve(cmp, n) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new_reserve(ossl_check_SRP_user_pwd_compfunc_type(cmp), (n))) 93 | #define sk_SRP_user_pwd_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_user_pwd_sk_type(sk), (n)) 94 | #define sk_SRP_user_pwd_free(sk) OPENSSL_sk_free(ossl_check_SRP_user_pwd_sk_type(sk)) 95 | #define sk_SRP_user_pwd_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_user_pwd_sk_type(sk)) 96 | #define sk_SRP_user_pwd_delete(sk, i) ((SRP_user_pwd *)OPENSSL_sk_delete(ossl_check_SRP_user_pwd_sk_type(sk), (i))) 97 | #define sk_SRP_user_pwd_delete_ptr(sk, ptr) ((SRP_user_pwd *)OPENSSL_sk_delete_ptr(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr))) 98 | #define sk_SRP_user_pwd_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr)) 99 | #define sk_SRP_user_pwd_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr)) 100 | #define sk_SRP_user_pwd_pop(sk) ((SRP_user_pwd *)OPENSSL_sk_pop(ossl_check_SRP_user_pwd_sk_type(sk))) 101 | #define sk_SRP_user_pwd_shift(sk) ((SRP_user_pwd *)OPENSSL_sk_shift(ossl_check_SRP_user_pwd_sk_type(sk))) 102 | #define sk_SRP_user_pwd_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_user_pwd_sk_type(sk),ossl_check_SRP_user_pwd_freefunc_type(freefunc)) 103 | #define sk_SRP_user_pwd_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr), (idx)) 104 | #define sk_SRP_user_pwd_set(sk, idx, ptr) ((SRP_user_pwd *)OPENSSL_sk_set(ossl_check_SRP_user_pwd_sk_type(sk), (idx), ossl_check_SRP_user_pwd_type(ptr))) 105 | #define sk_SRP_user_pwd_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr)) 106 | #define sk_SRP_user_pwd_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr)) 107 | #define sk_SRP_user_pwd_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr), pnum) 108 | #define sk_SRP_user_pwd_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_user_pwd_sk_type(sk)) 109 | #define sk_SRP_user_pwd_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_user_pwd_sk_type(sk)) 110 | #define sk_SRP_user_pwd_dup(sk) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_dup(ossl_check_const_SRP_user_pwd_sk_type(sk))) 111 | #define sk_SRP_user_pwd_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_copyfunc_type(copyfunc), ossl_check_SRP_user_pwd_freefunc_type(freefunc))) 112 | #define sk_SRP_user_pwd_set_cmp_func(sk, cmp) ((sk_SRP_user_pwd_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_compfunc_type(cmp))) 113 | 114 | 115 | OSSL_DEPRECATEDIN_3_0 116 | SRP_user_pwd *SRP_user_pwd_new(void); 117 | OSSL_DEPRECATEDIN_3_0 118 | void SRP_user_pwd_free(SRP_user_pwd *user_pwd); 119 | 120 | OSSL_DEPRECATEDIN_3_0 121 | void SRP_user_pwd_set_gN(SRP_user_pwd *user_pwd, const BIGNUM *g, 122 | const BIGNUM *N); 123 | OSSL_DEPRECATEDIN_3_0 124 | int SRP_user_pwd_set1_ids(SRP_user_pwd *user_pwd, const char *id, 125 | const char *info); 126 | OSSL_DEPRECATEDIN_3_0 127 | int SRP_user_pwd_set0_sv(SRP_user_pwd *user_pwd, BIGNUM *s, BIGNUM *v); 128 | 129 | typedef struct SRP_VBASE_st { 130 | STACK_OF(SRP_user_pwd) *users_pwd; 131 | STACK_OF(SRP_gN_cache) *gN_cache; 132 | /* to simulate a user */ 133 | char *seed_key; 134 | const BIGNUM *default_g; 135 | const BIGNUM *default_N; 136 | } SRP_VBASE; 137 | 138 | /* 139 | * Internal structure storing N and g pair 140 | */ 141 | typedef struct SRP_gN_st { 142 | char *id; 143 | const BIGNUM *g; 144 | const BIGNUM *N; 145 | } SRP_gN; 146 | SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN, SRP_gN, SRP_gN) 147 | #define sk_SRP_gN_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_gN_sk_type(sk)) 148 | #define sk_SRP_gN_value(sk, idx) ((SRP_gN *)OPENSSL_sk_value(ossl_check_const_SRP_gN_sk_type(sk), (idx))) 149 | #define sk_SRP_gN_new(cmp) ((STACK_OF(SRP_gN) *)OPENSSL_sk_new(ossl_check_SRP_gN_compfunc_type(cmp))) 150 | #define sk_SRP_gN_new_null() ((STACK_OF(SRP_gN) *)OPENSSL_sk_new_null()) 151 | #define sk_SRP_gN_new_reserve(cmp, n) ((STACK_OF(SRP_gN) *)OPENSSL_sk_new_reserve(ossl_check_SRP_gN_compfunc_type(cmp), (n))) 152 | #define sk_SRP_gN_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_gN_sk_type(sk), (n)) 153 | #define sk_SRP_gN_free(sk) OPENSSL_sk_free(ossl_check_SRP_gN_sk_type(sk)) 154 | #define sk_SRP_gN_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_gN_sk_type(sk)) 155 | #define sk_SRP_gN_delete(sk, i) ((SRP_gN *)OPENSSL_sk_delete(ossl_check_SRP_gN_sk_type(sk), (i))) 156 | #define sk_SRP_gN_delete_ptr(sk, ptr) ((SRP_gN *)OPENSSL_sk_delete_ptr(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr))) 157 | #define sk_SRP_gN_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr)) 158 | #define sk_SRP_gN_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr)) 159 | #define sk_SRP_gN_pop(sk) ((SRP_gN *)OPENSSL_sk_pop(ossl_check_SRP_gN_sk_type(sk))) 160 | #define sk_SRP_gN_shift(sk) ((SRP_gN *)OPENSSL_sk_shift(ossl_check_SRP_gN_sk_type(sk))) 161 | #define sk_SRP_gN_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_gN_sk_type(sk),ossl_check_SRP_gN_freefunc_type(freefunc)) 162 | #define sk_SRP_gN_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr), (idx)) 163 | #define sk_SRP_gN_set(sk, idx, ptr) ((SRP_gN *)OPENSSL_sk_set(ossl_check_SRP_gN_sk_type(sk), (idx), ossl_check_SRP_gN_type(ptr))) 164 | #define sk_SRP_gN_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr)) 165 | #define sk_SRP_gN_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr)) 166 | #define sk_SRP_gN_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr), pnum) 167 | #define sk_SRP_gN_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_gN_sk_type(sk)) 168 | #define sk_SRP_gN_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_gN_sk_type(sk)) 169 | #define sk_SRP_gN_dup(sk) ((STACK_OF(SRP_gN) *)OPENSSL_sk_dup(ossl_check_const_SRP_gN_sk_type(sk))) 170 | #define sk_SRP_gN_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_gN) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_gN_sk_type(sk), ossl_check_SRP_gN_copyfunc_type(copyfunc), ossl_check_SRP_gN_freefunc_type(freefunc))) 171 | #define sk_SRP_gN_set_cmp_func(sk, cmp) ((sk_SRP_gN_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_compfunc_type(cmp))) 172 | 173 | 174 | 175 | OSSL_DEPRECATEDIN_3_0 176 | SRP_VBASE *SRP_VBASE_new(char *seed_key); 177 | OSSL_DEPRECATEDIN_3_0 178 | void SRP_VBASE_free(SRP_VBASE *vb); 179 | OSSL_DEPRECATEDIN_3_0 180 | int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file); 181 | 182 | OSSL_DEPRECATEDIN_3_0 183 | int SRP_VBASE_add0_user(SRP_VBASE *vb, SRP_user_pwd *user_pwd); 184 | 185 | /* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/ 186 | OSSL_DEPRECATEDIN_3_0 187 | SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username); 188 | 189 | OSSL_DEPRECATEDIN_3_0 190 | char *SRP_create_verifier_ex(const char *user, const char *pass, char **salt, 191 | char **verifier, const char *N, const char *g, 192 | OSSL_LIB_CTX *libctx, const char *propq); 193 | OSSL_DEPRECATEDIN_3_0 194 | char *SRP_create_verifier(const char *user, const char *pass, char **salt, 195 | char **verifier, const char *N, const char *g); 196 | OSSL_DEPRECATEDIN_3_0 197 | int SRP_create_verifier_BN_ex(const char *user, const char *pass, BIGNUM **salt, 198 | BIGNUM **verifier, const BIGNUM *N, 199 | const BIGNUM *g, OSSL_LIB_CTX *libctx, 200 | const char *propq); 201 | OSSL_DEPRECATEDIN_3_0 202 | int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt, 203 | BIGNUM **verifier, const BIGNUM *N, 204 | const BIGNUM *g); 205 | 206 | # define SRP_NO_ERROR 0 207 | # define SRP_ERR_VBASE_INCOMPLETE_FILE 1 208 | # define SRP_ERR_VBASE_BN_LIB 2 209 | # define SRP_ERR_OPEN_FILE 3 210 | # define SRP_ERR_MEMORY 4 211 | 212 | # define DB_srptype 0 213 | # define DB_srpverifier 1 214 | # define DB_srpsalt 2 215 | # define DB_srpid 3 216 | # define DB_srpgN 4 217 | # define DB_srpinfo 5 218 | # undef DB_NUMBER 219 | # define DB_NUMBER 6 220 | 221 | # define DB_SRP_INDEX 'I' 222 | # define DB_SRP_VALID 'V' 223 | # define DB_SRP_REVOKED 'R' 224 | # define DB_SRP_MODIF 'v' 225 | 226 | /* see srp.c */ 227 | OSSL_DEPRECATEDIN_3_0 228 | char *SRP_check_known_gN_param(const BIGNUM *g, const BIGNUM *N); 229 | OSSL_DEPRECATEDIN_3_0 230 | SRP_gN *SRP_get_default_gN(const char *id); 231 | 232 | /* server side .... */ 233 | OSSL_DEPRECATEDIN_3_0 234 | BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u, 235 | const BIGNUM *b, const BIGNUM *N); 236 | OSSL_DEPRECATEDIN_3_0 237 | BIGNUM *SRP_Calc_B_ex(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g, 238 | const BIGNUM *v, OSSL_LIB_CTX *libctx, const char *propq); 239 | OSSL_DEPRECATEDIN_3_0 240 | BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g, 241 | const BIGNUM *v); 242 | 243 | OSSL_DEPRECATEDIN_3_0 244 | int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N); 245 | OSSL_DEPRECATEDIN_3_0 246 | BIGNUM *SRP_Calc_u_ex(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N, 247 | OSSL_LIB_CTX *libctx, const char *propq); 248 | OSSL_DEPRECATEDIN_3_0 249 | BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N); 250 | 251 | /* client side .... */ 252 | 253 | OSSL_DEPRECATEDIN_3_0 254 | BIGNUM *SRP_Calc_x_ex(const BIGNUM *s, const char *user, const char *pass, 255 | OSSL_LIB_CTX *libctx, const char *propq); 256 | OSSL_DEPRECATEDIN_3_0 257 | BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass); 258 | OSSL_DEPRECATEDIN_3_0 259 | BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g); 260 | OSSL_DEPRECATEDIN_3_0 261 | BIGNUM *SRP_Calc_client_key_ex(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, 262 | const BIGNUM *x, const BIGNUM *a, const BIGNUM *u, 263 | OSSL_LIB_CTX *libctx, const char *propq); 264 | OSSL_DEPRECATEDIN_3_0 265 | BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, 266 | const BIGNUM *x, const BIGNUM *a, const BIGNUM *u); 267 | OSSL_DEPRECATEDIN_3_0 268 | int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N); 269 | 270 | # define SRP_MINIMAL_N 1024 271 | 272 | # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 273 | 274 | /* This method ignores the configured seed and fails for an unknown user. */ 275 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 276 | OSSL_DEPRECATEDIN_1_1_0 277 | SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username); 278 | # endif 279 | 280 | # ifdef __cplusplus 281 | } 282 | # endif 283 | # endif 284 | 285 | #endif 286 | -------------------------------------------------------------------------------- /include/prov/der_digests.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/include/prov/der_digests.h.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "internal/der.h" 14 | 15 | /* Well known OIDs precompiled */ 16 | 17 | /* 18 | * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } 19 | */ 20 | #define DER_OID_V_sigAlgs DER_P_OBJECT, 8, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03 21 | #define DER_OID_SZ_sigAlgs 10 22 | extern const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs]; 23 | 24 | /* 25 | * id-sha1 OBJECT IDENTIFIER ::= { iso(1) 26 | * identified-organization(3) oiw(14) 27 | * secsig(3) algorithms(2) 26 } 28 | */ 29 | #define DER_OID_V_id_sha1 DER_P_OBJECT, 5, 0x2B, 0x0E, 0x03, 0x02, 0x1A 30 | #define DER_OID_SZ_id_sha1 7 31 | extern const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1]; 32 | 33 | /* 34 | * id-md2 OBJECT IDENTIFIER ::= { 35 | * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } 36 | */ 37 | #define DER_OID_V_id_md2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x02 38 | #define DER_OID_SZ_id_md2 10 39 | extern const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2]; 40 | 41 | /* 42 | * id-md5 OBJECT IDENTIFIER ::= { 43 | * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } 44 | */ 45 | #define DER_OID_V_id_md5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05 46 | #define DER_OID_SZ_id_md5 10 47 | extern const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5]; 48 | 49 | /* 50 | * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } 51 | */ 52 | #define DER_OID_V_id_sha256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01 53 | #define DER_OID_SZ_id_sha256 11 54 | extern const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256]; 55 | 56 | /* 57 | * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } 58 | */ 59 | #define DER_OID_V_id_sha384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02 60 | #define DER_OID_SZ_id_sha384 11 61 | extern const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384]; 62 | 63 | /* 64 | * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } 65 | */ 66 | #define DER_OID_V_id_sha512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03 67 | #define DER_OID_SZ_id_sha512 11 68 | extern const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512]; 69 | 70 | /* 71 | * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } 72 | */ 73 | #define DER_OID_V_id_sha224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04 74 | #define DER_OID_SZ_id_sha224 11 75 | extern const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224]; 76 | 77 | /* 78 | * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } 79 | */ 80 | #define DER_OID_V_id_sha512_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x05 81 | #define DER_OID_SZ_id_sha512_224 11 82 | extern const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224]; 83 | 84 | /* 85 | * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } 86 | */ 87 | #define DER_OID_V_id_sha512_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x06 88 | #define DER_OID_SZ_id_sha512_256 11 89 | extern const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256]; 90 | 91 | /* 92 | * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } 93 | */ 94 | #define DER_OID_V_id_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x07 95 | #define DER_OID_SZ_id_sha3_224 11 96 | extern const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224]; 97 | 98 | /* 99 | * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } 100 | */ 101 | #define DER_OID_V_id_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x08 102 | #define DER_OID_SZ_id_sha3_256 11 103 | extern const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256]; 104 | 105 | /* 106 | * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } 107 | */ 108 | #define DER_OID_V_id_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x09 109 | #define DER_OID_SZ_id_sha3_384 11 110 | extern const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384]; 111 | 112 | /* 113 | * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } 114 | */ 115 | #define DER_OID_V_id_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0A 116 | #define DER_OID_SZ_id_sha3_512 11 117 | extern const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512]; 118 | 119 | /* 120 | * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } 121 | */ 122 | #define DER_OID_V_id_shake128 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0B 123 | #define DER_OID_SZ_id_shake128 11 124 | extern const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128]; 125 | 126 | /* 127 | * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } 128 | */ 129 | #define DER_OID_V_id_shake256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0C 130 | #define DER_OID_SZ_id_shake256 11 131 | extern const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256]; 132 | 133 | /* 134 | * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } 135 | */ 136 | #define DER_OID_V_id_shake128_len DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x11 137 | #define DER_OID_SZ_id_shake128_len 11 138 | extern const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len]; 139 | 140 | /* 141 | * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } 142 | */ 143 | #define DER_OID_V_id_shake256_len DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x12 144 | #define DER_OID_SZ_id_shake256_len 11 145 | extern const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len]; 146 | 147 | /* 148 | * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} 149 | */ 150 | #define DER_OID_V_id_KMACWithSHAKE128 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x13 151 | #define DER_OID_SZ_id_KMACWithSHAKE128 11 152 | extern const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128]; 153 | 154 | /* 155 | * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} 156 | */ 157 | #define DER_OID_V_id_KMACWithSHAKE256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x14 158 | #define DER_OID_SZ_id_KMACWithSHAKE256 11 159 | extern const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256]; 160 | 161 | -------------------------------------------------------------------------------- /include/prov/der_dsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/include/prov/der_dsa.h.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "internal/der.h" 14 | 15 | /* Well known OIDs precompiled */ 16 | 17 | /* 18 | * id-dsa OBJECT IDENTIFIER ::= { 19 | * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } 20 | */ 21 | #define DER_OID_V_id_dsa DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x38, 0x04, 0x01 22 | #define DER_OID_SZ_id_dsa 9 23 | extern const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa]; 24 | 25 | /* 26 | * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { 27 | * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } 28 | */ 29 | #define DER_OID_V_id_dsa_with_sha1 DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x38, 0x04, 0x03 30 | #define DER_OID_SZ_id_dsa_with_sha1 9 31 | extern const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1]; 32 | 33 | /* 34 | * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } 35 | */ 36 | #define DER_OID_V_id_dsa_with_sha224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x01 37 | #define DER_OID_SZ_id_dsa_with_sha224 11 38 | extern const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224]; 39 | 40 | /* 41 | * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } 42 | */ 43 | #define DER_OID_V_id_dsa_with_sha256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x02 44 | #define DER_OID_SZ_id_dsa_with_sha256 11 45 | extern const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256]; 46 | 47 | /* 48 | * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } 49 | */ 50 | #define DER_OID_V_id_dsa_with_sha384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x03 51 | #define DER_OID_SZ_id_dsa_with_sha384 11 52 | extern const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384]; 53 | 54 | /* 55 | * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } 56 | */ 57 | #define DER_OID_V_id_dsa_with_sha512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x04 58 | #define DER_OID_SZ_id_dsa_with_sha512 11 59 | extern const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512]; 60 | 61 | /* 62 | * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } 63 | */ 64 | #define DER_OID_V_id_dsa_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x05 65 | #define DER_OID_SZ_id_dsa_with_sha3_224 11 66 | extern const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224]; 67 | 68 | /* 69 | * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } 70 | */ 71 | #define DER_OID_V_id_dsa_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x06 72 | #define DER_OID_SZ_id_dsa_with_sha3_256 11 73 | extern const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256]; 74 | 75 | /* 76 | * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } 77 | */ 78 | #define DER_OID_V_id_dsa_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x07 79 | #define DER_OID_SZ_id_dsa_with_sha3_384 11 80 | extern const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384]; 81 | 82 | /* 83 | * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } 84 | */ 85 | #define DER_OID_V_id_dsa_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x08 86 | #define DER_OID_SZ_id_dsa_with_sha3_512 11 87 | extern const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512]; 88 | 89 | 90 | /* Subject Public Key Info */ 91 | int ossl_DER_w_algorithmIdentifier_DSA(WPACKET *pkt, int tag, DSA *dsa); 92 | /* Signature */ 93 | int ossl_DER_w_algorithmIdentifier_DSA_with_MD(WPACKET *pkt, int tag, 94 | DSA *dsa, int mdnid); 95 | -------------------------------------------------------------------------------- /include/prov/der_ec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/include/prov/der_ec.h.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "crypto/ec.h" 14 | #include "internal/der.h" 15 | 16 | /* Well known OIDs precompiled */ 17 | 18 | /* 19 | * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } 20 | */ 21 | #define DER_OID_V_ecdsa_with_SHA1 DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x01 22 | #define DER_OID_SZ_ecdsa_with_SHA1 9 23 | extern const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1]; 24 | 25 | /* 26 | * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } 27 | */ 28 | #define DER_OID_V_id_ecPublicKey DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01 29 | #define DER_OID_SZ_id_ecPublicKey 9 30 | extern const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey]; 31 | 32 | /* 33 | * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } 34 | */ 35 | #define DER_OID_V_c2pnb163v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x01 36 | #define DER_OID_SZ_c2pnb163v1 10 37 | extern const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1]; 38 | 39 | /* 40 | * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } 41 | */ 42 | #define DER_OID_V_c2pnb163v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x02 43 | #define DER_OID_SZ_c2pnb163v2 10 44 | extern const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2]; 45 | 46 | /* 47 | * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } 48 | */ 49 | #define DER_OID_V_c2pnb163v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x03 50 | #define DER_OID_SZ_c2pnb163v3 10 51 | extern const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3]; 52 | 53 | /* 54 | * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } 55 | */ 56 | #define DER_OID_V_c2pnb176w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x04 57 | #define DER_OID_SZ_c2pnb176w1 10 58 | extern const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1]; 59 | 60 | /* 61 | * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } 62 | */ 63 | #define DER_OID_V_c2tnb191v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x05 64 | #define DER_OID_SZ_c2tnb191v1 10 65 | extern const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1]; 66 | 67 | /* 68 | * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } 69 | */ 70 | #define DER_OID_V_c2tnb191v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x06 71 | #define DER_OID_SZ_c2tnb191v2 10 72 | extern const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2]; 73 | 74 | /* 75 | * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } 76 | */ 77 | #define DER_OID_V_c2tnb191v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x07 78 | #define DER_OID_SZ_c2tnb191v3 10 79 | extern const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3]; 80 | 81 | /* 82 | * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } 83 | */ 84 | #define DER_OID_V_c2onb191v4 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x08 85 | #define DER_OID_SZ_c2onb191v4 10 86 | extern const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4]; 87 | 88 | /* 89 | * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } 90 | */ 91 | #define DER_OID_V_c2onb191v5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x09 92 | #define DER_OID_SZ_c2onb191v5 10 93 | extern const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5]; 94 | 95 | /* 96 | * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } 97 | */ 98 | #define DER_OID_V_c2pnb208w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0A 99 | #define DER_OID_SZ_c2pnb208w1 10 100 | extern const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1]; 101 | 102 | /* 103 | * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } 104 | */ 105 | #define DER_OID_V_c2tnb239v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0B 106 | #define DER_OID_SZ_c2tnb239v1 10 107 | extern const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1]; 108 | 109 | /* 110 | * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } 111 | */ 112 | #define DER_OID_V_c2tnb239v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0C 113 | #define DER_OID_SZ_c2tnb239v2 10 114 | extern const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2]; 115 | 116 | /* 117 | * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } 118 | */ 119 | #define DER_OID_V_c2tnb239v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0D 120 | #define DER_OID_SZ_c2tnb239v3 10 121 | extern const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3]; 122 | 123 | /* 124 | * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } 125 | */ 126 | #define DER_OID_V_c2onb239v4 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0E 127 | #define DER_OID_SZ_c2onb239v4 10 128 | extern const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4]; 129 | 130 | /* 131 | * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } 132 | */ 133 | #define DER_OID_V_c2onb239v5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0F 134 | #define DER_OID_SZ_c2onb239v5 10 135 | extern const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5]; 136 | 137 | /* 138 | * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } 139 | */ 140 | #define DER_OID_V_c2pnb272w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x10 141 | #define DER_OID_SZ_c2pnb272w1 10 142 | extern const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1]; 143 | 144 | /* 145 | * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } 146 | */ 147 | #define DER_OID_V_c2pnb304w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x11 148 | #define DER_OID_SZ_c2pnb304w1 10 149 | extern const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1]; 150 | 151 | /* 152 | * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } 153 | */ 154 | #define DER_OID_V_c2tnb359v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x12 155 | #define DER_OID_SZ_c2tnb359v1 10 156 | extern const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1]; 157 | 158 | /* 159 | * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } 160 | */ 161 | #define DER_OID_V_c2pnb368w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x13 162 | #define DER_OID_SZ_c2pnb368w1 10 163 | extern const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1]; 164 | 165 | /* 166 | * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } 167 | */ 168 | #define DER_OID_V_c2tnb431r1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x14 169 | #define DER_OID_SZ_c2tnb431r1 10 170 | extern const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1]; 171 | 172 | /* 173 | * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } 174 | */ 175 | #define DER_OID_V_prime192v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x01 176 | #define DER_OID_SZ_prime192v1 10 177 | extern const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1]; 178 | 179 | /* 180 | * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } 181 | */ 182 | #define DER_OID_V_prime192v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x02 183 | #define DER_OID_SZ_prime192v2 10 184 | extern const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2]; 185 | 186 | /* 187 | * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } 188 | */ 189 | #define DER_OID_V_prime192v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x03 190 | #define DER_OID_SZ_prime192v3 10 191 | extern const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3]; 192 | 193 | /* 194 | * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } 195 | */ 196 | #define DER_OID_V_prime239v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x04 197 | #define DER_OID_SZ_prime239v1 10 198 | extern const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1]; 199 | 200 | /* 201 | * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } 202 | */ 203 | #define DER_OID_V_prime239v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x05 204 | #define DER_OID_SZ_prime239v2 10 205 | extern const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2]; 206 | 207 | /* 208 | * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } 209 | */ 210 | #define DER_OID_V_prime239v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x06 211 | #define DER_OID_SZ_prime239v3 10 212 | extern const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3]; 213 | 214 | /* 215 | * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } 216 | */ 217 | #define DER_OID_V_prime256v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07 218 | #define DER_OID_SZ_prime256v1 10 219 | extern const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1]; 220 | 221 | /* 222 | * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) 223 | * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } 224 | */ 225 | #define DER_OID_V_ecdsa_with_SHA224 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x01 226 | #define DER_OID_SZ_ecdsa_with_SHA224 10 227 | extern const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224]; 228 | 229 | /* 230 | * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) 231 | * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } 232 | */ 233 | #define DER_OID_V_ecdsa_with_SHA256 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02 234 | #define DER_OID_SZ_ecdsa_with_SHA256 10 235 | extern const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256]; 236 | 237 | /* 238 | * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) 239 | * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } 240 | */ 241 | #define DER_OID_V_ecdsa_with_SHA384 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x03 242 | #define DER_OID_SZ_ecdsa_with_SHA384 10 243 | extern const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384]; 244 | 245 | /* 246 | * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) 247 | * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } 248 | */ 249 | #define DER_OID_V_ecdsa_with_SHA512 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x04 250 | #define DER_OID_SZ_ecdsa_with_SHA512 10 251 | extern const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512]; 252 | 253 | /* 254 | * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } 255 | */ 256 | #define DER_OID_V_id_ecdsa_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x09 257 | #define DER_OID_SZ_id_ecdsa_with_sha3_224 11 258 | extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224]; 259 | 260 | /* 261 | * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } 262 | */ 263 | #define DER_OID_V_id_ecdsa_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0A 264 | #define DER_OID_SZ_id_ecdsa_with_sha3_256 11 265 | extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256]; 266 | 267 | /* 268 | * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } 269 | */ 270 | #define DER_OID_V_id_ecdsa_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0B 271 | #define DER_OID_SZ_id_ecdsa_with_sha3_384 11 272 | extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384]; 273 | 274 | /* 275 | * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } 276 | */ 277 | #define DER_OID_V_id_ecdsa_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0C 278 | #define DER_OID_SZ_id_ecdsa_with_sha3_512 11 279 | extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512]; 280 | 281 | 282 | /* Subject Public Key Info */ 283 | int ossl_DER_w_algorithmIdentifier_EC(WPACKET *pkt, int cont, EC_KEY *ec); 284 | /* Signature */ 285 | int ossl_DER_w_algorithmIdentifier_ECDSA_with_MD(WPACKET *pkt, int cont, 286 | EC_KEY *ec, int mdnid); 287 | -------------------------------------------------------------------------------- /include/prov/der_ecx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/include/prov/der_ecx.h.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "internal/der.h" 14 | #include "crypto/ecx.h" 15 | 16 | /* Well known OIDs precompiled */ 17 | 18 | /* 19 | * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } 20 | */ 21 | #define DER_OID_V_id_X25519 DER_P_OBJECT, 3, 0x2B, 0x65, 0x6E 22 | #define DER_OID_SZ_id_X25519 5 23 | extern const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519]; 24 | 25 | /* 26 | * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } 27 | */ 28 | #define DER_OID_V_id_X448 DER_P_OBJECT, 3, 0x2B, 0x65, 0x6F 29 | #define DER_OID_SZ_id_X448 5 30 | extern const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448]; 31 | 32 | /* 33 | * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } 34 | */ 35 | #define DER_OID_V_id_Ed25519 DER_P_OBJECT, 3, 0x2B, 0x65, 0x70 36 | #define DER_OID_SZ_id_Ed25519 5 37 | extern const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519]; 38 | 39 | /* 40 | * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } 41 | */ 42 | #define DER_OID_V_id_Ed448 DER_P_OBJECT, 3, 0x2B, 0x65, 0x71 43 | #define DER_OID_SZ_id_Ed448 5 44 | extern const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448]; 45 | 46 | 47 | int ossl_DER_w_algorithmIdentifier_ED25519(WPACKET *pkt, int cont, ECX_KEY *ec); 48 | int ossl_DER_w_algorithmIdentifier_ED448(WPACKET *pkt, int cont, ECX_KEY *ec); 49 | int ossl_DER_w_algorithmIdentifier_X25519(WPACKET *pkt, int cont, ECX_KEY *ec); 50 | int ossl_DER_w_algorithmIdentifier_X448(WPACKET *pkt, int cont, ECX_KEY *ec); 51 | -------------------------------------------------------------------------------- /include/prov/der_rsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/include/prov/der_rsa.h.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "crypto/rsa.h" 14 | #include "internal/der.h" 15 | 16 | /* Well known OIDs precompiled */ 17 | 18 | /* 19 | * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } 20 | */ 21 | #define DER_OID_V_hashAlgs DER_P_OBJECT, 8, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02 22 | #define DER_OID_SZ_hashAlgs 10 23 | extern const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs]; 24 | 25 | /* 26 | * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } 27 | */ 28 | #define DER_OID_V_rsaEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01 29 | #define DER_OID_SZ_rsaEncryption 11 30 | extern const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption]; 31 | 32 | /* 33 | * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } 34 | */ 35 | #define DER_OID_V_id_RSAES_OAEP DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x07 36 | #define DER_OID_SZ_id_RSAES_OAEP 11 37 | extern const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP]; 38 | 39 | /* 40 | * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } 41 | */ 42 | #define DER_OID_V_id_pSpecified DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x09 43 | #define DER_OID_SZ_id_pSpecified 11 44 | extern const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified]; 45 | 46 | /* 47 | * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } 48 | */ 49 | #define DER_OID_V_id_RSASSA_PSS DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0A 50 | #define DER_OID_SZ_id_RSASSA_PSS 11 51 | extern const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS]; 52 | 53 | /* 54 | * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } 55 | */ 56 | #define DER_OID_V_md2WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x02 57 | #define DER_OID_SZ_md2WithRSAEncryption 11 58 | extern const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption]; 59 | 60 | /* 61 | * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } 62 | */ 63 | #define DER_OID_V_md5WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x04 64 | #define DER_OID_SZ_md5WithRSAEncryption 11 65 | extern const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption]; 66 | 67 | /* 68 | * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } 69 | */ 70 | #define DER_OID_V_sha1WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05 71 | #define DER_OID_SZ_sha1WithRSAEncryption 11 72 | extern const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption]; 73 | 74 | /* 75 | * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } 76 | */ 77 | #define DER_OID_V_sha224WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0E 78 | #define DER_OID_SZ_sha224WithRSAEncryption 11 79 | extern const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption]; 80 | 81 | /* 82 | * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } 83 | */ 84 | #define DER_OID_V_sha256WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B 85 | #define DER_OID_SZ_sha256WithRSAEncryption 11 86 | extern const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption]; 87 | 88 | /* 89 | * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } 90 | */ 91 | #define DER_OID_V_sha384WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0C 92 | #define DER_OID_SZ_sha384WithRSAEncryption 11 93 | extern const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption]; 94 | 95 | /* 96 | * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } 97 | */ 98 | #define DER_OID_V_sha512WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0D 99 | #define DER_OID_SZ_sha512WithRSAEncryption 11 100 | extern const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption]; 101 | 102 | /* 103 | * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } 104 | */ 105 | #define DER_OID_V_sha512_224WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0F 106 | #define DER_OID_SZ_sha512_224WithRSAEncryption 11 107 | extern const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption]; 108 | 109 | /* 110 | * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } 111 | */ 112 | #define DER_OID_V_sha512_256WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x10 113 | #define DER_OID_SZ_sha512_256WithRSAEncryption 11 114 | extern const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption]; 115 | 116 | /* 117 | * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } 118 | */ 119 | #define DER_OID_V_id_mgf1 DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x08 120 | #define DER_OID_SZ_id_mgf1 11 121 | extern const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1]; 122 | 123 | /* 124 | * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } 125 | */ 126 | #define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0D 127 | #define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224 11 128 | extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224]; 129 | 130 | /* 131 | * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } 132 | */ 133 | #define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0E 134 | #define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256 11 135 | extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256]; 136 | 137 | /* 138 | * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } 139 | */ 140 | #define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0F 141 | #define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384 11 142 | extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384]; 143 | 144 | /* 145 | * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } 146 | */ 147 | #define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x10 148 | #define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512 11 149 | extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512]; 150 | 151 | /* 152 | * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } 153 | */ 154 | #define DER_OID_V_md4WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x03 155 | #define DER_OID_SZ_md4WithRSAEncryption 11 156 | extern const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption]; 157 | 158 | /* 159 | * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { 160 | * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 161 | * } 162 | */ 163 | #define DER_OID_V_ripemd160WithRSAEncryption DER_P_OBJECT, 6, 0x2B, 0x24, 0x03, 0x03, 0x01, 0x02 164 | #define DER_OID_SZ_ripemd160WithRSAEncryption 8 165 | extern const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption]; 166 | 167 | /* 168 | * mdc2WithRSASignature OBJECT IDENTIFIER ::= { 169 | * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) 170 | * } 171 | */ 172 | #define DER_OID_V_mdc2WithRSASignature DER_P_OBJECT, 5, 0x2B, 0x0E, 0x03, 0x02, 0x0E 173 | #define DER_OID_SZ_mdc2WithRSASignature 7 174 | extern const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature]; 175 | 176 | 177 | /* PSS parameters */ 178 | int ossl_DER_w_RSASSA_PSS_params(WPACKET *pkt, int tag, 179 | const RSA_PSS_PARAMS_30 *pss); 180 | /* Subject Public Key Info */ 181 | int ossl_DER_w_algorithmIdentifier_RSA(WPACKET *pkt, int tag, RSA *rsa); 182 | int ossl_DER_w_algorithmIdentifier_RSA_PSS(WPACKET *pkt, int tag, 183 | int rsa_type, 184 | const RSA_PSS_PARAMS_30 *pss); 185 | /* Signature */ 186 | int ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption(WPACKET *pkt, int tag, 187 | int mdnid); 188 | -------------------------------------------------------------------------------- /include/prov/der_sm2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/include/prov/der_sm2.h.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "crypto/ec.h" 14 | #include "internal/der.h" 15 | 16 | /* Well known OIDs precompiled */ 17 | 18 | /* 19 | * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } 20 | */ 21 | #define DER_OID_V_sm2_with_SM3 DER_P_OBJECT, 8, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75 22 | #define DER_OID_SZ_sm2_with_SM3 10 23 | extern const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3]; 24 | 25 | /* 26 | * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } 27 | */ 28 | #define DER_OID_V_curveSM2 DER_P_OBJECT, 8, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, 0x2D 29 | #define DER_OID_SZ_curveSM2 10 30 | extern const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2]; 31 | 32 | 33 | /* Subject Public Key Info */ 34 | int ossl_DER_w_algorithmIdentifier_SM2(WPACKET *pkt, int cont, EC_KEY *ec); 35 | /* Signature */ 36 | int ossl_DER_w_algorithmIdentifier_SM2_with_MD(WPACKET *pkt, int cont, 37 | EC_KEY *ec, int mdnid); 38 | -------------------------------------------------------------------------------- /include/prov/der_wrap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/include/prov/der_wrap.h.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "internal/der.h" 14 | 15 | /* Well known OIDs precompiled */ 16 | 17 | /* 18 | * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { 19 | * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 20 | * } 21 | */ 22 | #define DER_OID_V_id_alg_CMS3DESwrap DER_P_OBJECT, 11, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x10, 0x03, 0x06 23 | #define DER_OID_SZ_id_alg_CMS3DESwrap 13 24 | extern const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap]; 25 | 26 | /* 27 | * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } 28 | */ 29 | #define DER_OID_V_id_aes128_wrap DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x01, 0x05 30 | #define DER_OID_SZ_id_aes128_wrap 11 31 | extern const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap]; 32 | 33 | /* 34 | * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } 35 | */ 36 | #define DER_OID_V_id_aes192_wrap DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x01, 0x19 37 | #define DER_OID_SZ_id_aes192_wrap 11 38 | extern const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap]; 39 | 40 | /* 41 | * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } 42 | */ 43 | #define DER_OID_V_id_aes256_wrap DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x01, 0x2D 44 | #define DER_OID_SZ_id_aes256_wrap 11 45 | extern const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap]; 46 | 47 | -------------------------------------------------------------------------------- /providers/common/der/der_digests_gen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/der/der_digests_gen.c.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "prov/der_digests.h" 14 | 15 | /* Well known OIDs precompiled */ 16 | 17 | /* 18 | * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } 19 | */ 20 | const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs] = { 21 | DER_OID_V_sigAlgs 22 | }; 23 | 24 | /* 25 | * id-sha1 OBJECT IDENTIFIER ::= { iso(1) 26 | * identified-organization(3) oiw(14) 27 | * secsig(3) algorithms(2) 26 } 28 | */ 29 | const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1] = { 30 | DER_OID_V_id_sha1 31 | }; 32 | 33 | /* 34 | * id-md2 OBJECT IDENTIFIER ::= { 35 | * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } 36 | */ 37 | const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2] = { 38 | DER_OID_V_id_md2 39 | }; 40 | 41 | /* 42 | * id-md5 OBJECT IDENTIFIER ::= { 43 | * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } 44 | */ 45 | const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5] = { 46 | DER_OID_V_id_md5 47 | }; 48 | 49 | /* 50 | * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } 51 | */ 52 | const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256] = { 53 | DER_OID_V_id_sha256 54 | }; 55 | 56 | /* 57 | * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } 58 | */ 59 | const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384] = { 60 | DER_OID_V_id_sha384 61 | }; 62 | 63 | /* 64 | * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } 65 | */ 66 | const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512] = { 67 | DER_OID_V_id_sha512 68 | }; 69 | 70 | /* 71 | * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } 72 | */ 73 | const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224] = { 74 | DER_OID_V_id_sha224 75 | }; 76 | 77 | /* 78 | * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } 79 | */ 80 | const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224] = { 81 | DER_OID_V_id_sha512_224 82 | }; 83 | 84 | /* 85 | * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } 86 | */ 87 | const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256] = { 88 | DER_OID_V_id_sha512_256 89 | }; 90 | 91 | /* 92 | * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } 93 | */ 94 | const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224] = { 95 | DER_OID_V_id_sha3_224 96 | }; 97 | 98 | /* 99 | * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } 100 | */ 101 | const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256] = { 102 | DER_OID_V_id_sha3_256 103 | }; 104 | 105 | /* 106 | * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } 107 | */ 108 | const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384] = { 109 | DER_OID_V_id_sha3_384 110 | }; 111 | 112 | /* 113 | * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } 114 | */ 115 | const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512] = { 116 | DER_OID_V_id_sha3_512 117 | }; 118 | 119 | /* 120 | * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } 121 | */ 122 | const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128] = { 123 | DER_OID_V_id_shake128 124 | }; 125 | 126 | /* 127 | * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } 128 | */ 129 | const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256] = { 130 | DER_OID_V_id_shake256 131 | }; 132 | 133 | /* 134 | * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } 135 | */ 136 | const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len] = { 137 | DER_OID_V_id_shake128_len 138 | }; 139 | 140 | /* 141 | * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } 142 | */ 143 | const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len] = { 144 | DER_OID_V_id_shake256_len 145 | }; 146 | 147 | /* 148 | * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} 149 | */ 150 | const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128] = { 151 | DER_OID_V_id_KMACWithSHAKE128 152 | }; 153 | 154 | /* 155 | * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} 156 | */ 157 | const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256] = { 158 | DER_OID_V_id_KMACWithSHAKE256 159 | }; 160 | 161 | -------------------------------------------------------------------------------- /providers/common/der/der_dsa_gen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/der/der_dsa_gen.c.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | /* 14 | * DSA low level APIs are deprecated for public use, but still ok for 15 | * internal use. 16 | */ 17 | #include "internal/deprecated.h" 18 | 19 | #include "prov/der_dsa.h" 20 | 21 | /* Well known OIDs precompiled */ 22 | 23 | /* 24 | * id-dsa OBJECT IDENTIFIER ::= { 25 | * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } 26 | */ 27 | const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa] = { 28 | DER_OID_V_id_dsa 29 | }; 30 | 31 | /* 32 | * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { 33 | * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } 34 | */ 35 | const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1] = { 36 | DER_OID_V_id_dsa_with_sha1 37 | }; 38 | 39 | /* 40 | * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } 41 | */ 42 | const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224] = { 43 | DER_OID_V_id_dsa_with_sha224 44 | }; 45 | 46 | /* 47 | * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } 48 | */ 49 | const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256] = { 50 | DER_OID_V_id_dsa_with_sha256 51 | }; 52 | 53 | /* 54 | * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } 55 | */ 56 | const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384] = { 57 | DER_OID_V_id_dsa_with_sha384 58 | }; 59 | 60 | /* 61 | * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } 62 | */ 63 | const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512] = { 64 | DER_OID_V_id_dsa_with_sha512 65 | }; 66 | 67 | /* 68 | * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } 69 | */ 70 | const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224] = { 71 | DER_OID_V_id_dsa_with_sha3_224 72 | }; 73 | 74 | /* 75 | * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } 76 | */ 77 | const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256] = { 78 | DER_OID_V_id_dsa_with_sha3_256 79 | }; 80 | 81 | /* 82 | * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } 83 | */ 84 | const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384] = { 85 | DER_OID_V_id_dsa_with_sha3_384 86 | }; 87 | 88 | /* 89 | * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } 90 | */ 91 | const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512] = { 92 | DER_OID_V_id_dsa_with_sha3_512 93 | }; 94 | 95 | -------------------------------------------------------------------------------- /providers/common/der/der_ec_gen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/der/der_ec_gen.c.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "prov/der_ec.h" 14 | 15 | /* Well known OIDs precompiled */ 16 | 17 | /* 18 | * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } 19 | */ 20 | const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1] = { 21 | DER_OID_V_ecdsa_with_SHA1 22 | }; 23 | 24 | /* 25 | * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } 26 | */ 27 | const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey] = { 28 | DER_OID_V_id_ecPublicKey 29 | }; 30 | 31 | /* 32 | * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } 33 | */ 34 | const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1] = { 35 | DER_OID_V_c2pnb163v1 36 | }; 37 | 38 | /* 39 | * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } 40 | */ 41 | const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2] = { 42 | DER_OID_V_c2pnb163v2 43 | }; 44 | 45 | /* 46 | * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } 47 | */ 48 | const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3] = { 49 | DER_OID_V_c2pnb163v3 50 | }; 51 | 52 | /* 53 | * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } 54 | */ 55 | const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1] = { 56 | DER_OID_V_c2pnb176w1 57 | }; 58 | 59 | /* 60 | * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } 61 | */ 62 | const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1] = { 63 | DER_OID_V_c2tnb191v1 64 | }; 65 | 66 | /* 67 | * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } 68 | */ 69 | const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2] = { 70 | DER_OID_V_c2tnb191v2 71 | }; 72 | 73 | /* 74 | * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } 75 | */ 76 | const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3] = { 77 | DER_OID_V_c2tnb191v3 78 | }; 79 | 80 | /* 81 | * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } 82 | */ 83 | const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4] = { 84 | DER_OID_V_c2onb191v4 85 | }; 86 | 87 | /* 88 | * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } 89 | */ 90 | const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5] = { 91 | DER_OID_V_c2onb191v5 92 | }; 93 | 94 | /* 95 | * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } 96 | */ 97 | const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1] = { 98 | DER_OID_V_c2pnb208w1 99 | }; 100 | 101 | /* 102 | * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } 103 | */ 104 | const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1] = { 105 | DER_OID_V_c2tnb239v1 106 | }; 107 | 108 | /* 109 | * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } 110 | */ 111 | const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2] = { 112 | DER_OID_V_c2tnb239v2 113 | }; 114 | 115 | /* 116 | * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } 117 | */ 118 | const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3] = { 119 | DER_OID_V_c2tnb239v3 120 | }; 121 | 122 | /* 123 | * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } 124 | */ 125 | const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4] = { 126 | DER_OID_V_c2onb239v4 127 | }; 128 | 129 | /* 130 | * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } 131 | */ 132 | const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5] = { 133 | DER_OID_V_c2onb239v5 134 | }; 135 | 136 | /* 137 | * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } 138 | */ 139 | const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1] = { 140 | DER_OID_V_c2pnb272w1 141 | }; 142 | 143 | /* 144 | * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } 145 | */ 146 | const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1] = { 147 | DER_OID_V_c2pnb304w1 148 | }; 149 | 150 | /* 151 | * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } 152 | */ 153 | const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1] = { 154 | DER_OID_V_c2tnb359v1 155 | }; 156 | 157 | /* 158 | * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } 159 | */ 160 | const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1] = { 161 | DER_OID_V_c2pnb368w1 162 | }; 163 | 164 | /* 165 | * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } 166 | */ 167 | const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1] = { 168 | DER_OID_V_c2tnb431r1 169 | }; 170 | 171 | /* 172 | * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } 173 | */ 174 | const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1] = { 175 | DER_OID_V_prime192v1 176 | }; 177 | 178 | /* 179 | * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } 180 | */ 181 | const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2] = { 182 | DER_OID_V_prime192v2 183 | }; 184 | 185 | /* 186 | * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } 187 | */ 188 | const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3] = { 189 | DER_OID_V_prime192v3 190 | }; 191 | 192 | /* 193 | * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } 194 | */ 195 | const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1] = { 196 | DER_OID_V_prime239v1 197 | }; 198 | 199 | /* 200 | * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } 201 | */ 202 | const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2] = { 203 | DER_OID_V_prime239v2 204 | }; 205 | 206 | /* 207 | * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } 208 | */ 209 | const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3] = { 210 | DER_OID_V_prime239v3 211 | }; 212 | 213 | /* 214 | * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } 215 | */ 216 | const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1] = { 217 | DER_OID_V_prime256v1 218 | }; 219 | 220 | /* 221 | * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) 222 | * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } 223 | */ 224 | const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224] = { 225 | DER_OID_V_ecdsa_with_SHA224 226 | }; 227 | 228 | /* 229 | * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) 230 | * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } 231 | */ 232 | const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256] = { 233 | DER_OID_V_ecdsa_with_SHA256 234 | }; 235 | 236 | /* 237 | * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) 238 | * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } 239 | */ 240 | const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384] = { 241 | DER_OID_V_ecdsa_with_SHA384 242 | }; 243 | 244 | /* 245 | * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) 246 | * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } 247 | */ 248 | const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512] = { 249 | DER_OID_V_ecdsa_with_SHA512 250 | }; 251 | 252 | /* 253 | * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } 254 | */ 255 | const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224] = { 256 | DER_OID_V_id_ecdsa_with_sha3_224 257 | }; 258 | 259 | /* 260 | * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } 261 | */ 262 | const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256] = { 263 | DER_OID_V_id_ecdsa_with_sha3_256 264 | }; 265 | 266 | /* 267 | * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } 268 | */ 269 | const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384] = { 270 | DER_OID_V_id_ecdsa_with_sha3_384 271 | }; 272 | 273 | /* 274 | * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } 275 | */ 276 | const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512] = { 277 | DER_OID_V_id_ecdsa_with_sha3_512 278 | }; 279 | 280 | -------------------------------------------------------------------------------- /providers/common/der/der_ecx_gen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/der/der_ecx_gen.c.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "prov/der_ecx.h" 14 | 15 | /* Well known OIDs precompiled */ 16 | 17 | /* 18 | * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } 19 | */ 20 | const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519] = { 21 | DER_OID_V_id_X25519 22 | }; 23 | 24 | /* 25 | * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } 26 | */ 27 | const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448] = { 28 | DER_OID_V_id_X448 29 | }; 30 | 31 | /* 32 | * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } 33 | */ 34 | const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519] = { 35 | DER_OID_V_id_Ed25519 36 | }; 37 | 38 | /* 39 | * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } 40 | */ 41 | const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = { 42 | DER_OID_V_id_Ed448 43 | }; 44 | 45 | -------------------------------------------------------------------------------- /providers/common/der/der_rsa_gen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/der/der_rsa_gen.c.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "prov/der_rsa.h" 14 | 15 | /* Well known OIDs precompiled */ 16 | 17 | /* 18 | * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } 19 | */ 20 | const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs] = { 21 | DER_OID_V_hashAlgs 22 | }; 23 | 24 | /* 25 | * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } 26 | */ 27 | const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption] = { 28 | DER_OID_V_rsaEncryption 29 | }; 30 | 31 | /* 32 | * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } 33 | */ 34 | const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP] = { 35 | DER_OID_V_id_RSAES_OAEP 36 | }; 37 | 38 | /* 39 | * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } 40 | */ 41 | const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified] = { 42 | DER_OID_V_id_pSpecified 43 | }; 44 | 45 | /* 46 | * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } 47 | */ 48 | const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS] = { 49 | DER_OID_V_id_RSASSA_PSS 50 | }; 51 | 52 | /* 53 | * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } 54 | */ 55 | const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption] = { 56 | DER_OID_V_md2WithRSAEncryption 57 | }; 58 | 59 | /* 60 | * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } 61 | */ 62 | const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption] = { 63 | DER_OID_V_md5WithRSAEncryption 64 | }; 65 | 66 | /* 67 | * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } 68 | */ 69 | const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption] = { 70 | DER_OID_V_sha1WithRSAEncryption 71 | }; 72 | 73 | /* 74 | * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } 75 | */ 76 | const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption] = { 77 | DER_OID_V_sha224WithRSAEncryption 78 | }; 79 | 80 | /* 81 | * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } 82 | */ 83 | const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption] = { 84 | DER_OID_V_sha256WithRSAEncryption 85 | }; 86 | 87 | /* 88 | * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } 89 | */ 90 | const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption] = { 91 | DER_OID_V_sha384WithRSAEncryption 92 | }; 93 | 94 | /* 95 | * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } 96 | */ 97 | const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption] = { 98 | DER_OID_V_sha512WithRSAEncryption 99 | }; 100 | 101 | /* 102 | * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } 103 | */ 104 | const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption] = { 105 | DER_OID_V_sha512_224WithRSAEncryption 106 | }; 107 | 108 | /* 109 | * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } 110 | */ 111 | const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption] = { 112 | DER_OID_V_sha512_256WithRSAEncryption 113 | }; 114 | 115 | /* 116 | * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } 117 | */ 118 | const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1] = { 119 | DER_OID_V_id_mgf1 120 | }; 121 | 122 | /* 123 | * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } 124 | */ 125 | const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224] = { 126 | DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 127 | }; 128 | 129 | /* 130 | * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } 131 | */ 132 | const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256] = { 133 | DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 134 | }; 135 | 136 | /* 137 | * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } 138 | */ 139 | const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384] = { 140 | DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 141 | }; 142 | 143 | /* 144 | * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } 145 | */ 146 | const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512] = { 147 | DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 148 | }; 149 | 150 | /* 151 | * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } 152 | */ 153 | const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption] = { 154 | DER_OID_V_md4WithRSAEncryption 155 | }; 156 | 157 | /* 158 | * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { 159 | * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 160 | * } 161 | */ 162 | const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption] = { 163 | DER_OID_V_ripemd160WithRSAEncryption 164 | }; 165 | 166 | /* 167 | * mdc2WithRSASignature OBJECT IDENTIFIER ::= { 168 | * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) 169 | * } 170 | */ 171 | const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature] = { 172 | DER_OID_V_mdc2WithRSASignature 173 | }; 174 | 175 | -------------------------------------------------------------------------------- /providers/common/der/der_sm2_gen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/der/der_sm2_gen.c.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "prov/der_sm2.h" 14 | 15 | /* Well known OIDs precompiled */ 16 | 17 | /* 18 | * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } 19 | */ 20 | const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3] = { 21 | DER_OID_V_sm2_with_SM3 22 | }; 23 | 24 | /* 25 | * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } 26 | */ 27 | const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2] = { 28 | DER_OID_V_curveSM2 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /providers/common/der/der_wrap_gen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from providers/common/der/der_wrap_gen.c.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #include "prov/der_wrap.h" 14 | 15 | /* Well known OIDs precompiled */ 16 | 17 | /* 18 | * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { 19 | * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 20 | * } 21 | */ 22 | const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap] = { 23 | DER_OID_V_id_alg_CMS3DESwrap 24 | }; 25 | 26 | /* 27 | * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } 28 | */ 29 | const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap] = { 30 | DER_OID_V_id_aes128_wrap 31 | }; 32 | 33 | /* 34 | * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } 35 | */ 36 | const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap] = { 37 | DER_OID_V_id_aes192_wrap 38 | }; 39 | 40 | /* 41 | * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } 42 | */ 43 | const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = { 44 | DER_OID_V_id_aes256_wrap 45 | }; 46 | 47 | --------------------------------------------------------------------------------