Commit Graph

96 Commits

Author SHA1 Message Date
Clément 'birdy' Danjou
7fd2c20a9c fix: regenerate codegen 2024-05-28 17:26:24 +02:00
Clément 'birdy' Danjou
1e76d443ce fix: fix bug on require 2024-05-28 16:41:06 +02:00
Clément 'birdy' Danjou
a46463c835 test: many fixes 2024-05-27 15:26:24 +02:00
Clément 'birdy' Danjou
82b50abb1c fix: remove length from call to fhevm-go 2024-05-27 14:56:20 +02:00
Clément 'birdy' Danjou
b17ebc7d55 feat: various fixes regarding array eq 2024-05-23 16:37:51 +02:00
Clément 'birdy' Danjou
6d11c5e768 feat: add array equality 2024-05-23 15:05:14 +02:00
Levent DEMIR
d98c02f61e chore: run prettier 2024-04-09 14:06:54 +02:00
Joseph-André Turk
4a8c703bdd fix: runned codegen 2024-04-09 13:59:49 +02:00
jat
461a0364e5 Merge branch 'main' into fix/euint160_nooracleservicechange 2024-04-09 13:32:13 +02:00
Joseph-André Turk
8020ac583a fix: eaddress 2024-04-09 11:04:25 +02:00
Levent DEMIR
53edf79780 feat: add select for eaddress 2024-04-05 16:15:17 +02:00
Levent DEMIR
6b055cc241 chore: update asEaddress from value (cast to uint160) 2024-04-05 08:55:34 +02:00
Clément 'birdy' Danjou
0f6dd3bb06 feat: add rotl and rotr 2024-04-04 15:27:07 +02:00
Levent DEMIR
e209353400 chore: add reencrypt 2024-04-03 16:49:06 +02:00
Levent DEMIR
9910e4da0f chore: use decrypt function name for eaddress also 2024-04-03 16:49:06 +02:00
Levent DEMIR
2d336dda3a chore: consistency for naming 2024-04-03 16:49:06 +02:00
Levent DEMIR
5ee434a663 feat(eaddress): add eaddress with (scalar) ne and (scalar) eq 2024-04-03 16:49:03 +02:00
Clément 'birdy' Danjou
fd2308b95e feat: addn randEuint64() 2024-03-28 14:57:20 +01:00
Clément 'birdy' Danjou
faad51a6ea feat: introduce select in place of cmux 2024-03-08 11:31:53 +01:00
Clément 'birdy' Danjou
756e4e6dae refactor: remove deprecated optReq 2024-03-08 03:34:30 +01:00
Joseph-André Turk
c95296d2b6 fix: updated mocked mode to be compatible with new types 2024-03-05 16:31:16 +01:00
Clément 'birdy' Danjou
9386803f0c fix: convert bool to euint8 for optReq 2024-02-28 20:23:37 +01:00
Clément 'birdy' Danjou
b511101b1b feat: add 4bits 2024-02-28 14:03:52 +01:00
Clément 'birdy' Danjou
71ddad9a77 fix: fix ebool_t 2024-02-28 01:55:48 +01:00
Clément 'birdy' Danjou
31dbeced23 fix: update Lib for new ebool type 2024-02-28 01:37:11 +01:00
Joseph-André Turk
3da0ab9e8a feat: added TFHE.isInitialized function for ebool type
fix: fixed package.json

fix: fixed prettier
2024-02-20 11:42:42 +01:00
Clément 'birdy' Danjou
dc18f050e0 feat: add 64bits support 2024-02-09 10:04:55 +01:00
Petar Ivanov
fe1e97065e feat: add upper bound for encrypted random integers
Add overloads of TFHE.randEuint() methods that accept an upper bound,
e.g. TFHE.randEuint32(uint32 upperBound). The returned integer will be
in the [0, upperBound) range. Moreover, upperBound must be a power of
2 - that is a design choice for performance reasons.

Note that, as of now, the random numbers are generated in the plain and
are completely public and predictable. An FHE version is coming soon.

Add tests to cover above functionality.
2024-01-09 17:17:40 +02:00
Joseph-André Turk
535b055fc8 Updated Solidity version to ^0.8.20 and OpenZeppelin Contracts to ^5.0.1
updated to ethermint node

updated node dev version

removed parallel flag from hardhat test

reput inband test for ci

setup evm version to Paris to avoid PUSH0 error and updated hardhat version

removed utils.ts.new file

synced package.json and package-lock.json

prettier
2024-01-09 11:05:38 +01:00
Clément 'birdy' Danjou
616f99823b feat() use new cmux 2024-01-08 15:35:51 +01:00
Joseph-André Turk
bc6649def1 made shl and shr more consistent with cleartext shift operators by restraining second operand to 8 bits
reset signers.ts

made shl and shr more consistent with cleartext shift operators by restraining second operand to 8 bits
2023-12-21 10:36:21 +01:00
David
edd0e11ecf Fix ebool not + tests for ebool ops 2023-11-27 11:44:22 +08:00
Clément 'birdy' Danjou
444b57f962 feat() Add xor operator for ebool 2023-11-13 12:59:31 +01:00
Clément Danjou
089e0d3d9a Merge pull request #211 from zama-ai/ebool-method-and-cmux-not
feat() Add method for ebool (not,and,or,cmux)
2023-10-28 00:51:14 +02:00
Clément 'birdy' Danjou
8c7b475ad2 fix() update comment 2023-10-27 15:15:43 +02:00
Clément 'birdy' Danjou
ea2a0385ce feat() Add method for ebool (not,and,or,cmux) 2023-10-26 10:58:13 +02:00
David
bd581422e5 Add network1 development support 2023-10-24 10:56:15 +08:00
youben11
d35e512aa0 feat(lib): add support for the remainder operation 2023-10-10 14:58:18 +01:00
David
0b1eca810e Add stateful opt req test 2023-10-09 12:41:31 +08:00
David
ba72900223 Fix optimistic requires 2023-10-06 11:19:18 +08:00
David
e68a07fc4e Add explicit casting from ebool to euint16/euint32 2023-10-02 12:35:19 +08:00
Clément 'birdy' Danjou
cb1b8a27f1 fix() force 0.8.19 2023-09-25 16:37:13 +02:00
Clément 'birdy' Danjou
59f3480e3f fix() force 0.8.19 version for everything 2023-09-25 16:03:23 +02:00
David
3484393b75 Remove Precompiles.sol 2023-09-21 11:53:30 +03:00
David
3d133c6951 Implement operator overloading
following operators are supported:
+, - (unary and binary), *, &, |, ^, ~ (unary)
2023-09-21 10:16:47 +03:00
David
f9a7ee72bf Use fheLib precompile for all internal functions 2023-09-19 14:29:01 +03:00
Petar Ivanov
6e35f79e87 Fix input type for the fheRand precompile
Change from bytes32[1] to bytes1[1] as we only send 1 byte for the int
type.

Fix compiler warning in GovernorZama.sol.
2023-09-14 15:06:36 +03:00
David
5393f61a50 Changes after codegen 2023-09-14 14:44:11 +03:00
Petar Ivanov
323b991765 Add support for the FHE rand precompile
At the moment, the underlying implementation is using a plaintext
PRNG. Because of that, we put a warning for users to be aware of.

Support generation of 8, 16 and 32-bit unsigned integers. Users call it
by `TFHE.randEuint32()` and so on for other types. Can only be called in
transactions - calling it in view functions will fail.

Add tests.

Finally, update the `fhevmjs` dependency to `~0.2.0`.
2023-09-07 15:18:52 +02:00
Louis Tremblay Thibault
7079aa15ad Remove TFHE.req (#121)
* fix(lib): remove requires

* fix(contracts): remove use of `TFHE.req`
2023-09-06 16:19:10 +02:00