https://github.com/ansemjo/ascon
Go binding for Ascon-128 from the CAESAR portfolio.
https://github.com/ansemjo/ascon
aead ascon caesar-portfolio
Last synced: 5 months ago
JSON representation
Go binding for Ascon-128 from the CAESAR portfolio.
- Host: GitHub
- URL: https://github.com/ansemjo/ascon
- Owner: ansemjo
- License: mit
- Archived: true
- Created: 2019-02-23T14:14:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-23T14:15:13.000Z (over 7 years ago)
- Last Synced: 2024-06-20T00:35:11.912Z (almost 2 years ago)
- Topics: aead, ascon, caesar-portfolio
- Language: C
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansemjo/ascon
This is a Go binding for the [Ascon-128 cipher](https://ascon.iaik.tugraz.at/specification.html),
which is the preferred cipher for use in lightweight applications from the
[CAESAR portfolio](https://competitions.cr.yp.to/caesar-submissions.html).
It implements the `cipher.AEAD` interface:
```go
package main
import (
// "..."
"github.com/ansemjo/ascon"
)
func main() {
// [...]
// initialize with 16 byte key
aead, err := ascon.New(key)
if err != nil {
panic("failed aead init")
}
// seal plaintext
ct := aead.Seal(nil, nonce, plaintext, associated)
// open ciphertext
pt, err := a.Open(nil, nonce, ct, associated)
if err != nil {
panic(err.Error())
}
// [...]
}
```
Currently binds to the optimized 64 bit implementation of `ascon128v12` from
[ascon/crypto_aead](https://github.com/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.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.