herumi / mcl

a portable and fast pairing-based cryptography library
BSD 3-Clause "New" or "Revised" License
458 stars 157 forks source link

how encrypt an "byte series" #52

Closed mccoysc closed 5 years ago

mccoysc commented 5 years ago

as the title: i have a byte array: char a[64]={}; how can i encrypt a to EncG1 or EncG2? i need encryt every byte using many encryption loops?

mccoysc commented 5 years ago

in example ,i just found that encG1 to encrypt a integer number. no any example for encrypt a memory buffer.

mccoysc commented 5 years ago

@herumi

herumi commented 5 years ago

she.hpp is homomorphic encryption, so encG1 supports only integer.

mccoysc commented 5 years ago

can add bigNumber support? then memory buffer can transfer to bignumber and can run as "integer"

mccoysc commented 5 years ago

@herumi

mccoysc commented 5 years ago

like this bignumber library: https://github.com/Limeoats/BigNumber

mccoysc commented 5 years ago

and this one https://github.com/kokke/tiny-bignum-c

herumi commented 5 years ago

can add bigNumber support?

No. my homomorphic encryption algorithm supports one multiplication of ciphertexts for small integers, so it is difficult to deal with generic big integers.