Skip to content

Commit c37cfa6

Browse files
committed
cleanup cargo.toml, README and license blocks
1 parent ca56287 commit c37cfa6

File tree

6 files changed

+32
-28
lines changed

6 files changed

+32
-28
lines changed

Cargo.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
[package]
2-
name = "ctaes"
2+
name = "ctaes-rs"
33
version = "0.1.0"
4-
authors = ["Blockstream <[email protected]>"]
5-
links = "ctaes"
6-
edition = "2015"
4+
authors = ["Philip Robinson <[email protected]>"]
5+
license = "MIT"
6+
homepage = "https://github.com/ElementsProject/rust-ctaes/"
7+
repository = "https://github.com/ElementsProject/rust-ctaes/"
8+
description = "Rust bindings and API for CTAES (constant-time AES implementation from Bitcoin Core https://github.com/bitcoin-core/ctaes")
9+
keywords = [ "crypto", "bitcoin", "aes" ]
10+
readme = "README.md"
11+
edition = "2021"
712

813
[dependencies]
914
thiserror = "1.0.30"

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# rust-ctaes
1+
# ctaes-rs
22

3-
A Rust FFI wrapper for CTAES library from <https://github.com/bitcoin-core/ctaes>
3+
Rust bindings and API for CTAES (constant-time AES implementation from Bitcoin Core found at
4+
https://github.com/bitcoin-core/ctaes")
45

56
The CTAES Library provides a constant time implementation of the AES algorithm. For completeness
67
this crate provides the interface to the AES-ECB methods, but they should not be used. Rather,

src/ctaes_ffi.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
/*********************************************************************
2-
* Copyright (c) 2023 Blockstream *
3-
* Distributed under the MIT software license, see the accompanying *
4-
* file COPYING or https://opensource.org/licenses/mit-license.php. *
5-
**********************************************************************/
1+
// Copyright (c) 2023 Blockstream
2+
// Distributed under the MIT software license, see the accompanying
3+
// file COPYING or https://opensource.org/licenses/mit-license.php.
64

75
// Using Zeroize to zero out the memory used by AES contexts on drop
86
use zeroize::Zeroize;

src/error.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
/*********************************************************************
2-
* Copyright (c) 2023 Blockstream *
3-
* Distributed under the MIT software license, see the accompanying *
4-
* file COPYING or https://opensource.org/licenses/mit-license.php. *
5-
**********************************************************************/
1+
// Copyright (c) 2023 Blockstream
2+
// Distributed under the MIT software license, see the accompanying
3+
// file COPYING or https://opensource.org/licenses/mit-license.php.
64

75
use thiserror::Error;
86

src/lib.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2023 Blockstream
2+
// Distributed under the MIT software license, see the accompanying
3+
// file COPYING or https://opensource.org/licenses/mit-license.php.
4+
15
//! A Rust FFI wrapper for CTAES library from <https://github.com/bitcoin-core/ctaes>
26
//!
37
//! The CTAES Library provides a constant time implementation of the AES algorithm. For completeness
@@ -396,10 +400,10 @@ impl AesCbcBlockCipher for Aes256Cbc<'_> {}
396400

397401
#[cfg(test)]
398402
mod test {
399-
use AES128_KEY_LENGTH;
400-
use AES192_KEY_LENGTH;
401-
use AES256_KEY_LENGTH;
402-
use {
403+
use crate::AES128_KEY_LENGTH;
404+
use crate::AES192_KEY_LENGTH;
405+
use crate::AES256_KEY_LENGTH;
406+
use crate::{
403407
Aes128, Aes128Cbc, Aes192, Aes192Cbc, Aes256, Aes256Cbc, AesBlockCipher, AesCbcBlockCipher,
404408
Error,
405409
};

src/padding.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
/*********************************************************************
2-
* Copyright (c) 2023 Blockstream *
3-
* Distributed under the MIT software license, see the accompanying *
4-
* file COPYING or https://opensource.org/licenses/mit-license.php. *
5-
**********************************************************************/
1+
// Copyright (c) 2023 Blockstream
2+
// Distributed under the MIT software license, see the accompanying
3+
// file COPYING or https://opensource.org/licenses/mit-license.php.
64

7-
use Error;
5+
use crate::Error;
86

97
/// Trait defining interface for a Padding implementation
108
pub trait Padding {
@@ -98,8 +96,8 @@ impl Padding for Pkcs7 {
9896

9997
#[cfg(test)]
10098
mod test {
101-
use padding::{Padding, Pkcs7, ZeroPadding};
102-
use Error;
99+
use crate::padding::{Padding, Pkcs7, ZeroPadding};
100+
use crate::Error;
103101

104102
#[test]
105103
fn test_zero_padding() {

0 commit comments

Comments
 (0)