Piggy

Results 6 comments of Piggy

> Why does it fail to build for `riscv64`? Because it misses an implementation of [function `xorBlock`](https://github.com/jacobsa/crypto/blob/e7a907a814d5c104f87bf371bd4f27a96ed310f9/cmac/hash_64bit.go#L16) for RISC-V, as jacobsa/crypto#13 mentioned. (~~Although the code is not used by charm~~...

Hi @aymanbagabas, Currently, charm uses a 32-byte key (`cr.keys[0].Key[:32]`) and no additional associated data (AD, the last argument `nil`)... https://github.com/charmbracelet/charm/blob/dab882a1940f748f9172a063e9baec28877d0367/crypt/crypt.go#L106 ...while [`github.com/google/tink/go/daead/subtle`](https://pkg.go.dev/github.com/google/tink/go/daead/subtle) you mentioned only supports 64-byte keys ... https://github.com/google/tink/blob/9f30c97cb84b10bbba6978bc9c12c86478024050/go/daead/subtle/aes_siv.go#L63-L64...

I'll use ``` go mod edit -replace github.com/jacobsa/crypto=github.com/piggynl/jacobsa-crypto@xorblock-generic ``` (replace `github.com/jacobsa/crypto` with jacobsa/crypto#14) to make charm build on `linux/riscv64` on my side :smile_cat:

After upgrading `modernc.org/sqlite` and `github.com/dgraph-io/badger/v3`, and the `go mod edit -replace` in https://github.com/charmbracelet/charm/issues/147#issuecomment-1144681077, `go build` and `go test` look fine in `linux/riscv64`.

Hi @paralin, > @piggynl I'm wondering if it might be good to fork this & maintain it as a different import path if the author doesn't merge. Sure! Do you...

Thank you for the information :smiley_cat: