Skip to content

Commit 09a5d3b

Browse files
PR #3 병합 -> feature/1.1.x
보안성 강화 및 문서 수정 `Feature/1.1.x` 반영 -> `1.1.2-Alpha`
2 parents cd4d9ae + e43ca20 commit 09a5d3b

55 files changed

Lines changed: 1250 additions & 715 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idea/copyright/profiles_settings.xml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.idea/entlib-native.iml

Lines changed: 17 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[workspace]
2-
members = ["core/*", "crypto/*"]
2+
members = ["internal/*", "crypto/*"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "1.1.1-Alpha3"
6+
version = "1.1.2-Alpha"
77
edition = "2024"
88
authors = ["Q. T. Felix <qtfelix@qu4nt.space>"]
99
license = "MIT LICENSE"
@@ -12,8 +12,13 @@ license = "MIT LICENSE"
1212
strip = true
1313

1414
[workspace.dependencies]
15-
entlib-native-helper = { path = "./core/helper", version = "1.1.1-Alpha3" }
16-
entlib-native-ffi = { path = "./core/ffi", version = "1.1.1-Alpha3" }
17-
entlib-native-sha2 = { path = "./crypto/sha2", version = "1.1.1-Alpha3" }
18-
entlib-native-sha3 = { path = "./crypto/sha3", version = "1.1.1-Alpha3" }
19-
entlib-native-rng = { path = "./crypto/rng", version = "1.1.1-Alpha3" }
15+
### INTERNAL CORE DEPENDENCIES ###
16+
entlib-native-ffi = { path = "./internal/ffi", version = "1.1.2-Alpha" }
17+
entlib-native-quantum-util = { path = "./internal/quantum-util", version = "1.1.2-Alpha" }
18+
### INTERNAL CRYPTO DEPENDENCIES ###
19+
entlib-native-base64 = { path = "./crypto/base64", version = "1.1.2-Alpha" }
20+
entlib-native-constant-time = { path = "./crypto/constant-time", version = "1.1.2-Alpha" }
21+
entlib-native-core-secure = { path = "./crypto/core-secure", version = "1.1.2-Alpha" }
22+
entlib-native-rng = { path = "./crypto/rng", version = "1.1.2-Alpha" }
23+
entlib-native-sha2 = { path = "./crypto/sha2", version = "1.1.2-Alpha" }
24+
entlib-native-sha3 = { path = "./crypto/sha3", version = "1.1.2-Alpha" }

INTRODUCTION.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,4 @@
6464

6565
# 구성
6666

67-
네이티브는 가상 매니페스트(virtual manifest) 기반의 워크스페이스로 구성되며, 각 크레이트는 명확한 책임 경계를 가집니다.
68-
69-
## core/helper
70-
71-
`no_std` 환경에서 동작하는 보안 원시 연산 모듈입니다. 상수 시간 비교 및 선택 연산(`ConstantTimeOps` 트레이트), 아키텍처별 인라인 어셈블리 구현(`CtPrimitive` 트레이트), 상수 시간 `Base64` 인코딩/디코딩, 그리고 `SecureBuffer`를 제공합니다. 네이티브의 다른 모든 크레이트가 의존하는 기반 계층입니다.
72-
73-
## core/ffi
74-
75-
Java 측 FFM API와 직접 맞닿는 C ABI 브릿지 계층입니다. `Base64` 인/디코딩 FFI 엔드포인트(`entlib_b64_encode_secure`, `entlib_b64_decode_secure`)와 메모리 소거 엔드포인트(`entanglement_secure_wipe`), `SecureBuffer`의 포인터 추출 및 해제 함수를 제공합니다. 모든 진입점에서 `null` 포인터 검증과 오버플로 보호를 수행합니다.
76-
77-
## crypto/rng
78-
79-
하드웨어 기반 난수 생성 모듈입니다. CPU의 `rdseed`/`rndr` 명령어를 직접 호출하는 기본 생성기(`base_rng`)와, 하드웨어 엔트로피를 ChaCha20 코어 블록으로 비선형 혼합하는 확장 생성기(`MixedRng`)를 제공합니다.
80-
81-
## crypto/sha2
82-
83-
SHA-2 계열 해시 함수 구현입니다. `SHA-224`, `SHA-256`, `SHA-384`, `SHA-512` 네 가지 변형을 제공하며, 내부 상태 구조체(`Sha256State`, `Sha512State`)는 `Drop` 트레이트를 통해 연산 완료 시 자동 소거됩니다. 메시지 스케줄 등 연산 중간의 임시 데이터 역시 휘발성 소거 후 메모리 배리어가 적용됩니다.
84-
85-
## crypto/sha3
86-
87-
SHA-3 계열 해시 함수 및 XOF(확장 출력 함수) 구현입니다. `Keccak` 스펀지 구조 위에 `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512` 고정 출력 변형과 `SHAKE128`, `SHAKE256` 가변 출력 변형을 제공합니다. 내부 상태(`KeccakState`)의 25개 64비트 레인과 200바이트 버퍼는 `Drop` 트레이트에 의해 자동 소거되며, Keccak-f[1600] 순열의 임시 상태 역시 매 호출마다 휘발성 소거됩니다.
67+
네이티브는 가상 매니페스트(virtual manifest) 기반의 워크스페이스로 구성되며, 각 크레이트는 세분화되어 명확한 책임 경계를 가집니다. `crypto/` 하위에는 `Base64`, `Hash` 또는 알고리즘 연산을 수행하기 위한 크레이트가 위치해 있고, `internal/` 하위에는 `ffi` 연동 및 양자 관련 유틸리티 크레이트가 포함되어 있습니다.

INTRODUCTION_EN.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,4 @@ The reason this design is necessary is clear. Java's Garbage Collector freely co
6464

6565
# Composition
6666

67-
Native is composed of a workspace based on a virtual manifest, and each crate has clear responsibility boundaries.
68-
69-
## core/helper
70-
71-
A security primitive operation module operating in a `no_std` environment. It provides constant time comparison and selection operations (`ConstantTimeOps` trait), inline assembly implementations per architecture (`CtPrimitive` trait), constant time `Base64` encoding/decoding, and `SecureBuffer`. It is the base layer on which all other crates of Native depend.
72-
73-
## core/ffi
74-
75-
A C ABI bridge layer directly touching the Java side FFM API. It provides `Base64` encoding/decoding FFI endpoints (`entlib_b64_encode_secure`, `entlib_b64_decode_secure`), memory erasure endpoint (`entanglement_secure_wipe`), and pointer extraction and release functions of `SecureBuffer`. It performs null pointer verification and overflow protection at all entry points.
76-
77-
## crypto/rng
78-
79-
A hardware-based random number generation module. It provides a basic generator (`base_rng`) that directly calls the CPU's `rdseed`/`rndr` instructions, and an extended generator (`MixedRng`) that non-linearly mixes hardware entropy with the ChaCha20 core block.
80-
81-
## crypto/sha2
82-
83-
Implementation of SHA-2 family hash functions. It provides four variants: `SHA-224`, `SHA-256`, `SHA-384`, `SHA-512`, and internal state structures (`Sha256State`, `Sha512State`) are automatically erased upon operation completion via the `Drop` trait. Temporary data during operations such as message schedules are also volatilely erased, and then memory barriers are applied.
84-
85-
## crypto/sha3
86-
87-
Implementation of SHA-3 family hash functions and XOF (Extendable Output Functions). It provides `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512` fixed output variants and `SHAKE128`, `SHAKE256` variable output variants on top of the `Keccak` sponge structure. The 25 64-bit lanes and 200-byte buffer of the internal state (`KeccakState`) are automatically erased by the `Drop` trait, and the temporary state of the Keccak-f[1600] permutation is also volatilely erased at every call.
67+
Native is composed of a virtual manifest-based workspace, and each crate is granularized to have clear responsibility boundaries. Under `crypto/`, crates for performing `Base64`, `Hash`, or algorithm operations are located, and under `internal/`, crates for `ffi` integration and quantum-related utilities are included.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
# Alpha 버전
2121

22-
이 네이티브 라이브러리는 `1.1.0` 릴리즈 출시에 대한 준비를 마쳐도 곧바로 출시되진 않습니다. 이에 세밀하고 또 정밀하게 코드를 검토하고, 그 환경을 원활히 구축하기 위해 지금 이 시점에서 알파 버전으로 우선 공개하겠습니다.
22+
이 네이티브 라이브러리는 `1.1.x` 릴리즈 출시에 대한 준비를 마쳐도 곧바로 출시되진 않습니다. 이에 세밀하고 또 정밀하게 코드를 검토하고, 그 환경을 원활히 구축하기 위해 지금 이 시점에서 알파 버전으로 우선 공개하겠습니다.
2323

2424
# 벤치마킹
2525

README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Just in time, the respected security organization `Legion of the BouncyCastle In
1919
2020
# Alpha Version
2121

22-
This native library will not be released immediately even if preparations for the `1.1.0` release are completed. Therefore, to review the code in detail and precisely, and to smoothly build that environment, I will first release it as an alpha version at this point.
22+
This native library will not be released immediately even if preparations for the `1.1.x` release are completed. Therefore, to review the code in detail and precisely, and to smoothly build that environment, I will first release it as an alpha version at this point.
2323

2424
# Benchmarking
2525

core/ffi/benches/ffi_base64_bench.rs

Lines changed: 0 additions & 154 deletions
This file was deleted.

core/ffi/benches/ffi_wipe_bench.rs

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)