meejah
464498f6bf
Merge branch 'master' into 2916.grid-manager-proposal.6
2023-02-20 11:24:20 -07:00
Jean-Paul Calderone
1a807a0232
mollify the type checker
2023-01-12 16:32:32 -05:00
Jean-Paul Calderone
e893d06cb3
RSAPrivateKey certainly does have this method
...
I don't know why mypy fails to see it.
2023-01-06 21:00:21 -05:00
Jean-Paul Calderone
8c56ccad72
fall back to *with* validation, not without
2023-01-06 21:00:10 -05:00
Jean-Paul Calderone
85234b07a0
load the right kind of key!
2023-01-06 21:00:04 -05:00
Jean-Paul Calderone
a806b2faba
Fix some more mypy errors
2023-01-06 18:11:47 -05:00
Jean-Paul Calderone
01b14fe05c
Merge remote-tracking branch 'origin/master' into 3962.pre-determined-rsa-keys
2023-01-06 17:30:01 -05:00
Jean-Paul Calderone
2dc6466ef5
fix some errors reported by mypy
2023-01-06 17:12:59 -05:00
Jean-Paul Calderone
f6d9c33526
Give slightly better error messages from rsa key validation failure
2023-01-03 10:28:59 -05:00
Jean-Paul Calderone
23f2d8b019
add some type annotations to allmydata.crypto.rsa
2023-01-03 10:28:32 -05:00
Jean-Paul Calderone
15e22dcc52
Add keypair
to NodeMaker.create_mutable_file
...
Previously `NodeMaker` always took responsibility for generating a keypair to
use. Now the caller may supply one.
2023-01-02 19:29:13 -05:00
Jean-Paul Calderone
c014ad55b1
remove Python 2 boilerplate
2022-12-14 08:48:02 -05:00
Jean-Paul Calderone
05c7450376
Try to use an upcoming python-cryptography feature to avoid some costs
...
If the key is the wrong number of bits then we don't care about any other
validation results because we're just going to reject it. So, check that
before applying other validation, if possible.
This is untested since the version of python-cryptography that supports it is
not released yet and I don't feel like setting up a Rust build tool chain at
the moment.
2022-12-14 08:47:05 -05:00
Itamar Turner-Trauring
6cf3bc75b6
Some Python 3 cleanups.
2022-07-18 11:09:19 -04:00
meejah
2928a480ff
RSA key-size is not configurable, it's 2048bits
2022-02-16 21:46:24 -07:00
meejah
eddfd244a7
code and tests to check RSA key sizes
2021-10-26 13:37:26 -06:00
Itamar Turner-Trauring
70c0607789
Enable BytesWarning across all tests ported to Python 3, fixing problems that caught.
2021-02-24 14:36:15 -05:00
Itamar Turner-Trauring
70851fe753
Death to newint.
2020-08-05 11:53:23 -04:00
Itamar Turner-Trauring
24729dbd61
Port to Python 3.
2020-08-03 11:06:46 -04:00
meejah
30a91a1106
public RSA exponent 17 -> 65537
2020-07-21 00:29:35 -06:00
meejah
c2c2eda52e
bytes
2019-07-08 14:16:28 -06:00
meejah
0ab149248b
better docstrings
2019-07-08 12:46:30 -06:00
meejah
5644f421fe
get rid of ed25519.bytes_from_* methods
2019-07-08 12:46:22 -06:00
meejah
016413be46
unused import
2019-06-26 01:23:39 -06:00
meejah
56cf188c90
provide IEncryptor and IDecryptor interfaces
2019-06-26 01:21:05 -06:00
meejah
a22d2d8bcf
constant for the padding, too
2019-06-25 22:43:33 -06:00
meejah
745805378c
typo
2019-06-25 16:59:41 -06:00
meejah
5ce01ad9c1
metter docstrings
2019-06-25 14:35:19 -06:00
meejah
2c5cbbb095
raise instance, not class
2019-06-24 16:57:12 -06:00
meejah
29d2e32cb0
more bytes clarification
2019-06-24 16:57:12 -06:00
meejah
e670921f56
prefixes are bytes
2019-06-24 16:57:09 -06:00
meejah
05f6b7fea0
refactor ed25519 a little; only _string variants, not _bytes of deserializers and some imports
2019-06-24 15:31:46 -06:00
meejah
e5b892d700
raise instance, not class
2019-06-24 12:29:17 -06:00
meejah
14a0481d71
string -> comment
2019-06-24 12:27:09 -06:00
meejah
5701bad548
a module for errors
2019-06-24 12:12:10 -06:00
meejah
58e0b27374
better docstring
2019-06-24 11:57:56 -06:00
meejah
fd2934cb79
returns bytes
2019-06-24 11:45:38 -06:00
meejah
f253235c96
the IV is bytes
2019-06-24 11:41:46 -06:00
meejah
b7990264e8
module docstring
2019-06-24 11:41:26 -06:00
meejah
d2ad803b5d
add a docstring for allmydata.crypto.
2019-06-24 11:29:34 -06:00
meejah
a88b53825c
move utility functions to their own module, better docs on remote_prefix
2019-06-24 11:27:15 -06:00
meejah
bf16cf4c03
fix url
2019-06-23 11:25:59 -06:00
meejah
ce27c2ee24
use public_exponent 17 to match what was in use before
2019-06-23 00:28:41 -06:00
meejah
9e5b6f1d0e
better comment, cleanup
2019-06-17 22:16:50 -06:00
meejah
a27a5ce581
test all error-cases, and some fixups
2019-06-17 21:56:06 -06:00
meejah
802f1afde6
fix and clarify docstrings
2019-06-17 19:16:39 -06:00
meejah
a36f2a8dc7
better docstrings
2019-06-17 18:57:42 -06:00
meejah
c2fbbe4f46
add docstrings
2019-06-17 18:55:26 -06:00
meejah
d0296b9ae8
redundant
2019-06-17 17:12:22 -06:00
meejah
310fb60247
move AES to a helper-function style
2019-06-17 15:54:46 -06:00