1 /* SPDX-License-Identifier: BSD-3-Clause */ 2 /* Copyright(c) 2007-2022 Intel Corporation */ 3 /* $FreeBSD$ */ 4 /** 5 ***************************************************************************** 6 * 7 * @file lac_stubs.c 8 * 9 * @defgroup kernel stubs 10 * 11 * All PKE and KPT API won't be supported in kernel API 12 * 13 *****************************************************************************/ 14 15 /* 16 ******************************************************************************* 17 * Include public/global header files 18 ******************************************************************************* 19 */ 20 21 /* API Includes */ 22 #include "cpa.h" 23 #include "cpa_cy_dh.h" 24 #include "cpa_cy_dsa.h" 25 #include "cpa_cy_ecdh.h" 26 #include "cpa_cy_ecdsa.h" 27 #include "cpa_cy_ec.h" 28 #include "cpa_cy_prime.h" 29 #include "cpa_cy_rsa.h" 30 #include "cpa_cy_ln.h" 31 #include "cpa_dc.h" 32 #include "icp_accel_devices.h" 33 #include "icp_adf_init.h" 34 #include "icp_adf_transport.h" 35 #include "icp_sal_poll.h" 36 #include "cpa_cy_sym.h" 37 #include "cpa_cy_sym_dp.h" 38 #include "cpa_cy_key.h" 39 #include "cpa_cy_common.h" 40 #include "cpa_cy_im.h" 41 #include "icp_sal_user.h" 42 43 /* Diffie Hellman */ 44 CpaStatus 45 cpaCyDhKeyGenPhase1(const CpaInstanceHandle instanceHandle, 46 const CpaCyGenFlatBufCbFunc pDhPhase1Cb, 47 void *pCallbackTag, 48 const CpaCyDhPhase1KeyGenOpData *pPhase1KeyGenData, 49 CpaFlatBuffer *pLocalOctetStringPV) 50 { 51 return CPA_STATUS_UNSUPPORTED; 52 } 53 54 CpaStatus 55 cpaCyDhKeyGenPhase2Secret( 56 const CpaInstanceHandle instanceHandle, 57 const CpaCyGenFlatBufCbFunc pDhPhase2Cb, 58 void *pCallbackTag, 59 const CpaCyDhPhase2SecretKeyGenOpData *pPhase2SecretKeyGenData, 60 CpaFlatBuffer *pOctetStringSecretKey) 61 { 62 return CPA_STATUS_UNSUPPORTED; 63 } 64 65 CpaStatus 66 cpaCyDhQueryStats64(const CpaInstanceHandle instanceHandle, 67 CpaCyDhStats64 *pDhStats) 68 { 69 return CPA_STATUS_UNSUPPORTED; 70 } 71 72 CpaStatus 73 cpaCyDhQueryStats(const CpaInstanceHandle instanceHandle, 74 CpaCyDhStats *pDhStats) 75 { 76 return CPA_STATUS_UNSUPPORTED; 77 } 78 79 /* DSA */ 80 CpaStatus 81 cpaCyDsaGenPParam(const CpaInstanceHandle instanceHandle, 82 const CpaCyDsaGenCbFunc pCb, 83 void *pCallbackTag, 84 const CpaCyDsaPParamGenOpData *pOpData, 85 CpaBoolean *pProtocolStatus, 86 CpaFlatBuffer *pP) 87 { 88 return CPA_STATUS_UNSUPPORTED; 89 } 90 91 CpaStatus 92 cpaCyDsaGenGParam(const CpaInstanceHandle instanceHandle, 93 const CpaCyDsaGenCbFunc pCb, 94 void *pCallbackTag, 95 const CpaCyDsaGParamGenOpData *pOpData, 96 CpaBoolean *pProtocolStatus, 97 CpaFlatBuffer *pG) 98 { 99 return CPA_STATUS_UNSUPPORTED; 100 } 101 102 CpaStatus 103 cpaCyDsaGenYParam(const CpaInstanceHandle instanceHandle, 104 const CpaCyDsaGenCbFunc pCb, 105 void *pCallbackTag, 106 const CpaCyDsaYParamGenOpData *pOpData, 107 CpaBoolean *pProtocolStatus, 108 CpaFlatBuffer *pY) 109 { 110 return CPA_STATUS_UNSUPPORTED; 111 } 112 113 CpaStatus 114 cpaCyDsaSignR(const CpaInstanceHandle instanceHandle, 115 const CpaCyDsaGenCbFunc pCb, 116 void *pCallbackTag, 117 const CpaCyDsaRSignOpData *pOpData, 118 CpaBoolean *pProtocolStatus, 119 CpaFlatBuffer *pR) 120 { 121 return CPA_STATUS_UNSUPPORTED; 122 } 123 124 CpaStatus 125 cpaCyDsaSignS(const CpaInstanceHandle instanceHandle, 126 const CpaCyDsaGenCbFunc pCb, 127 void *pCallbackTag, 128 const CpaCyDsaSSignOpData *pOpData, 129 CpaBoolean *pProtocolStatus, 130 CpaFlatBuffer *pS) 131 { 132 return CPA_STATUS_UNSUPPORTED; 133 } 134 135 CpaStatus 136 cpaCyDsaSignRS(const CpaInstanceHandle instanceHandle, 137 const CpaCyDsaRSSignCbFunc pCb, 138 void *pCallbackTag, 139 const CpaCyDsaRSSignOpData *pOpData, 140 CpaBoolean *pProtocolStatus, 141 CpaFlatBuffer *pR, 142 CpaFlatBuffer *pS) 143 { 144 return CPA_STATUS_UNSUPPORTED; 145 } 146 147 CpaStatus 148 cpaCyDsaVerify(const CpaInstanceHandle instanceHandle, 149 const CpaCyDsaVerifyCbFunc pCb, 150 void *pCallbackTag, 151 const CpaCyDsaVerifyOpData *pOpData, 152 CpaBoolean *pVerifyStatus) 153 { 154 return CPA_STATUS_UNSUPPORTED; 155 } 156 157 CpaStatus 158 cpaCyDsaQueryStats(const CpaInstanceHandle instanceHandle, 159 CpaCyDsaStats *pDsaStats) 160 { 161 return CPA_STATUS_UNSUPPORTED; 162 } 163 164 CpaStatus 165 cpaCyDsaQueryStats64(const CpaInstanceHandle instanceHandle, 166 CpaCyDsaStats64 *pDsaStats) 167 { 168 return CPA_STATUS_UNSUPPORTED; 169 } 170 171 /* ECDH */ 172 CpaStatus 173 cpaCyEcdhPointMultiply(const CpaInstanceHandle instanceHandle, 174 const CpaCyEcdhPointMultiplyCbFunc pCb, 175 void *pCallbackTag, 176 const CpaCyEcdhPointMultiplyOpData *pOpData, 177 CpaBoolean *pMultiplyStatus, 178 CpaFlatBuffer *pXk, 179 CpaFlatBuffer *pYk) 180 { 181 return CPA_STATUS_UNSUPPORTED; 182 } 183 184 CpaStatus 185 cpaCyEcdhQueryStats64(const CpaInstanceHandle instanceHandle, 186 CpaCyEcdhStats64 *pEcdhStats) 187 { 188 return CPA_STATUS_UNSUPPORTED; 189 } 190 191 /* ECDSA */ 192 CpaStatus 193 cpaCyEcdsaSignR(const CpaInstanceHandle instanceHandle, 194 const CpaCyEcdsaGenSignCbFunc pCb, 195 void *pCallbackTag, 196 const CpaCyEcdsaSignROpData *pOpData, 197 CpaBoolean *pSignStatus, 198 CpaFlatBuffer *pR) 199 { 200 return CPA_STATUS_UNSUPPORTED; 201 } 202 203 CpaStatus 204 cpaCyEcdsaSignS(const CpaInstanceHandle instanceHandle, 205 const CpaCyEcdsaGenSignCbFunc pCb, 206 void *pCallbackTag, 207 const CpaCyEcdsaSignSOpData *pOpData, 208 CpaBoolean *pSignStatus, 209 CpaFlatBuffer *pS) 210 { 211 return CPA_STATUS_UNSUPPORTED; 212 } 213 214 CpaStatus 215 cpaCyEcdsaSignRS(const CpaInstanceHandle instanceHandle, 216 const CpaCyEcdsaSignRSCbFunc pCb, 217 void *pCallbackTag, 218 const CpaCyEcdsaSignRSOpData *pOpData, 219 CpaBoolean *pSignStatus, 220 CpaFlatBuffer *pR, 221 CpaFlatBuffer *pS) 222 { 223 return CPA_STATUS_UNSUPPORTED; 224 } 225 226 CpaStatus 227 cpaCyEcdsaVerify(const CpaInstanceHandle instanceHandle, 228 const CpaCyEcdsaVerifyCbFunc pCb, 229 void *pCallbackTag, 230 const CpaCyEcdsaVerifyOpData *pOpData, 231 CpaBoolean *pVerifyStatus) 232 { 233 return CPA_STATUS_UNSUPPORTED; 234 } 235 236 CpaStatus 237 cpaCyEcdsaQueryStats64(const CpaInstanceHandle instanceHandle, 238 CpaCyEcdsaStats64 *pEcdsaStats) 239 { 240 return CPA_STATUS_UNSUPPORTED; 241 } 242 243 /* EC */ 244 CpaStatus 245 cpaCyEcPointMultiply(const CpaInstanceHandle instanceHandle, 246 const CpaCyEcPointMultiplyCbFunc pCb, 247 void *pCallbackTag, 248 const CpaCyEcPointMultiplyOpData *pOpData, 249 CpaBoolean *pMultiplyStatus, 250 CpaFlatBuffer *pXk, 251 CpaFlatBuffer *pYk) 252 { 253 return CPA_STATUS_UNSUPPORTED; 254 } 255 256 CpaStatus 257 cpaCyEcPointVerify(const CpaInstanceHandle instanceHandle, 258 const CpaCyEcPointVerifyCbFunc pCb, 259 void *pCallbackTag, 260 const CpaCyEcPointVerifyOpData *pOpData, 261 CpaBoolean *pVerifyStatus) 262 { 263 return CPA_STATUS_UNSUPPORTED; 264 } 265 266 CpaStatus 267 cpaCyEcQueryStats64(const CpaInstanceHandle instanceHandle, 268 CpaCyEcStats64 *pEcStats) 269 { 270 return CPA_STATUS_UNSUPPORTED; 271 } 272 273 CpaStatus 274 cpaCyEcMontEdwdsPointMultiply( 275 const CpaInstanceHandle instanceHandle, 276 const CpaCyEcPointMultiplyCbFunc pCb, 277 void *pCallbackTag, 278 const CpaCyEcMontEdwdsPointMultiplyOpData *pOpData, 279 CpaBoolean *pMultiplyStatus, 280 CpaFlatBuffer *pXk, 281 CpaFlatBuffer *pYk) 282 { 283 return CPA_STATUS_UNSUPPORTED; 284 } 285 286 /* Prime */ 287 CpaStatus 288 cpaCyPrimeTest(const CpaInstanceHandle instanceHandle, 289 const CpaCyPrimeTestCbFunc pCb, 290 void *pCallbackTag, 291 const CpaCyPrimeTestOpData *pOpData, 292 CpaBoolean *pTestPassed) 293 { 294 return CPA_STATUS_UNSUPPORTED; 295 } 296 297 CpaStatus 298 cpaCyPrimeQueryStats64(const CpaInstanceHandle instanceHandle, 299 CpaCyPrimeStats64 *pPrimeStats) 300 { 301 return CPA_STATUS_UNSUPPORTED; 302 } 303 304 CpaStatus 305 cpaCyPrimeQueryStats(const CpaInstanceHandle instanceHandle, 306 CpaCyPrimeStats *pPrimeStats) 307 { 308 return CPA_STATUS_UNSUPPORTED; 309 } 310 311 /* RSA */ 312 CpaStatus 313 cpaCyRsaGenKey(const CpaInstanceHandle instanceHandle, 314 const CpaCyRsaKeyGenCbFunc pRsaKeyGenCb, 315 void *pCallbackTag, 316 const CpaCyRsaKeyGenOpData *pKeyGenOpData, 317 CpaCyRsaPrivateKey *pPrivateKey, 318 CpaCyRsaPublicKey *pPublicKey) 319 { 320 return CPA_STATUS_UNSUPPORTED; 321 } 322 323 CpaStatus 324 cpaCyRsaEncrypt(const CpaInstanceHandle instanceHandle, 325 const CpaCyGenFlatBufCbFunc pRsaEncryptCb, 326 void *pCallbackTag, 327 const CpaCyRsaEncryptOpData *pEncryptOpData, 328 CpaFlatBuffer *pOutputData) 329 { 330 return CPA_STATUS_UNSUPPORTED; 331 } 332 333 CpaStatus 334 cpaCyRsaDecrypt(const CpaInstanceHandle instanceHandle, 335 const CpaCyGenFlatBufCbFunc pRsaDecryptCb, 336 void *pCallbackTag, 337 const CpaCyRsaDecryptOpData *pDecryptOpData, 338 CpaFlatBuffer *pOutputData) 339 { 340 return CPA_STATUS_UNSUPPORTED; 341 } 342 343 CpaStatus 344 cpaCyRsaQueryStats64(const CpaInstanceHandle instanceHandle, 345 CpaCyRsaStats64 *pRsaStats) 346 { 347 return CPA_STATUS_UNSUPPORTED; 348 } 349 350 CpaStatus 351 cpaCyRsaQueryStats(const CpaInstanceHandle instanceHandle, 352 CpaCyRsaStats *pRsaStats) 353 { 354 return CPA_STATUS_UNSUPPORTED; 355 } 356 357 /* Large Number */ 358 CpaStatus 359 cpaCyLnModExp(const CpaInstanceHandle instanceHandle, 360 const CpaCyGenFlatBufCbFunc pLnModExpCb, 361 void *pCallbackTag, 362 const CpaCyLnModExpOpData *pLnModExpOpData, 363 CpaFlatBuffer *pResult) 364 { 365 return CPA_STATUS_UNSUPPORTED; 366 } 367 368 CpaStatus 369 cpaCyLnModInv(const CpaInstanceHandle instanceHandle, 370 const CpaCyGenFlatBufCbFunc pLnModInvCb, 371 void *pCallbackTag, 372 const CpaCyLnModInvOpData *pLnModInvOpData, 373 CpaFlatBuffer *pResult) 374 { 375 return CPA_STATUS_UNSUPPORTED; 376 } 377 378 CpaStatus 379 cpaCyLnStatsQuery64(const CpaInstanceHandle instanceHandle, 380 CpaCyLnStats64 *pLnStats) 381 { 382 return CPA_STATUS_UNSUPPORTED; 383 } 384 385 /* Dynamic Instance */ 386 CpaStatus 387 icp_adf_putDynInstance(icp_accel_dev_t *accel_dev, 388 adf_service_type_t stype, 389 Cpa32U instance_id) 390 { 391 return CPA_STATUS_FAIL; 392 } 393 394 CpaStatus 395 icp_sal_CyPollAsymRing(CpaInstanceHandle instanceHandle_in, 396 Cpa32U response_quota) 397 { 398 return CPA_STATUS_UNSUPPORTED; 399 } 400 401 CpaStatus 402 icp_sal_AsymGetInflightRequests(CpaInstanceHandle instanceHandle, 403 Cpa32U *maxInflightRequests, 404 Cpa32U *numInflightRequests) 405 { 406 return CPA_STATUS_UNSUPPORTED; 407 } 408 409 CpaStatus 410 icp_sal_AsymPerformOpNow(CpaInstanceHandle instanceHandle) 411 { 412 return CPA_STATUS_UNSUPPORTED; 413 } 414