Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Conversation

@skmono
Copy link
Contributor

@skmono skmono commented Oct 17, 2022

Resolved issue where ${CMAKE_INSTALL_LIBDIR} causing build errors while using third-party dependencies which explicitly is set to lib

@skmono skmono requested a review from a team as a code owner October 17, 2022 23:17
@skmono skmono temporarily deployed to intel_workflow October 17, 2022 23:17 Inactive
@skmono skmono temporarily deployed to intel_workflow October 17, 2022 23:18 Inactive
@skmono skmono temporarily deployed to intel_workflow October 17, 2022 23:18 Inactive
@skmono skmono merged commit 174d170 into development Oct 17, 2022
@skmono skmono deleted the skmono/fix_fedora_build branch October 17, 2022 23:30
skmono pushed a commit that referenced this pull request Nov 15, 2022
skmono pushed a commit that referenced this pull request Nov 15, 2022
* Code clean/refactor/optimize (#16)

* Paillier key generation: clean/optimize code
- Modify doxygen document
- Change getNormalBN & getDJNBN to static
- Add N_BIT_SIZE_MAX macro definition

* Paillier key operation: clean/optimize code
- Modify doxygen document
- Rewrite function raw_mul

* Paillier public key: clean/optimize code
- Modify doxygen document
- Rewrite function: randIpp32u, getRandom, apply_obfuscator, ippMultiBuffExp, ippMontExp

* Paillier private key: clean/optimize code
- Modify doxygen document
- Rewrite function: decrpytRAW, decrypt, decryptCRT

* Add namespace(ipcl) to Intel Paillier Crypto Lib

* Add const keyword (#18)

- applied constant protection to all member functions and needed arguments
- public key member is const in both paillier_prikey and paillier_ops

* Refactoring (#19)

* Refactoring
- Replaced all pointers and arrays with std::vector - resolves #14
- Changed multi-buffered PaillierEncryptedNumber::raw_mul to return std::vector - resolves #15
- Changed multi-buffered modular exponentation PaillierPublicKey::ippMultiBuffExp to return std::vector - resolves #15
- Applied changes to unit-test and benchmark accordingly
- Applied const keywords to test and benchmark functions for keyPair

* Bug fix on BM_Mul_CTPT_OMP in benchmark

* Updated README - updated unittest_omp per changes to IPCL_ENABLE_OMP flag

* Updated README

* Removed unused header

* Add util function/macro (#24)

* Add util function/macro

* Minor modifications
- Changed PARALLEL_PROCESS_NUM to IPCL_CRYPTO_MB_SIZE
- Replaced BigNum macros (BITSIZE_WORD and BITSIZE_DWORD) with functions in BigNum

Co-authored-by: Sejun Kim <sejun.kim@intel.com>

* Updated readme (#25)

* Add support for multi cpu architecture (#28)

* Add support for multi cpu architecture(i.e. when cpu doesn't support avx512 instructions)

* OpenMP enabling cleanup

* Skmono/decrypt raw refactoring (#29)

* Modified decryptRAW to use m_pubkey->ippMultiBuffExp
* Replaced "avx512" with "avx512ifma" - mbx_exp_mb8 works only with ifma instructions
* Removed testing code

* Renamed OMP compiler flag to IPCL_USE_OMP

* Renamed ippMultiBuffExp and ippMontExp
- ippMultiBuffExp -> ippMBModExp
- ippMontExp -> ippSBModExp
- put both multi and single buffered mod exp to private
- only expose ippModExp that will take care of any modular exponentiation

* bugfix - updated remaining ippMontExp

Co-authored-by: Sejun Kim <sejun.kim@intel.com>

* Updated README on flags (#32)

* Updated README (#36)

* Fix decryptRAW incorrect result issue (#37)

* Added support for Ipp8u vector retrieval of BigNumber for QAT integration (#38)

* Move Mod Exp to seperate file (#39)

* Move modular exponentation to seperate file
* Remove unused function IPP_invert

Co-authored-by: Pengfei Zhao <pengfei.zhao@intel.com>
skmono pushed a commit that referenced this pull request Nov 16, 2022
Add Multithread Support 
### New Interfaces

- `acquire_bnModExp_buffer`: It allows a thread to lock an internal buffer for its sole use until its work completion.

```
HE_QAT_STATUS acquire_bnModExp_buffer(unsigned int* _buffer_id);
```
- `HE_QAT_bnModExp_MT`: It is modular exponentiation API for a multithreaded process that calls the API from concurrent threads in the same process. This API is non-blocking by the default and meant to be used in a for loop designated to send multiple requests of modular exponentiation to the QAT accelerator. 

```
HE_QAT_STATUS HE_QAT_bnModExp_MT(unsigned int _buffer_id, unsigned char* r,
                                 unsigned char* b, unsigned char* e,
                                 unsigned char* m, int nbits);
```
- `HE_QAT_bnModExp_MT`: It stalls the thread until the work sent to the accelerator is completed, upon which the internal buffer used by that thread is released and ready to be acquired by another thread.

``` 
void release_bnModExp_buffer(unsigned int _buffer_id, unsigned int _batch_size);
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants