add trait for length-preserving encryption
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- rust
- 領域
- cryptography
調査の方向性
まず、リンクされている RustCrypto の traits と block-ciphers の issues を比較し、次に issue にリンクされている HCTR2 論文を読む。提案されている Lpe および LpeMut API、エラーハンドリング、最小長、バッファーのコピー方法がプロジェクトに適合するかを明確にする。完了条件は、trait 設計が承認され、未解決の疑問について合意された解決策があること。
索引モデルが issue の本文から書いたものです。
説明
Sort of similar to https://github.com/RustCrypto/traits/issues/177 and https://github.com/RustCrypto/block-ciphers/issues/48, but for tweakable SPRPs like HCTR2.
If accepted, I can provide an implementation of HCTR2.
Sample API, trait names are TBD:
pub trait Lpe {
/// Encrypts `src` into `dst` using `tweak`
///
/// In is an error if `dst` is not at least as long as `src` or if either are less
/// than [`BLOCK_SIZE`] bytes long.
fn seal(&self, dst: &mut [u8], src: &[u8], tweak: &[u8]) -> Result<(), Error> {
if dst.len() < src.len() { ... }
dst[..src.len()].copy_from_slice(src);
match self.seal_in_place(dst, tweak) {
Ok(()) => Ok(()),
Err(err) => {
// This isn't strictly necessary, but there isn't any
// harm in doing it.
dst[..src.len()].zeroize();
Err(err)
}
}
}
fn open(&self, dst: &mut [u8], src: &[u8], tweak: &[u8]) -> Result<(), Error> {
// etc
}
fn seal_in_place(&self, data: &mut [u8], tweak: &[u8]) -> Result<(), Error>;
fn open_in_place(&self, data: &mut [u8], tweak: &[u8]) -> Result<(), Error>;
}
pub trait LpeMut { ... }
Some thoughts:
- I don't like how the API returns a
Result, but I'm not sure how else to express that there must be at least one block of plaintext without requiringBlock, panicking, or a lot oftypenumgymnastics. - I don't know if all LPE algorithms require the length of the plaintext to be at least one block, but I assume most do.
sealandopenaren't strictly necessary, but encrypting fromsrctodstis very common and it would be a shame if doing that always required copying the entire input.
- 主要言語
- Rust
- スター
- 760
- フォーク
- 258
- 平均マージ
- 2時間 53分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RustCrypto/traits のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
RustCrypto/traits#2487 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
RustCrypto/traits#2482 · コメント 5 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 32/100
RustCrypto/traits#2478 · コメント 5 件 ·
-
cipher
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
RustCrypto/traits#2424 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
RustCrypto/traits#2401 ·
RustCrypto/traits の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
EmbarkStudios/cargo-deny#910 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
tursodatabase/turso#10054 ·
メンテナーはふだん 1 日以内に返信
-
build: Update rust version対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンdependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
ibm-granite-community/granite-cli#229 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
orottier/web-audio-api-rs#658 ·