hyperledger / besu-native

Apache License 2.0
12 stars 35 forks source link

Add gnark mimc #106

Closed matkt closed 1 year ago

matkt commented 1 year ago

Add gnark mimc to the besu native project

Tested if we have memory link thanks to Visual VM and it's fine

 public static void main(String[] args) {
        for (int j = 0; j < 1000000000; j++) {
            MutableBytes input = MutableBytes.of(new byte[Bytes32.SIZE*16]);
            for (int i = 0; i < 16; i++) {
                input.set(Bytes32.SIZE*(i+1)-i,((byte)((byte) i+(byte) j)));
            }
            byte[] output = new byte[Bytes32.SIZE];
            LibMimc.compute(input.toArrayUnsafe(), input.size(), output);
            System.out.println(Bytes32.wrap(output));
        }

    }

image

github-advanced-security[bot] commented 1 year ago

You have successfully added a new CodeQL configuration /language:java. As part of the setup process, we have scanned this repository and found 7 existing alerts. Please check the repository Security tab to see all alerts.