bits_go1.13.go 484 B

123456789101112131415161718192021
  1. // Copyright 2019 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build go1.13
  5. package poly1305
  6. import "math/bits"
  7. func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) {
  8. return bits.Add64(x, y, carry)
  9. }
  10. func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) {
  11. return bits.Sub64(x, y, borrow)
  12. }
  13. func bitsMul64(x, y uint64) (hi, lo uint64) {
  14. return bits.Mul64(x, y)
  15. }