mirror of https://github.com/nucypher/nucypher.git
updates nucypher-core and umbral usage
parent
5ab634688b
commit
3d16cecaa5
|
@ -458,6 +458,7 @@ class Bob(Character):
|
|||
|
||||
if not publisher_verifying_key:
|
||||
publisher_verifying_key = alice_verifying_key
|
||||
publisher_verifying_key = PublicKey.from_compressed_bytes(publisher_verifying_key.to_compressed_bytes())
|
||||
|
||||
# A small optimization to avoid multiple treasure map decryptions.
|
||||
map_hash = hash(bytes(encrypted_treasure_map))
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
|
||||
|
||||
from cryptography.hazmat.primitives import hashes
|
||||
|
||||
UMBRAL_SECRET_KEY_SIZE = 32
|
||||
|
||||
# Policy component sizes
|
||||
SIGNATURE_SIZE = 64
|
||||
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
|
||||
from pathlib import Path
|
||||
from typing import Optional, Union
|
||||
|
||||
import sha3
|
||||
from OpenSSL.SSL import TLSv1_2_METHOD
|
||||
from OpenSSL.crypto import X509
|
||||
|
@ -9,14 +5,13 @@ from constant_sorrow import constants
|
|||
from cryptography.hazmat.primitives.asymmetric import ec
|
||||
from hendrix.deploy.tls import HendrixDeployTLS
|
||||
from hendrix.facilities.services import ExistingKeyTLSContextFactory
|
||||
|
||||
from nucypher_core import (
|
||||
MessageKit,
|
||||
EncryptedTreasureMap,
|
||||
EncryptedKeyFrag,
|
||||
HRAC,
|
||||
TreasureMap,
|
||||
)
|
||||
)
|
||||
from nucypher_core.umbral import (
|
||||
SecretKey,
|
||||
PublicKey,
|
||||
|
@ -24,6 +19,8 @@ from nucypher_core.umbral import (
|
|||
Signer,
|
||||
VerifiedKeyFrag,
|
||||
)
|
||||
from pathlib import Path
|
||||
from typing import Optional, Union
|
||||
|
||||
from nucypher.config.constants import MAX_UPLOAD_CONTENT_LENGTH
|
||||
from nucypher.crypto.signing import SignatureStamp, StrangerStamp
|
||||
|
|
|
@ -1,25 +1,20 @@
|
|||
from json import JSONDecodeError
|
||||
from os.path import abspath
|
||||
|
||||
|
||||
|
||||
import click
|
||||
import json
|
||||
import os
|
||||
import stat
|
||||
import string
|
||||
import time
|
||||
from json import JSONDecodeError
|
||||
from os.path import abspath
|
||||
from constant_sorrow.constants import KEYSTORE_LOCKED
|
||||
from mnemonic.mnemonic import Mnemonic
|
||||
from nucypher_core.umbral import SecretKeyFactory
|
||||
from pathlib import Path
|
||||
from secrets import token_bytes
|
||||
from typing import Callable, ClassVar, Dict, List, Union, Optional, Tuple
|
||||
|
||||
import click
|
||||
from constant_sorrow.constants import KEYSTORE_LOCKED
|
||||
from mnemonic.mnemonic import Mnemonic
|
||||
|
||||
from nucypher_core.umbral import SecretKey, SecretKeyFactory
|
||||
|
||||
from nucypher.config.constants import DEFAULT_CONFIG_ROOT
|
||||
from nucypher.utilities.emitters import StdoutEmitter
|
||||
from nucypher.crypto.keypairs import HostingKeypair
|
||||
from nucypher.crypto.passwords import (
|
||||
secret_box_decrypt,
|
||||
|
@ -37,6 +32,7 @@ from nucypher.crypto.powers import (
|
|||
TLSHostingPower,
|
||||
)
|
||||
from nucypher.crypto.tls import generate_self_signed_certificate
|
||||
from nucypher.utilities.emitters import StdoutEmitter
|
||||
|
||||
# HKDF
|
||||
__INFO_BASE = b'NuCypher/'
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
from nucypher_core.umbral import Signer
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
|
||||
|
||||
import datetime
|
||||
from ipaddress import IPv4Address
|
||||
from pathlib import Path
|
||||
from typing import ClassVar, Optional, Tuple
|
||||
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.backends.openssl.ec import _EllipticCurvePrivateKey
|
||||
|
@ -14,7 +8,9 @@ from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve
|
|||
from cryptography.hazmat.primitives.serialization import Encoding
|
||||
from cryptography.x509 import Certificate
|
||||
from cryptography.x509.oid import NameOID
|
||||
from nucypher_core.umbral import SecretKey
|
||||
from ipaddress import IPv4Address
|
||||
from pathlib import Path
|
||||
from typing import ClassVar, Optional, Tuple
|
||||
|
||||
_TLS_CERTIFICATE_ENCODING = Encoding.PEM
|
||||
_TLS_CURVE = ec.SECP384R1
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
|
||||
import sha3
|
||||
from constant_sorrow.constants import PUBLIC_ONLY
|
||||
|
||||
from nucypher_core.umbral import SecretKey
|
||||
|
||||
from nucypher.crypto import keypairs
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
|
||||
|
||||
|
||||
import os
|
||||
import random
|
||||
import string
|
||||
|
@ -13,6 +10,7 @@ from mnemonic.mnemonic import Mnemonic
|
|||
|
||||
from nucypher_core.umbral import SecretKey, SecretKeyFactory
|
||||
|
||||
from nucypher.crypto.constants import UMBRAL_SECRET_KEY_SIZE
|
||||
from nucypher.crypto.keystore import (
|
||||
Keystore,
|
||||
InvalidPassword,
|
||||
|
|
Loading…
Reference in New Issue