Repository navigation
v0.1.4
What's Changed
新特性与重构 | New Features & Refactoring
1. 签名类型简化 (Signature Type Simplification)
为了提升 Signature 类型在不同库之间的互操作性并简化其使用,我们将其从一个包装 Vec<u8> 的结构体 (struct) 重构为一个类型别名 (type alias)。
To enhance the interoperability of the Signature type across different libraries and simplify its usage, we have refactored it from a struct wrapping Vec<u8> to a simple type alias.
- 将
Signature重构为类型别名 (RefactoredSignatureto a Type Alias)- 中文:
Signature结构体已变更为Vec<u8>的类型别名。此项变更移除了原有的包装结构体,简化了 API,使得与其他处理原始字节签名的库集成变得更加容易。同时,通过移除之前的Deref、DerefMut、AsRef等 trait 实现,减少了模板代码,使签名数据可以直接作为Vec<u8>使用。 - English: The
Signaturestruct has been converted into a type alias forVec<u8>. This change removes the wrapper struct, simplifying the API and making it easier to integrate with other libraries that work with raw byte signatures. It also reduces boilerplate code by removing previousDeref,DerefMut,AsRef, and other trait implementations, allowing signature data to be used directly as aVec<u8>. - 影响范围 (Affected Modules):
src/traits/asymmetric.rssrc/systems/asymmetric/traditional/ecc.rssrc/systems/asymmetric/traditional/rsa.rssrc/systems/asymmetric/post_quantum/dilithium.rs
- 中文:
2. DerivedKey 结构体功能增强 (Enhanced DerivedKey Struct Functionality)
为了提高密钥派生函数 (KDF) 生成的派生密钥的灵活性和安全性,我们对 DerivedKey 结构体进行了功能增强。
To improve the flexibility and security of keys generated by Key Derivation Functions (KDF), we have enhanced the functionality of the DerivedKey struct.
- 实现
KeyTrait 并增加序列化支持 (ImplementedKeyTrait and Added Serialization Support)- 中文:
DerivedKey现已实现Keytrait,使其能够与框架内的其他密钥类型一样,通过from_bytes和to_bytes方法进行统一处理。此外,我们还为其增加了可选的serde支持(通过Serialize和Deserializederive 宏),提升了其在序列化和安全存储场景下的应用能力。 - English:
DerivedKeynow implements theKeytrait, allowing it to be handled uniformly with other key types in the framework throughfrom_bytesandto_bytesmethods. Additionally, optionalserdesupport (viaSerializeandDeserializederive macros) has been added, enhancing its applicability in serialization and secure storage scenarios. - 影响范围 (Affected Modules):
src/traits/kdf.rs
- 中文:
文档更新 | Documentation Updates
3. 新增重要使用说明 (Added Important Usage Note)
为了引导用户更安全、更有效地使用 seal-crypto,我们在项目的 README 文件中增加了一段重要的使用说明。
To guide users in using seal-crypto more safely and effectively, we have added an important usage note to the project's README files.
- 推荐使用高级封装库
seal-crypto-wrapper(Recommendation to Use High-Level Wrapperseal-crypto-wrapper)- 中文: 在
README.md和README_CN.md文件中明确指出,seal-crypto是一个底层加密引擎。对于大多数应用,我们强烈建议使用其高级封装库seal-crypto-wrapper。该封装库提供了更安全、更易用的 API,能有效避免常见的加密误用。 - English: It is now clearly stated in
README.mdandREADME_CN.mdthatseal-cryptois a low-level cryptographic engine. For most applications, we strongly recommend using its high-level wrapper library,seal-crypto-wrapper. The wrapper provides a safer, more user-friendly API that helps prevent common cryptographic misuses. - 影响范围 (Affected Files):
README.mdREADME_CN.md
- 中文: 在
4. 全面的代码注释覆盖 (Comprehensive Code Comment Coverage)
为了提高代码的可读性和可维护性,我们对核心逻辑代码进行了全面的文档注释完善。
To improve code readability and maintainability, we have comprehensively updated the documentation comments for the core logic.
- 完善
src目录下核心代码的文档注释 (Improved Doc Comments for Core Code insrc)- 中文: 我们对
src/目录下的代码进行了全面的文档注释(doc comments)完善。超过 90% 的文件都增加了详细的中文和英文注释,解释了模块、trait、函数和数据结构的核心功能与设计理念。 - English: We have comprehensively updated the documentation comments for the code under the
src/directory. Over 90% of the files now have detailed English and Chinese comments explaining the core functionality and design principles of modules, traits, functions, and data structures. - 影响范围 (Affected Scope):
src/**/*.rs
- 中文: 我们对
Full Changelog: v0.1.3...v0.1.4