mithril-security / blindai

Confidential AI deployment with secure enclaves :lock:
https://www.mithrilsecurity.io/
Apache License 2.0
502 stars 36 forks source link

Export proofs, python tests and some refactor #48

Closed cchudant closed 2 years ago

cchudant commented 2 years ago

Description

I am sorry this PR is big :sweat_smile:

Future work

Related Issue

Closes #37

Type of change

How Has This Been Tested?

Added unit tests for the new api surface

Checklist:

cchudant commented 2 years ago

I am confused about why this is not building.. I haven't changed the attestation lib build...

@JoFrost @CerineBnsd do you have any idea?

JoFrost commented 2 years ago

You did not change anything in the build process? Did you rename the library somewhere?

cchudant commented 2 years ago

You did not change anything in the build process? Did you rename the library somewhere?

@JoFrost I did not touch anything regarding the build process except adding a protobuf file

JoFrost commented 2 years ago

I will test the build process locally

CerineBnsd commented 2 years ago

You did not change anything in the build process? Did you rename the library somewhere?

I did not touch anything regarding the build process except adding a protobuf file

I was testing this as well, I used your same 'setup.py' with the master branch and the build happens normally, for some reason, the extension (pybin11 module) is being built before the attestation library and that's why it's failing, I'll continue seeing with it as well.

CerineBnsd commented 2 years ago

You did not change anything in the build process? Did you rename the library somewhere?

I did not touch anything regarding the build process except adding a protobuf file

I was testing this as well, I used your same 'setup.py' with the master branch and the build happens normally, for some reason, the extension (pybin11 module) is being built before the attestation library and that's why it's failing, I'll continue seeing with it as well.

@cchudant You should add an empty __init__.py in the blindai folder, 'find_package' function in setup.py will use it to detect that blindai folder is a package.

CerineBnsd commented 2 years ago

@cchudant You should add another one in utils folder as well.

cchudant commented 2 years ago

Proofs can now be ""verified"" in simulation mode using allow_simulation_mode=true in validate() The CI was not working because i broke simulation mode but now it's fixed

Also, I fixed the fact that you should be able to use simulation mode without policy file, thank you @CerineBnsd for pointing that out :)