1 // SPDX-License-Identifier: MIT 2 3 #ifndef OQS_KEM_SIKE_H 4 #define OQS_KEM_SIKE_H 5 6 #include <oqs/oqs.h> 7 8 #ifdef OQS_ENABLE_KEM_sike_p434 9 10 #define OQS_KEM_sike_p434_length_public_key 330 11 #define OQS_KEM_sike_p434_length_secret_key 374 12 #define OQS_KEM_sike_p434_length_ciphertext 346 13 #define OQS_KEM_sike_p434_length_shared_secret 16 14 15 OQS_KEM *OQS_KEM_sike_p434_new(void); 16 17 OQS_API OQS_STATUS OQS_KEM_sike_p434_keypair(uint8_t *public_key, uint8_t *secret_key); 18 OQS_API OQS_STATUS OQS_KEM_sike_p434_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 19 OQS_API OQS_STATUS OQS_KEM_sike_p434_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 20 21 #endif 22 23 #ifdef OQS_ENABLE_KEM_sike_p434_compressed 24 25 #define OQS_KEM_sike_p434_compressed_length_public_key 197 26 #define OQS_KEM_sike_p434_compressed_length_secret_key 350 27 #define OQS_KEM_sike_p434_compressed_length_ciphertext 236 28 #define OQS_KEM_sike_p434_compressed_length_shared_secret 16 29 30 OQS_KEM *OQS_KEM_sike_p434_compressed_new(void); 31 32 OQS_API OQS_STATUS OQS_KEM_sike_p434_compressed_keypair(uint8_t *public_key, uint8_t *secret_key); 33 OQS_API OQS_STATUS OQS_KEM_sike_p434_compressed_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 34 OQS_API OQS_STATUS OQS_KEM_sike_p434_compressed_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 35 36 #endif 37 38 #ifdef OQS_ENABLE_KEM_sike_p503 39 40 #define OQS_KEM_sike_p503_length_public_key 378 41 #define OQS_KEM_sike_p503_length_secret_key 434 42 #define OQS_KEM_sike_p503_length_ciphertext 402 43 #define OQS_KEM_sike_p503_length_shared_secret 24 44 45 OQS_KEM *OQS_KEM_sike_p503_new(void); 46 47 OQS_API OQS_STATUS OQS_KEM_sike_p503_keypair(uint8_t *public_key, uint8_t *secret_key); 48 OQS_API OQS_STATUS OQS_KEM_sike_p503_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 49 OQS_API OQS_STATUS OQS_KEM_sike_p503_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 50 51 #endif 52 53 #ifdef OQS_ENABLE_KEM_sike_p503_compressed 54 55 #define OQS_KEM_sike_p503_compressed_length_public_key 225 56 #define OQS_KEM_sike_p503_compressed_length_secret_key 407 57 #define OQS_KEM_sike_p503_compressed_length_ciphertext 280 58 #define OQS_KEM_sike_p503_compressed_length_shared_secret 24 59 60 OQS_KEM *OQS_KEM_sike_p503_compressed_new(void); 61 62 OQS_API OQS_STATUS OQS_KEM_sike_p503_compressed_keypair(uint8_t *public_key, uint8_t *secret_key); 63 OQS_API OQS_STATUS OQS_KEM_sike_p503_compressed_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 64 OQS_API OQS_STATUS OQS_KEM_sike_p503_compressed_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 65 66 #endif 67 68 #ifdef OQS_ENABLE_KEM_sike_p610 69 70 #define OQS_KEM_sike_p610_length_public_key 462 71 #define OQS_KEM_sike_p610_length_secret_key 524 72 #define OQS_KEM_sike_p610_length_ciphertext 486 73 #define OQS_KEM_sike_p610_length_shared_secret 24 74 75 OQS_KEM *OQS_KEM_sike_p610_new(void); 76 77 OQS_API OQS_STATUS OQS_KEM_sike_p610_keypair(uint8_t *public_key, uint8_t *secret_key); 78 OQS_API OQS_STATUS OQS_KEM_sike_p610_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 79 OQS_API OQS_STATUS OQS_KEM_sike_p610_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 80 81 #endif 82 83 #ifdef OQS_ENABLE_KEM_sike_p610_compressed 84 85 #define OQS_KEM_sike_p610_compressed_length_public_key 274 86 #define OQS_KEM_sike_p610_compressed_length_secret_key 491 87 #define OQS_KEM_sike_p610_compressed_length_ciphertext 336 88 #define OQS_KEM_sike_p610_compressed_length_shared_secret 24 89 90 OQS_KEM *OQS_KEM_sike_p610_compressed_new(void); 91 92 OQS_API OQS_STATUS OQS_KEM_sike_p610_compressed_keypair(uint8_t *public_key, uint8_t *secret_key); 93 OQS_API OQS_STATUS OQS_KEM_sike_p610_compressed_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 94 OQS_API OQS_STATUS OQS_KEM_sike_p610_compressed_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 95 96 #endif 97 98 #ifdef OQS_ENABLE_KEM_sike_p751 99 100 #define OQS_KEM_sike_p751_length_public_key 564 101 #define OQS_KEM_sike_p751_length_secret_key 644 102 #define OQS_KEM_sike_p751_length_ciphertext 596 103 #define OQS_KEM_sike_p751_length_shared_secret 32 104 105 OQS_KEM *OQS_KEM_sike_p751_new(void); 106 107 OQS_API OQS_STATUS OQS_KEM_sike_p751_keypair(uint8_t *public_key, uint8_t *secret_key); 108 OQS_API OQS_STATUS OQS_KEM_sike_p751_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 109 OQS_API OQS_STATUS OQS_KEM_sike_p751_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 110 111 #endif 112 113 #ifdef OQS_ENABLE_KEM_sike_p751_compressed 114 115 #define OQS_KEM_sike_p751_compressed_length_public_key 335 116 #define OQS_KEM_sike_p751_compressed_length_secret_key 602 117 #define OQS_KEM_sike_p751_compressed_length_ciphertext 410 118 #define OQS_KEM_sike_p751_compressed_length_shared_secret 32 119 120 OQS_KEM *OQS_KEM_sike_p751_compressed_new(void); 121 122 OQS_API OQS_STATUS OQS_KEM_sike_p751_compressed_keypair(uint8_t *public_key, uint8_t *secret_key); 123 OQS_API OQS_STATUS OQS_KEM_sike_p751_compressed_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 124 OQS_API OQS_STATUS OQS_KEM_sike_p751_compressed_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 125 126 #endif 127 128 #ifdef OQS_ENABLE_KEM_sidh_p434 129 130 #define OQS_KEM_sidh_p434_length_public_key 330 131 #define OQS_KEM_sidh_p434_length_secret_key 28 132 #define OQS_KEM_sidh_p434_length_ciphertext 330 133 #define OQS_KEM_sidh_p434_length_shared_secret 110 134 135 OQS_KEM *OQS_KEM_sidh_p434_new(void); 136 137 OQS_API OQS_STATUS OQS_KEM_sidh_p434_keypair(uint8_t *public_key, uint8_t *secret_key); 138 OQS_API OQS_STATUS OQS_KEM_sidh_p434_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 139 OQS_API OQS_STATUS OQS_KEM_sidh_p434_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 140 141 #endif 142 143 #ifdef OQS_ENABLE_KEM_sidh_p434_compressed 144 145 #define OQS_KEM_sidh_p434_compressed_length_public_key 197 146 #define OQS_KEM_sidh_p434_compressed_length_secret_key 28 147 #define OQS_KEM_sidh_p434_compressed_length_ciphertext 197 148 #define OQS_KEM_sidh_p434_compressed_length_shared_secret 110 149 150 OQS_KEM *OQS_KEM_sidh_p434_compressed_new(void); 151 152 OQS_API OQS_STATUS OQS_KEM_sidh_p434_compressed_keypair(uint8_t *public_key, uint8_t *secret_key); 153 OQS_API OQS_STATUS OQS_KEM_sidh_p434_compressed_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 154 OQS_API OQS_STATUS OQS_KEM_sidh_p434_compressed_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 155 156 #endif 157 158 #ifdef OQS_ENABLE_KEM_sidh_p503 159 160 #define OQS_KEM_sidh_p503_length_public_key 378 161 #define OQS_KEM_sidh_p503_length_secret_key 32 162 #define OQS_KEM_sidh_p503_length_ciphertext 378 163 #define OQS_KEM_sidh_p503_length_shared_secret 126 164 165 OQS_KEM *OQS_KEM_sidh_p503_new(void); 166 167 OQS_API OQS_STATUS OQS_KEM_sidh_p503_keypair(uint8_t *public_key, uint8_t *secret_key); 168 OQS_API OQS_STATUS OQS_KEM_sidh_p503_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 169 OQS_API OQS_STATUS OQS_KEM_sidh_p503_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 170 171 #endif 172 173 #ifdef OQS_ENABLE_KEM_sidh_p503_compressed 174 175 #define OQS_KEM_sidh_p503_compressed_length_public_key 225 176 #define OQS_KEM_sidh_p503_compressed_length_secret_key 32 177 #define OQS_KEM_sidh_p503_compressed_length_ciphertext 225 178 #define OQS_KEM_sidh_p503_compressed_length_shared_secret 126 179 180 OQS_KEM *OQS_KEM_sidh_p503_compressed_new(void); 181 182 OQS_API OQS_STATUS OQS_KEM_sidh_p503_compressed_keypair(uint8_t *public_key, uint8_t *secret_key); 183 OQS_API OQS_STATUS OQS_KEM_sidh_p503_compressed_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 184 OQS_API OQS_STATUS OQS_KEM_sidh_p503_compressed_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 185 186 #endif 187 188 #ifdef OQS_ENABLE_KEM_sidh_p610 189 190 #define OQS_KEM_sidh_p610_length_public_key 462 191 #define OQS_KEM_sidh_p610_length_secret_key 39 192 #define OQS_KEM_sidh_p610_length_ciphertext 462 193 #define OQS_KEM_sidh_p610_length_shared_secret 154 194 195 OQS_KEM *OQS_KEM_sidh_p610_new(void); 196 197 OQS_API OQS_STATUS OQS_KEM_sidh_p610_keypair(uint8_t *public_key, uint8_t *secret_key); 198 OQS_API OQS_STATUS OQS_KEM_sidh_p610_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 199 OQS_API OQS_STATUS OQS_KEM_sidh_p610_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 200 201 #endif 202 203 #ifdef OQS_ENABLE_KEM_sidh_p610_compressed 204 205 #define OQS_KEM_sidh_p610_compressed_length_public_key 274 206 #define OQS_KEM_sidh_p610_compressed_length_secret_key 39 207 #define OQS_KEM_sidh_p610_compressed_length_ciphertext 274 208 #define OQS_KEM_sidh_p610_compressed_length_shared_secret 154 209 210 OQS_KEM *OQS_KEM_sidh_p610_compressed_new(void); 211 212 OQS_API OQS_STATUS OQS_KEM_sidh_p610_compressed_keypair(uint8_t *public_key, uint8_t *secret_key); 213 OQS_API OQS_STATUS OQS_KEM_sidh_p610_compressed_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 214 OQS_API OQS_STATUS OQS_KEM_sidh_p610_compressed_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 215 216 #endif 217 218 #ifdef OQS_ENABLE_KEM_sidh_p751 219 220 #define OQS_KEM_sidh_p751_length_public_key 564 221 #define OQS_KEM_sidh_p751_length_secret_key 48 222 #define OQS_KEM_sidh_p751_length_ciphertext 564 223 #define OQS_KEM_sidh_p751_length_shared_secret 188 224 225 OQS_KEM *OQS_KEM_sidh_p751_new(void); 226 227 OQS_API OQS_STATUS OQS_KEM_sidh_p751_keypair(uint8_t *public_key, uint8_t *secret_key); 228 OQS_API OQS_STATUS OQS_KEM_sidh_p751_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 229 OQS_API OQS_STATUS OQS_KEM_sidh_p751_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 230 231 #endif 232 233 #ifdef OQS_ENABLE_KEM_sidh_p751_compressed 234 235 #define OQS_KEM_sidh_p751_compressed_length_public_key 335 236 #define OQS_KEM_sidh_p751_compressed_length_secret_key 48 237 #define OQS_KEM_sidh_p751_compressed_length_ciphertext 335 238 #define OQS_KEM_sidh_p751_compressed_length_shared_secret 188 239 240 OQS_KEM *OQS_KEM_sidh_p751_compressed_new(void); 241 242 OQS_API OQS_STATUS OQS_KEM_sidh_p751_compressed_keypair(uint8_t *public_key, uint8_t *secret_key); 243 OQS_API OQS_STATUS OQS_KEM_sidh_p751_compressed_encaps(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key); 244 OQS_API OQS_STATUS OQS_KEM_sidh_p751_compressed_decaps(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key); 245 246 #endif 247 248 #endif // OQS_KEM_SIKE_H 249