unknwon / com

This is an open source project for commonly used functions for the Go programming language.
Apache License 2.0
755 stars 133 forks source link

Switch from using AES CFB to AES GCM #11

Closed aaronjwood closed 7 years ago

aaronjwood commented 7 years ago

I'd like to propose that this library use AES in GCM mode instead of CFB mode https://github.com/Unknwon/com/blob/28b053d5a2923b87ce8c5a08f3af779894a72758/string.go#L45 https://github.com/Unknwon/com/blob/28b053d5a2923b87ce8c5a08f3af779894a72758/string.go#L61

GCM is fast (can be parallelized) but is also authenticated which is the biggest benefit over CFB and most other modes.

unknwon commented 7 years ago

Thanks, if possible, please propose a PR :smile: