• Luke Curley's avatar
    crypto/cipher: improved cbc performance · 701982f1
    Luke Curley authored
    decrypt: reduced the number of copy calls from 2n to 1.
    encrypt: reduced the number of copy calls from n to 1.
    
    Encryption is straight-forward: use dst instead of tmp when
    xoring the block with the iv.
    
    Decryption now loops backwards through the blocks abusing the
    fact that the previous block's ciphertext (src) is the iv. This
    means we don't need to copy the iv every time, in addition to
    using dst instead of tmp like encryption.
    
    R=golang-codereviews, agl, mikioh.mikioh
    CC=golang-codereviews
    https://golang.org/cl/50900043
    701982f1
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...