Skip to content

Commit

Permalink
update ferveo typings
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-roslaniec committed Jul 11, 2023
1 parent 5e88118 commit 2e7b989
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion nucypher-core-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]
pyo3 = "0.18"
nucypher-core = { path = "../nucypher-core" }
umbral-pre = { version = "0.10.0", features = ["bindings-python"], git = "https://github.com/piotr-roslaniec/rust-umbral.git", ref = "4b28a85c494e4e2640abb131460da0680a74134d" }
ferveo = { package = "ferveo-pre-release", version = "0.2.0", features = ["bindings-python"], git = "https://github.com/nucypher/ferveo.git", ref = "4fcc7c0ad33c05b0d956378efed3858c2a389885" }
ferveo = { package = "ferveo-pre-release", version = "0.2.0", features = ["bindings-python"], git = "https://github.com/nucypher/ferveo.git", ref = "7cbe65def65a76043d21763723ce98787cbf8eed" }
derive_more = { version = "0.99", default-features = false, features = ["from", "as_ref"] }

[build-dependencies]
Expand Down
27 changes: 12 additions & 15 deletions nucypher-core-python/nucypher_core/ferveo.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ class Keypair:
...

@staticmethod
def from_secure_randomness(bytes: bytes) -> Keypair:
def from_secure_randomness(secure_randomness: bytes) -> Keypair:
...

@staticmethod
def secure_randomness_size() -> int:
...

@staticmethod
def from_bytes(bytes: bytes) -> Keypair:
def from_bytes(data: bytes) -> Keypair:
...

def __bytes__(self) -> bytes:
Expand All @@ -27,7 +27,7 @@ class Keypair:
@final
class FerveoPublicKey:
@staticmethod
def from_bytes(bytes: bytes) -> FerveoPublicKey:
def from_bytes(data: bytes) -> FerveoPublicKey:
...

def __bytes__(self) -> bytes:
Expand All @@ -53,7 +53,7 @@ class Validator:
@final
class Transcript:
@staticmethod
def from_bytes(bytes: bytes) -> Transcript:
def from_bytes(data: bytes) -> Transcript:
...

def __bytes__(self) -> bytes:
Expand All @@ -62,7 +62,7 @@ class Transcript:
@final
class DkgPublicKey:
@staticmethod
def from_bytes(bytes: bytes) -> DkgPublicKey:
def from_bytes(data: bytes) -> DkgPublicKey:
...

def __bytes__(self) -> bytes:
Expand Down Expand Up @@ -109,7 +109,7 @@ class Dkg:
@final
class Ciphertext:
@staticmethod
def from_bytes(bytes: bytes) -> Ciphertext:
def from_bytes(data: bytes) -> Ciphertext:
...

def __bytes__(self) -> bytes:
Expand All @@ -118,15 +118,15 @@ class Ciphertext:
@final
class DecryptionShareSimple:
@staticmethod
def from_bytes(bytes: bytes) -> DecryptionShareSimple:
def from_bytes(data: bytes) -> DecryptionShareSimple:
...

def __bytes__(self) -> bytes:
...
@final
class DecryptionSharePrecomputed:
@staticmethod
def from_bytes(bytes: bytes) -> DecryptionSharePrecomputed:
def from_bytes(data: bytes) -> DecryptionSharePrecomputed:
...

def __bytes__(self) -> bytes:
Expand Down Expand Up @@ -160,7 +160,7 @@ class AggregatedTranscript:
...

@staticmethod
def from_bytes(bytes: bytes) -> AggregatedTranscript:
def from_bytes(data: bytes) -> AggregatedTranscript:
...

def __bytes__(self) -> bytes:
Expand All @@ -170,7 +170,7 @@ class AggregatedTranscript:
class SharedSecret:

@staticmethod
def from_bytes(bytes: bytes) -> SharedSecret:
def from_bytes(data: bytes) -> SharedSecret:
...

def __bytes__(self) -> bytes:
Expand All @@ -179,11 +179,8 @@ class SharedSecret:

@final
class FerveoVariant:
@staticmethod
def simple() -> str: ...

@staticmethod
def precomputed() -> str: ...
simple: str
precomputed: str


def encrypt(message: bytes, aad: bytes, dkg_public_key: DkgPublicKey) -> Ciphertext:
Expand Down
2 changes: 1 addition & 1 deletion nucypher-core-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ default = ["console_error_panic_hook"]

[dependencies]
umbral-pre = { version = "0.10.0", features = ["bindings-wasm"], git = "https://github.com/piotr-roslaniec/rust-umbral.git", ref = "4b28a85c494e4e2640abb131460da0680a74134d" }
ferveo = { package = "ferveo-pre-release", version = "0.2.0", features = ["bindings-wasm"], git = "https://github.com/nucypher/ferveo.git", ref = "4fcc7c0ad33c05b0d956378efed3858c2a389885" }
ferveo = { package = "ferveo-pre-release", version = "0.2.0", features = ["bindings-wasm"], git = "https://github.com/nucypher/ferveo.git", ref = "7cbe65def65a76043d21763723ce98787cbf8eed" }
nucypher-core = { path = "../nucypher-core" }
wasm-bindgen = "0.2.86"
js-sys = "0.3.63"
Expand Down
2 changes: 1 addition & 1 deletion nucypher-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ categories = ["cryptography", "no-std"]

[dependencies]
umbral-pre = { version = "0.10.0", features = ["serde"], git = "https://github.com/piotr-roslaniec/rust-umbral.git", ref = "4b28a85c494e4e2640abb131460da0680a74134d" }
ferveo = { package = "ferveo-pre-release", version = "0.2.0", git = "https://github.com/nucypher/ferveo.git", ref = "4fcc7c0ad33c05b0d956378efed3858c2a389885" }
ferveo = { package = "ferveo-pre-release", version = "0.2.0", git = "https://github.com/nucypher/ferveo.git", ref = "7cbe65def65a76043d21763723ce98787cbf8eed" }
serde = { version = "1", default-features = false, features = ["derive"] }
generic-array = { version = "0.14", features = ["zeroize"] }
sha3 = "0.10"
Expand Down

0 comments on commit 2e7b989

Please sign in to comment.