项目作者: ansemjo

项目描述 :
Go binding for Ascon-128 from the CAESAR portfolio.
高级语言: C
项目地址: git://github.com/ansemjo/ascon.git
创建时间: 2019-02-23T14:14:31Z
项目社区:https://github.com/ansemjo/ascon

开源协议:MIT License

下载


ansemjo/ascon

This is a Go binding for the Ascon-128 cipher,
which is the preferred cipher for use in lightweight applications from the
CAESAR portfolio.

It implements the cipher.AEAD interface:

  1. package main
  2. import (
  3. // "..."
  4. "github.com/ansemjo/ascon"
  5. )
  6. func main() {
  7. // [...]
  8. // initialize with 16 byte key
  9. aead, err := ascon.New(key)
  10. if err != nil {
  11. panic("failed aead init")
  12. }
  13. // seal plaintext
  14. ct := aead.Seal(nil, nonce, plaintext, associated)
  15. // open ciphertext
  16. pt, err := a.Open(nil, nonce, ct, associated)
  17. if err != nil {
  18. panic(err.Error())
  19. }
  20. // [...]
  21. }

Currently binds to the optimized 64 bit implementation of ascon128v12 from
ascon/crypto_aead.

DISCLAIMER

I am not a professional cryptographer. This is simply a binding to toy around with an interesting
new cipher and should be tested and audited thoroughly before use. Especially because I am using
lots of unsafe.Pointer()‘s here.

  1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  2. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  3. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  4. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  5. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  6. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  7. SOFTWARE.