From: Stefan Kangas <stefankangas@gmail.com>
To: SK Kim <tttuuu888@gmail.com>, 65826@debbugs.gnu.org
Subject: bug#65826: [PATCH] Add nonce support for gnutls-hash-mac
Date: Fri, 8 Sep 2023 09:18:37 -0700 [thread overview]
Message-ID: <CADwFkmniRnR=Z73ObxD8f_8UE8HgEao6YSoaRut9Co4H9CzDfg@mail.gmail.com> (raw)
In-Reply-To: <CAKYNWwQN08JFCpedr+tAT3-0VkfYhQuys25Ku3enh8A0jVkPeA@mail.gmail.com>
SK Kim <tttuuu888@gmail.com> writes:
> As far as I understood, currently `gnutls-hash-mac' does not support nonce
> input, so there is no way to properly hash with some MAC algorithms which
> require nonce. (e.g AES-GMAC-128)
> So I suggest adding an optional argument NONCE to `gnutls-hash-mac' to
> support MAC algorithms with nonce.
>
> What I have tested after applying the attached patch are as below.
> 1. AES-GMC-128/192/256 works correctly.
> 2. NONCE does not affect SHA256/SHA512 hash results, even if presented.
>
> Since NONCE is added as an optional argument, I believe it will not even
> affect existing code using the 'gnutls-hash-mac' function.
Sounds useful. Could you add unit tests for this, though? In
particular, it would be good to test your number 1 and 2 above.
next prev parent reply other threads:[~2023-09-08 16:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 15:58 bug#65826: [PATCH] Add nonce support for gnutls-hash-mac SK Kim
2023-09-08 16:18 ` Stefan Kangas [this message]
2023-09-08 16:33 ` Seungki Kim
2023-09-08 16:41 ` Stefan Kangas
2023-09-09 5:50 ` Seungki Kim
2023-09-10 11:06 ` Ted Zlatanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmniRnR=Z73ObxD8f_8UE8HgEao6YSoaRut9Co4H9CzDfg@mail.gmail.com' \
--to=stefankangas@gmail.com \
--cc=65826@debbugs.gnu.org \
--cc=tttuuu888@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).