39 Commits

Author SHA1 Message Date
Tony Arcieri
c611408a2e
v0.9.0 (#318) 2023-04-27 12:57:20 -06:00
Dmitry Baryshkov
284fd79c1f
Remove primitive traits (#300)
The crate contains several exported traits targeting
hardware-accelerated implementations (PublicKey, PrivateKey,
EncryptionPrimitive, DecriptionPrimitive). However these traits
overcomplicate internal structure of the crate. It is not clear, which
level of API can be implemented by the hardware accelerators.
The crate is already quite complicated, implementing both
PaddingScheme-based API and Signer/Verifier/Encryptor/Decryptor API.

Remove the complication for now. The proper level of indirection can be
introduced once support for actual hardware accelerators is implemented.

Inline and drop the RsaPrivateKey::raw_decryption_primitive() function.
There is no need to zeroize argument, it is ciphertext, so it can be
assumed to be safe.

Change raw_int_decryption_primitive() and raw_int_decryption_primitive()
to output Result<BigUint> instead of Result<Vec<u8>>, because they also
take BigUint rather than Vec<u8> or &[u8].

In order to simplify adding support for RSA hardware accelerators, move
all formatting and padding functions to a separate modules, making it
theoretically possible to use that for implementing support for
low-level RSA hardware accelerators.

Also follows the pkcs1v15 change and use BigUint as a Signature's
internal implementation.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-04-19 08:51:06 -06:00
Tony Arcieri
55462794bd
README.md: consistency fixups (#288)
- Add "RustCrypto:" to crate title
- Use badge from buildstats.info that displays downloads
2023-04-05 13:57:05 -06:00
Tony Arcieri
bdf7609e18
README.md: link to officially hosted audit report (#287) 2023-04-05 08:45:37 -06:00
Rickard Hallerbäck
eb60db6cd6
Fix README example (#276) 2023-03-24 09:26:46 -06:00
Tony Arcieri
54ddb2802f
Bump pkcs1 to v0.7, pkcs8 to v0.10; MSRV 1.65 (#270) 2023-03-06 13:31:16 -07:00
Tony Arcieri
99397db9ca
Use namespaced features for serde; MSRV 1.60 (#268)
Reverts-the-revert from #254, reinstating #251

This reverts commit 26f38ad66a09fc42ed6d73e3b1864f0251db4e2d.

Since we need to upgrade `pkcs1` and `pkcs8`, which are MSRV 1.65, now
is a good time to start making brekaing changes again.
2023-03-05 18:34:51 -07:00
Tony Arcieri
26f38ad66a
Revert "Use namespaced features for serde; MSRV 1.60 (#251)" (#254)
This reverts commit da1997d0b786181f3e3375e3eef09899486a3833.

I was probably over-eager on this: it's a breaking change.

There are probably some non-breaking changes we can make first, and when
we're ready to make breaking changes again, we can revert the revert.
2023-01-19 16:26:52 -07:00
Tony Arcieri
da1997d0b7
Use namespaced features for serde; MSRV 1.60 (#251)
Gets rid of the `serde_crate` hacks.

Weak/namespaced features should also make it possible to make more of
the functionality in this crate optional.
2023-01-17 09:20:29 -07:00
Quentin Gliech
2b8b7dd4bb
Bump pkcs1 => 0.4, pkcs8 => 0.9 (#162)
Also bumps MSRV to 1.57
2022-05-23 20:44:33 -06:00
Artyom Pavlov
cf27569687
Replace rand dependency with rand_core (#148) 2022-03-13 19:50:05 +00:00
Tony Arcieri
e4366a7e8f Bump pkcs1 => v0.3, pkcs8 => v0.8; MSRV 1.56
Updates the `pkcs1` and `pkcs8` crates to their latest versions.

These releases reversed the blanket impl relationship between the traits
in the two respective crates.

The names of the traits have changed:
- `From*Key` => `Decode*Key` (e.g. `DecodePrivateKey`)
- `To*Key` => `Encode*Key` (e.g. `EncodePrivateKey`).

Previously there was a blanket impl of `pkcs8` traits for the `pkcs1`
crates, e.g. `DecodePrivateKey` was impl'd for `DecodeRsaPrivateKey`.

This relationship has been reversed in the latest releases, and as such
this commit now implements the `pkcs8` traits instead of the `pkcs1`
traits (even though this internally involves decoding a PKCS#1 document
as part of PKCS#8 decoding).

The reasoning is this was necessary to make it possible for traits for
multiple formats to have blanket impls for the PKCS#8 traits. Concretely
this was needed to allow blanket impls of the traits in the `sec1` crate
for types which impl traits from the `pkcs8` crate.

Both of these crates are MSRV 1.56 and hard dependencies, so the MSRV of
the `rsa` crate is accordingly bumped to 1.56.
2022-01-16 10:57:11 -07:00
Marcin
3b7ee867a7
docs(readme): update to match the documentation example 2021-12-06 12:35:16 +01:00
william
9d8e8e5ffa
Add missing RsaPublicKey import (#119) 2021-12-03 08:05:07 -07:00
Tony Arcieri
fc9c69b988 README.md: use Unicode emoji
The `:emoji:` tags are part of GitHub Flavored Markdown and don't render
correctly on https://crates.io
2021-07-27 08:54:10 -07:00
dignifiedquire
7a1eaa0329 refactor: rename RSA* to Rsa
This matches the rust naming convention better.

Closes #24
2021-07-26 23:25:13 +02:00
Tony Arcieri
f251dee5a9
Use pkcs1 and pkcs8 crates; MSRV 1.51+ (#104)
This is an initial attempt to switch the `rsa` crate to use the `pkcs1`
and `pkcs8` crates from https://github.com/rustcrypto/utils
2021-07-26 13:57:23 -07:00
est31
12336e2467
docs(readme): only optimizing num-bigint-dig is enough to unlock most speedups 2021-07-26 22:44:31 +02:00
Zicklag
9559d99fa8
docs(readme): add Note About Key Generation Speed 2021-07-26 10:58:58 +02:00
Artyom Pavlov
4cd2b6a030
remove redundant newline 2021-02-12 22:16:46 +00:00
Artyom Pavlov
422ef53c7b
Add deps.rs and chat badges 2021-02-12 22:15:12 +00:00
dignifiedquire
0e6431bcb2 docs(readme): add note about MSRV policy 2020-12-02 17:49:18 +01:00
dignifiedquire
2012ea5323 feat: bump dependencies and MSRV to 1.44 accordingly 2020-12-02 17:14:21 +01:00
Zicklag
c1421d0ad9
docs(readme): update with audit note 2020-11-30 11:07:40 +01:00
Amos Wenger
c2e9ccd865
Update README.md (#70) 2020-11-24 06:01:04 -08:00
Tony Arcieri
267111836b README.md: remove deps.rs badge + bump MSRV badge 2020-06-11 12:07:03 -07:00
dignifiedquire
0b9564cbe0 update readme 2020-03-06 21:11:24 +01:00
dignifiedquire
b50fa5238e refactor: bring oaep implementation into the regular interface 2020-03-06 20:05:24 +01:00
Friedel Ziegelmayer
e38553f8e8
feat: update dependencies 2019-12-11 01:15:49 +01:00
Patrick D Hayes
f2399316bf docs(readme): removing duplicate imports in example code 2019-03-18 12:59:06 +01:00
dignifiedquire
057f77535d docs: add basic example for encryption and decryption 2019-02-20 20:54:35 +01:00
dignifiedquire
e825ced1a2 docs(readme): update status 2019-02-20 20:29:49 +01:00
Artyom Pavlov
d3e5d89e31 docs: minor post-transfer changes
* post-transfer changes
* fix badges and CI
* improve license section
2018-12-03 11:47:09 +01:00
dignifiedquire
ab958f4626 docs(readme): update progress 2018-11-07 14:09:31 +01:00
dignifiedquire
1a6c9a9487 docs(readme): update progress 2018-07-24 22:05:29 +02:00
dignifiedquire
57ce178cc5 docs(readme): update status 2018-07-24 01:05:46 +02:00
dignifiedquire
bd7269e2e0 docs(readme): update status 2018-07-18 23:38:25 +02:00
dignifiedquire
c5ebc5726b docs(readme): fix phase list 2018-07-17 21:18:16 +02:00
dignifiedquire
2e7b0bea71 chore: basic setup 2018-07-17 21:16:31 +02:00