1 /* SPDX-License-Identifier: BSD-3-Clause */ 2 /* Copyright(c) 2007-2022 Intel Corporation */ 3 /** 4 ***************************************************************************** 5 * 6 * @file lac_stubs.c 7 * 8 * @defgroup kernel stubs 9 * 10 * All PKE and KPT API won't be supported in kernel API 11 * 12 *****************************************************************************/ 13 14 /* 15 ******************************************************************************* 16 * Include public/global header files 17 ******************************************************************************* 18 */ 19 20 /* API Includes */ 21 #include "cpa.h" 22 #include "cpa_cy_dh.h" 23 #include "cpa_cy_dsa.h" 24 #include "cpa_cy_ecdh.h" 25 #include "cpa_cy_ecdsa.h" 26 #include "cpa_cy_ec.h" 27 #include "cpa_cy_prime.h" 28 #include "cpa_cy_rsa.h" 29 #include "cpa_cy_ln.h" 30 #include "cpa_dc.h" 31 #include "cpa_dc_chain.h" 32 #include "cpa_cy_ecsm2.h" 33 #include "cpa_cy_kpt.h" 34 #include "icp_accel_devices.h" 35 #include "icp_adf_init.h" 36 #include "icp_adf_transport.h" 37 #include "icp_sal_poll.h" 38 #include "cpa_cy_sym.h" 39 #include "cpa_cy_sym_dp.h" 40 #include "cpa_cy_key.h" 41 #include "cpa_cy_common.h" 42 #include "cpa_cy_im.h" 43 #include "icp_sal_user.h" 44 45 /* Diffie Hellman */ 46 CpaStatus 47 cpaCyDhKeyGenPhase1(const CpaInstanceHandle instanceHandle, 48 const CpaCyGenFlatBufCbFunc pDhPhase1Cb, 49 void *pCallbackTag, 50 const CpaCyDhPhase1KeyGenOpData *pPhase1KeyGenData, 51 CpaFlatBuffer *pLocalOctetStringPV) 52 { 53 return CPA_STATUS_UNSUPPORTED; 54 } 55 56 CpaStatus 57 cpaCyDhKeyGenPhase2Secret( 58 const CpaInstanceHandle instanceHandle, 59 const CpaCyGenFlatBufCbFunc pDhPhase2Cb, 60 void *pCallbackTag, 61 const CpaCyDhPhase2SecretKeyGenOpData *pPhase2SecretKeyGenData, 62 CpaFlatBuffer *pOctetStringSecretKey) 63 { 64 return CPA_STATUS_UNSUPPORTED; 65 } 66 67 CpaStatus 68 cpaCyDhQueryStats64(const CpaInstanceHandle instanceHandle, 69 CpaCyDhStats64 *pDhStats) 70 { 71 return CPA_STATUS_UNSUPPORTED; 72 } 73 74 CpaStatus 75 cpaCyDhQueryStats(const CpaInstanceHandle instanceHandle, 76 CpaCyDhStats *pDhStats) 77 { 78 return CPA_STATUS_UNSUPPORTED; 79 } 80 81 /* DSA */ 82 CpaStatus 83 cpaCyDsaGenPParam(const CpaInstanceHandle instanceHandle, 84 const CpaCyDsaGenCbFunc pCb, 85 void *pCallbackTag, 86 const CpaCyDsaPParamGenOpData *pOpData, 87 CpaBoolean *pProtocolStatus, 88 CpaFlatBuffer *pP) 89 { 90 return CPA_STATUS_UNSUPPORTED; 91 } 92 93 CpaStatus 94 cpaCyDsaGenGParam(const CpaInstanceHandle instanceHandle, 95 const CpaCyDsaGenCbFunc pCb, 96 void *pCallbackTag, 97 const CpaCyDsaGParamGenOpData *pOpData, 98 CpaBoolean *pProtocolStatus, 99 CpaFlatBuffer *pG) 100 { 101 return CPA_STATUS_UNSUPPORTED; 102 } 103 104 CpaStatus 105 cpaCyDsaGenYParam(const CpaInstanceHandle instanceHandle, 106 const CpaCyDsaGenCbFunc pCb, 107 void *pCallbackTag, 108 const CpaCyDsaYParamGenOpData *pOpData, 109 CpaBoolean *pProtocolStatus, 110 CpaFlatBuffer *pY) 111 { 112 return CPA_STATUS_UNSUPPORTED; 113 } 114 115 CpaStatus 116 cpaCyDsaSignR(const CpaInstanceHandle instanceHandle, 117 const CpaCyDsaGenCbFunc pCb, 118 void *pCallbackTag, 119 const CpaCyDsaRSignOpData *pOpData, 120 CpaBoolean *pProtocolStatus, 121 CpaFlatBuffer *pR) 122 { 123 return CPA_STATUS_UNSUPPORTED; 124 } 125 126 CpaStatus 127 cpaCyDsaSignS(const CpaInstanceHandle instanceHandle, 128 const CpaCyDsaGenCbFunc pCb, 129 void *pCallbackTag, 130 const CpaCyDsaSSignOpData *pOpData, 131 CpaBoolean *pProtocolStatus, 132 CpaFlatBuffer *pS) 133 { 134 return CPA_STATUS_UNSUPPORTED; 135 } 136 137 CpaStatus 138 cpaCyDsaSignRS(const CpaInstanceHandle instanceHandle, 139 const CpaCyDsaRSSignCbFunc pCb, 140 void *pCallbackTag, 141 const CpaCyDsaRSSignOpData *pOpData, 142 CpaBoolean *pProtocolStatus, 143 CpaFlatBuffer *pR, 144 CpaFlatBuffer *pS) 145 { 146 return CPA_STATUS_UNSUPPORTED; 147 } 148 149 CpaStatus 150 cpaCyDsaVerify(const CpaInstanceHandle instanceHandle, 151 const CpaCyDsaVerifyCbFunc pCb, 152 void *pCallbackTag, 153 const CpaCyDsaVerifyOpData *pOpData, 154 CpaBoolean *pVerifyStatus) 155 { 156 return CPA_STATUS_UNSUPPORTED; 157 } 158 159 CpaStatus 160 cpaCyDsaQueryStats(const CpaInstanceHandle instanceHandle, 161 CpaCyDsaStats *pDsaStats) 162 { 163 return CPA_STATUS_UNSUPPORTED; 164 } 165 166 CpaStatus 167 cpaCyDsaQueryStats64(const CpaInstanceHandle instanceHandle, 168 CpaCyDsaStats64 *pDsaStats) 169 { 170 return CPA_STATUS_UNSUPPORTED; 171 } 172 173 /* ECDH */ 174 CpaStatus 175 cpaCyEcdhPointMultiply(const CpaInstanceHandle instanceHandle, 176 const CpaCyEcdhPointMultiplyCbFunc pCb, 177 void *pCallbackTag, 178 const CpaCyEcdhPointMultiplyOpData *pOpData, 179 CpaBoolean *pMultiplyStatus, 180 CpaFlatBuffer *pXk, 181 CpaFlatBuffer *pYk) 182 { 183 return CPA_STATUS_UNSUPPORTED; 184 } 185 186 CpaStatus 187 cpaCyEcdhQueryStats64(const CpaInstanceHandle instanceHandle, 188 CpaCyEcdhStats64 *pEcdhStats) 189 { 190 return CPA_STATUS_UNSUPPORTED; 191 } 192 193 /* ECDSA */ 194 CpaStatus 195 cpaCyEcdsaSignR(const CpaInstanceHandle instanceHandle, 196 const CpaCyEcdsaGenSignCbFunc pCb, 197 void *pCallbackTag, 198 const CpaCyEcdsaSignROpData *pOpData, 199 CpaBoolean *pSignStatus, 200 CpaFlatBuffer *pR) 201 { 202 return CPA_STATUS_UNSUPPORTED; 203 } 204 205 CpaStatus 206 cpaCyEcdsaSignS(const CpaInstanceHandle instanceHandle, 207 const CpaCyEcdsaGenSignCbFunc pCb, 208 void *pCallbackTag, 209 const CpaCyEcdsaSignSOpData *pOpData, 210 CpaBoolean *pSignStatus, 211 CpaFlatBuffer *pS) 212 { 213 return CPA_STATUS_UNSUPPORTED; 214 } 215 216 CpaStatus 217 cpaCyEcdsaSignRS(const CpaInstanceHandle instanceHandle, 218 const CpaCyEcdsaSignRSCbFunc pCb, 219 void *pCallbackTag, 220 const CpaCyEcdsaSignRSOpData *pOpData, 221 CpaBoolean *pSignStatus, 222 CpaFlatBuffer *pR, 223 CpaFlatBuffer *pS) 224 { 225 return CPA_STATUS_UNSUPPORTED; 226 } 227 228 CpaStatus 229 cpaCyEcdsaVerify(const CpaInstanceHandle instanceHandle, 230 const CpaCyEcdsaVerifyCbFunc pCb, 231 void *pCallbackTag, 232 const CpaCyEcdsaVerifyOpData *pOpData, 233 CpaBoolean *pVerifyStatus) 234 { 235 return CPA_STATUS_UNSUPPORTED; 236 } 237 238 CpaStatus 239 cpaCyEcdsaQueryStats64(const CpaInstanceHandle instanceHandle, 240 CpaCyEcdsaStats64 *pEcdsaStats) 241 { 242 return CPA_STATUS_UNSUPPORTED; 243 } 244 245 /* EC */ 246 CpaStatus 247 cpaCyEcPointMultiply(const CpaInstanceHandle instanceHandle, 248 const CpaCyEcPointMultiplyCbFunc pCb, 249 void *pCallbackTag, 250 const CpaCyEcPointMultiplyOpData *pOpData, 251 CpaBoolean *pMultiplyStatus, 252 CpaFlatBuffer *pXk, 253 CpaFlatBuffer *pYk) 254 { 255 return CPA_STATUS_UNSUPPORTED; 256 } 257 258 CpaStatus 259 cpaCyEcPointVerify(const CpaInstanceHandle instanceHandle, 260 const CpaCyEcPointVerifyCbFunc pCb, 261 void *pCallbackTag, 262 const CpaCyEcPointVerifyOpData *pOpData, 263 CpaBoolean *pVerifyStatus) 264 { 265 return CPA_STATUS_UNSUPPORTED; 266 } 267 268 CpaStatus 269 cpaCyEcQueryStats64(const CpaInstanceHandle instanceHandle, 270 CpaCyEcStats64 *pEcStats) 271 { 272 return CPA_STATUS_UNSUPPORTED; 273 } 274 275 CpaStatus 276 cpaCyEcMontEdwdsPointMultiply( 277 const CpaInstanceHandle instanceHandle, 278 const CpaCyEcPointMultiplyCbFunc pCb, 279 void *pCallbackTag, 280 const CpaCyEcMontEdwdsPointMultiplyOpData *pOpData, 281 CpaBoolean *pMultiplyStatus, 282 CpaFlatBuffer *pXk, 283 CpaFlatBuffer *pYk) 284 { 285 return CPA_STATUS_UNSUPPORTED; 286 } 287 288 CpaStatus 289 cpaCyEcGenericPointVerify(const CpaInstanceHandle instanceHandle, 290 const CpaCyEcPointVerifyCbFunc pCb, 291 void *pCallbackTag, 292 const CpaCyEcGenericPointVerifyOpData *pOpData, 293 CpaBoolean *pVerifyStatus) 294 { 295 return CPA_STATUS_UNSUPPORTED; 296 } 297 298 CpaStatus 299 cpaCyEcGenericPointMultiply(const CpaInstanceHandle instanceHandle, 300 const CpaCyEcPointMultiplyCbFunc pCb, 301 void *pCallbackTag, 302 const CpaCyEcGenericPointMultiplyOpData *pOpData, 303 CpaBoolean *pMultiplyStatus, 304 CpaFlatBuffer *pOutX, 305 CpaFlatBuffer *pOutY) 306 { 307 return CPA_STATUS_UNSUPPORTED; 308 } 309 310 CpaStatus 311 cpaCyEcsm2PointMultiply( 312 const CpaInstanceHandle instanceHandle_in, 313 const CpaCyEcPointMultiplyCbFunc pEcsm2PointMulCb, 314 void *pCallbackTag, 315 const CpaCyEcsm2PointMultiplyOpData *pEcsm2PointMulOpData, 316 CpaBoolean *pMultiplyStatus, 317 CpaFlatBuffer *pXk, 318 CpaFlatBuffer *pYk) 319 { 320 return CPA_STATUS_UNSUPPORTED; 321 } 322 323 CpaStatus 324 cpaCyEcsm2GeneratorMultiply( 325 const CpaInstanceHandle instanceHandle_in, 326 const CpaCyEcPointMultiplyCbFunc pEcsm2GenMulCb, 327 void *pCallbackTag, 328 const CpaCyEcsm2GeneratorMultiplyOpData *pEcsm2GenMulOpData, 329 CpaBoolean *pMultiplyStatus, 330 CpaFlatBuffer *pXk, 331 CpaFlatBuffer *pYk) 332 { 333 return CPA_STATUS_UNSUPPORTED; 334 } 335 336 CpaStatus 337 cpaCyEcsm2PointVerify( 338 const CpaInstanceHandle instanceHandle_in, 339 const CpaCyEcPointVerifyCbFunc pEcsm2PointVeirfyCb, 340 void *pCallbackTag, 341 const CpaCyEcsm2PointVerifyOpData *pEcsm2PointVerifyOpData, 342 CpaBoolean *pPointVerifyStatus) 343 { 344 return CPA_STATUS_UNSUPPORTED; 345 } 346 347 CpaStatus 348 cpaCyEcsm2Sign(const CpaInstanceHandle instanceHandle_in, 349 const CpaCyEcsm2SignCbFunc pEcsm2SignCb, 350 void *pCallbackTag, 351 const CpaCyEcsm2SignOpData *pEcsm2SignOpData, 352 CpaBoolean *pSignStatus, 353 CpaFlatBuffer *pR, 354 CpaFlatBuffer *pS) 355 { 356 return CPA_STATUS_UNSUPPORTED; 357 } 358 359 CpaStatus 360 cpaCyEcsm2Verify(const CpaInstanceHandle instanceHandle_in, 361 const CpaCyEcsm2VerifyCbFunc pEcsm2VerifyCb, 362 void *pCallbackTag, 363 const CpaCyEcsm2VerifyOpData *pEcsm2VerifyOpData, 364 CpaBoolean *pVerifyStatus) 365 { 366 return CPA_STATUS_UNSUPPORTED; 367 } 368 369 CpaStatus 370 cpaCyEcsm2Encrypt(const CpaInstanceHandle instanceHandle_in, 371 const CpaCyGenFlatBufCbFunc pEcsm2EncCb, 372 void *pCallbackTag, 373 const CpaCyEcsm2EncryptOpData *pEcsm2EncOpData, 374 CpaCyEcsm2EncryptOutputData *pEcsm2EncOutputData) 375 { 376 return CPA_STATUS_UNSUPPORTED; 377 } 378 379 CpaStatus 380 cpaCyEcsm2Decrypt(const CpaInstanceHandle instanceHandle_in, 381 const CpaCyGenFlatBufCbFunc pEcsm2DecCb, 382 void *pCallbackTag, 383 const CpaCyEcsm2DecryptOpData *pEcsm2DecOpData, 384 CpaCyEcsm2DecryptOutputData *pEcsm2DecOutputData) 385 { 386 return CPA_STATUS_UNSUPPORTED; 387 } 388 389 CpaStatus 390 cpaCyEcsm2KeyExPhase1( 391 const CpaInstanceHandle instanceHandle_in, 392 const CpaCyGenFlatBufCbFunc pEcsm2KeyExPhase1Cb, 393 void *pCallbackTag, 394 const CpaCyEcsm2KeyExPhase1OpData *pEcsm2KeyExPhase1OpData, 395 CpaCyEcsm2KeyExOutputData *pEcsm2KeyExPhase1OutputData) 396 { 397 return CPA_STATUS_UNSUPPORTED; 398 } 399 400 CpaStatus 401 cpaCyEcsm2KeyExPhase2( 402 const CpaInstanceHandle instanceHandle_in, 403 const CpaCyGenFlatBufCbFunc pEcsm2KeyExPhase2Cb, 404 void *pCallbackTag, 405 const CpaCyEcsm2KeyExPhase2OpData *pEcsm2KeyExPhase2OpData, 406 CpaCyEcsm2KeyExOutputData *pEcsm2KeyExPhase2OutputData) 407 { 408 return CPA_STATUS_UNSUPPORTED; 409 } 410 411 CpaStatus 412 cpaCyEcsm2QueryStats64(const CpaInstanceHandle instanceHandle_in, 413 CpaCyEcsm2Stats64 *pEcsm2Stats) 414 { 415 return CPA_STATUS_UNSUPPORTED; 416 } 417 418 CpaStatus 419 cpaCyKptEcdsaSignRS(const CpaInstanceHandle instanceHandle, 420 const CpaCyEcdsaSignRSCbFunc pCb, 421 void *pCallbackTag, 422 const CpaCyKptEcdsaSignRSOpData *pOpData, 423 CpaBoolean *pSignStatus, 424 CpaFlatBuffer *pR, 425 CpaFlatBuffer *pS, 426 CpaCyKptUnwrapContext *pKptUnwrapContext) 427 { 428 return CPA_STATUS_UNSUPPORTED; 429 } 430 431 CpaStatus 432 cpaCyKptRsaDecrypt(const CpaInstanceHandle instanceHandle, 433 const CpaCyGenFlatBufCbFunc pRsaDecryptCb, 434 void *pCallbackTag, 435 const CpaCyKptRsaDecryptOpData *pDecryptOpData, 436 CpaFlatBuffer *pOutputData, 437 CpaCyKptUnwrapContext *pKptUnwrapContext) 438 439 { 440 return CPA_STATUS_UNSUPPORTED; 441 } 442 443 CpaStatus 444 cpaCyKptQueryIssuingKeys(const CpaInstanceHandle instanceHandle_in, 445 CpaFlatBuffer *pPublicX509IssueCert, 446 CpaCyKptKeyManagementStatus *pKptStatus) 447 { 448 return CPA_STATUS_UNSUPPORTED; 449 } 450 451 CpaStatus 452 cpaCyKptQueryDeviceCredentials(const CpaInstanceHandle instanceHandle, 453 CpaCyKptValidationKey *pDevCredential, 454 CpaCyKptKeyManagementStatus *pKptStatus) 455 { 456 return CPA_STATUS_UNSUPPORTED; 457 } 458 459 CpaStatus 460 cpaCyKptLoadKey(CpaInstanceHandle instanceHandle, 461 CpaCyKptLoadKey *pSWK, 462 CpaCyKptHandle *keyHandle, 463 CpaCyKptKeyManagementStatus *pKptStatus) 464 { 465 return CPA_STATUS_UNSUPPORTED; 466 } 467 468 CpaStatus 469 cpaCyKptDeleteKey(CpaInstanceHandle instanceHandle, 470 CpaCyKptHandle keyHandle, 471 CpaCyKptKeyManagementStatus *pKptStatus) 472 { 473 return CPA_STATUS_UNSUPPORTED; 474 } 475 476 /* Prime */ 477 CpaStatus 478 cpaCyPrimeTest(const CpaInstanceHandle instanceHandle, 479 const CpaCyPrimeTestCbFunc pCb, 480 void *pCallbackTag, 481 const CpaCyPrimeTestOpData *pOpData, 482 CpaBoolean *pTestPassed) 483 { 484 return CPA_STATUS_UNSUPPORTED; 485 } 486 487 CpaStatus 488 cpaCyPrimeQueryStats64(const CpaInstanceHandle instanceHandle, 489 CpaCyPrimeStats64 *pPrimeStats) 490 { 491 return CPA_STATUS_UNSUPPORTED; 492 } 493 494 CpaStatus 495 cpaCyPrimeQueryStats(const CpaInstanceHandle instanceHandle, 496 CpaCyPrimeStats *pPrimeStats) 497 { 498 return CPA_STATUS_UNSUPPORTED; 499 } 500 501 /* RSA */ 502 CpaStatus 503 cpaCyRsaGenKey(const CpaInstanceHandle instanceHandle, 504 const CpaCyRsaKeyGenCbFunc pRsaKeyGenCb, 505 void *pCallbackTag, 506 const CpaCyRsaKeyGenOpData *pKeyGenOpData, 507 CpaCyRsaPrivateKey *pPrivateKey, 508 CpaCyRsaPublicKey *pPublicKey) 509 { 510 return CPA_STATUS_UNSUPPORTED; 511 } 512 513 CpaStatus 514 cpaCyRsaEncrypt(const CpaInstanceHandle instanceHandle, 515 const CpaCyGenFlatBufCbFunc pRsaEncryptCb, 516 void *pCallbackTag, 517 const CpaCyRsaEncryptOpData *pEncryptOpData, 518 CpaFlatBuffer *pOutputData) 519 { 520 return CPA_STATUS_UNSUPPORTED; 521 } 522 523 CpaStatus 524 cpaCyRsaDecrypt(const CpaInstanceHandle instanceHandle, 525 const CpaCyGenFlatBufCbFunc pRsaDecryptCb, 526 void *pCallbackTag, 527 const CpaCyRsaDecryptOpData *pDecryptOpData, 528 CpaFlatBuffer *pOutputData) 529 { 530 return CPA_STATUS_UNSUPPORTED; 531 } 532 533 CpaStatus 534 cpaCyRsaQueryStats64(const CpaInstanceHandle instanceHandle, 535 CpaCyRsaStats64 *pRsaStats) 536 { 537 return CPA_STATUS_UNSUPPORTED; 538 } 539 540 CpaStatus 541 cpaCyRsaQueryStats(const CpaInstanceHandle instanceHandle, 542 CpaCyRsaStats *pRsaStats) 543 { 544 return CPA_STATUS_UNSUPPORTED; 545 } 546 547 /* Large Number */ 548 CpaStatus 549 cpaCyLnModExp(const CpaInstanceHandle instanceHandle, 550 const CpaCyGenFlatBufCbFunc pLnModExpCb, 551 void *pCallbackTag, 552 const CpaCyLnModExpOpData *pLnModExpOpData, 553 CpaFlatBuffer *pResult) 554 { 555 return CPA_STATUS_UNSUPPORTED; 556 } 557 558 CpaStatus 559 cpaCyLnModInv(const CpaInstanceHandle instanceHandle, 560 const CpaCyGenFlatBufCbFunc pLnModInvCb, 561 void *pCallbackTag, 562 const CpaCyLnModInvOpData *pLnModInvOpData, 563 CpaFlatBuffer *pResult) 564 { 565 return CPA_STATUS_UNSUPPORTED; 566 } 567 568 CpaStatus 569 cpaCyLnStatsQuery64(const CpaInstanceHandle instanceHandle, 570 CpaCyLnStats64 *pLnStats) 571 { 572 return CPA_STATUS_UNSUPPORTED; 573 } 574 575 /* Dynamic Instance */ 576 CpaStatus 577 icp_adf_putDynInstance(icp_accel_dev_t *accel_dev, 578 adf_service_type_t stype, 579 Cpa32U instance_id) 580 { 581 return CPA_STATUS_FAIL; 582 } 583 584 CpaStatus 585 icp_sal_CyPollAsymRing(CpaInstanceHandle instanceHandle_in, 586 Cpa32U response_quota) 587 { 588 return CPA_STATUS_UNSUPPORTED; 589 } 590 591 CpaStatus 592 icp_sal_AsymGetInflightRequests(CpaInstanceHandle instanceHandle, 593 Cpa32U *maxInflightRequests, 594 Cpa32U *numInflightRequests) 595 { 596 return CPA_STATUS_UNSUPPORTED; 597 } 598 599 CpaStatus 600 icp_sal_AsymPerformOpNow(CpaInstanceHandle instanceHandle) 601 { 602 return CPA_STATUS_UNSUPPORTED; 603 } 604