V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Explr

有没有可以通过 update()+finalize()这种模式使用 AEAD 加密算法的库?

  •  
  •   Explr · Aug 23, 2022 · 1952 views
    This topic created in 1355 days ago, the information mentioned may be changed or developed.

    很多库出于安全性考虑或者防呆设计,只允许把明文 /密文全部读入内存,通过一次调用完成加解密和验证 tag 。但是有时明文 /密文太大不适合一次全部读入内存。

    Python 语言的 pyca/cryptography 库可以通过多次 update(data),最后 finalize()这种模式使用 AES-GCM 算法,但是对于 ChaCha20-poly1305 仍然只能通过一次调用操作全部数据。

    各种常用语言中有哪些能分段操作数据的 AEAD 库?使用偏底层一些的原语也可以。

    3 replies    2022-08-23 17:29:53 +08:00
    lcdtyph
        1
    lcdtyph  
       Aug 23, 2022 via iPhone
    openssl
    Bromine0x23
        2
    Bromine0x23  
       Aug 23, 2022
    JCE
    ysc3839
        3
    ysc3839  
       Aug 23, 2022
    这不就是多加一个 buffer 的事吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4728 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 01:04 · PVG 09:04 · LAX 18:04 · JFK 21:04
    ♥ Do have faith in what you're doing.