bregydoc/blackholeDB

nonce must be unique for all time, for a given key

jeremychase opened this issue · 1 comments

cipherText := gcm.Seal(nonce, nonce, data, nil)

From gcm.Seal() godoc:

The nonce must be NonceSize() bytes long and unique for all time, for a given key.

n2p5 commented

@bregydoc and @jeremychase I just made a PR that would prefix nonces with binary encoded unix timestamps to give a 4 byte time series name space in single second resolution to randomly generated nonces.

you can check it out here: #3