| 1 | /************************************************************************* |
| 2 | * Copyright (C) 2025 Intel Corporation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | *************************************************************************/ |
| 16 | |
| 17 | #include "owndefs.h" |
| 18 | #include "owncp.h" |
| 19 | #include "hash/pcphash.h" |
| 20 | #include "hash/pcphash_rmf.h" |
| 21 | #include "hash/sha3/sha3_stuff.h" |
| 22 | |
| 23 | #if !defined(_PCP_SHAKE128_STUFF_H) |
| 24 | #define _PCP_SHAKE128_STUFF_H |
| 25 | |
| 26 | IPP_OWN_DEFN(static void, cp_shake128_hashUpdate, (void* pHash, const Ipp8u* pMsg, int msgLen)) |
| 27 | { |
| 28 | int block_size = MBS_SHAKE128; |
| 29 | #if (_IPP32E >= _IPP32E_K0) |
| 30 | IPP_UNREFERENCED_PARAMETER(block_size); |
| 31 | cp_SHA3_SHAKE128_Absorb(&pHash, pMsg, (Ipp64u)msgLen); |
| 32 | #else |
| 33 | cpUpdateSHA3(pHash, pMsg, msgLen, &block_size); |
| 34 | #endif |
| 35 | } |
| 36 | |
| 37 | #endif /* _PCP_SHAKE128_STUFF_H */ |