Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CBC-MAC and its variants #281

Closed
8 tasks done
emmansun opened this issue Dec 2, 2024 · 1 comment
Closed
8 tasks done

Support CBC-MAC and its variants #281

emmansun opened this issue Dec 2, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@emmansun
Copy link
Owner

emmansun commented Dec 2, 2024

Reference: GB/T 15821.1-2020 Security techniques - Message authentication codes - Part 1: Mechanisms using block ciphers.

  • CBC-MAC (填充方式2)
  • EMAC (填充方式2)
  • ANSI retail MAC (填充方式2)
  • MacDES (填充方式2),K''采用示例诱导方式(每隔4bits交替取补和不变)
  • CMAC (填充方式4)
  • LMAC (填充方式2)
  • TrCBC (填充方式4)
  • CBCR (填充方式4)

Note:
For security and performance reasons, please use block cipher-based message authentication mechanisms with caution.

安全分析和消息鉴别码长度选择

  • GB/T 15821.1-2020 附录C:MAC算法的安全性分析
  • NIST SP 800-38B, Appendix A: Length of the MAC
Larger values of Tlen provide greater assurance against guessing attacks. The performance
tradeoff is that larger values of Tlen require more bandwidth/storage for the MAC.

For most applications, a value for Tlen that is at least 64 should provide sufficient protection
against guessing attacks. A value of Tlen that is less than 64 shall only be used in conjunction
with a careful analysis of the risks of accepting an inauthentic message as authentic.

In particular, a value of Tlen smaller than 64 should not be used unless the controlling protocol or
system sufficiently restricts the number of times that the verification process can return INVALID,
across all implementations with any given key. For example, the short duration of a session or,
more generally, the low bandwidth of the communication channel may preclude many repeated
trials.
@emmansun emmansun added the enhancement New feature or request label Dec 2, 2024
@emmansun emmansun self-assigned this Dec 2, 2024
emmansun added a commit that referenced this issue Dec 2, 2024
emmansun added a commit that referenced this issue Dec 3, 2024
@emmansun
Copy link
Owner Author

emmansun commented Dec 6, 2024

v0.29.5

@emmansun emmansun closed this as completed Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant