cloudflare / circl

CIRCL: Cloudflare Interoperable Reusable Cryptographic Library
http://blog.cloudflare.com/introducing-circl
Other
1.22k stars 136 forks source link

cp-abe: plaintext exceeding a certain length will fail during decryption #484

Closed hafeidejiangyou closed 2 months ago

hafeidejiangyou commented 4 months ago

Run example_test.go, and change the plaintext like:

msgStr :=must have the precious 🎃+ strings.Repeat("abc", 1024*10*3)

It will Encrypt error with "decryption using right attrs should have succeeded"

Is there a limitation on the length of the plaintext?

armfazh commented 4 months ago

I've identified the issue, and am preparing documentation for it. In short, message is length-prefixed stored with uint16 prefixes.

hafeidejiangyou commented 3 months ago

I've identified the issue, and am preparing documentation for it. In short, message is length-prefixed stored with uint16 prefixes.

Are there any other considerations when using uint16? Will larger data types be used in the future?