lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 Nov 2020 16:54:06 +0000
From:   David Howells <dhowells@...hat.com>
To:     Chuck Lever <chuck.lever@...cle.com>
Cc:     dhowells@...hat.com, CIFS <linux-cifs@...r.kernel.org>,
        Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Trond Myklebust <trond.myklebust@...merspace.com>,
        Bruce Fields <bfields@...ldses.org>,
        linux-crypto@...r.kernel.org,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        linux-afs@...ts.infradead.org
Subject: Re: [RFC][PATCH 00/18] crypto: Add generic Kerberos library

Chuck Lever <chuck.lever@...cle.com> wrote:

> Really? My understanding of the Linux kernel SUNRPC implementation is
> that it uses asynchronous, even for small data items. Maybe I'm using
> the terminology incorrectly.

Seems to be synchronous, at least in its use of skcipher:

grep -e skcipher *
gss_krb5_crypto.c:#include <crypto/skcipher.h>
gss_krb5_crypto.c:	struct crypto_sync_skcipher *tfm,
gss_krb5_crypto.c:	if (length % crypto_sync_skcipher_blocksize(tfm) != 0)
gss_krb5_crypto.c:	if (crypto_sync_skcipher_ivsize(tfm) > GSS_KRB5_MAX_BLOCKSIZE) {
gss_krb5_crypto.c:			crypto_sync_skcipher_ivsize(tfm));
gss_krb5_crypto.c:		memcpy(local_iv, iv, crypto_sync_skcipher_ivsize(tfm));
gss_krb5_crypto.c:	skcipher_request_set_sync_tfm(req, tfm);
gss_krb5_crypto.c:	skcipher_request_set_callback(req, 0, NULL, NULL);
gss_krb5_crypto.c:	skcipher_request_set_crypt(req, sg, sg, length, local_iv);
gss_krb5_crypto.c:	ret = crypto_skcipher_encrypt(req);
gss_krb5_crypto.c:	skcipher_request_zero(req);
gss_krb5_crypto.c:     struct crypto_sync_skcipher *tfm,
gss_krb5_crypto.c:	if (length % crypto_sync_skcipher_blocksize(tfm) != 0)
gss_krb5_crypto.c:	if (crypto_sync_skcipher_ivsize(tfm) > GSS_KRB5_MAX_BLOCKSIZE) {
gss_krb5_crypto.c:			crypto_sync_skcipher_ivsize(tfm));
gss_krb5_crypto.c:		memcpy(local_iv, iv, crypto_sync_skcipher_ivsize(tfm));
gss_krb5_crypto.c:	skcipher_request_set_sync_tfm(req, tfm);
gss_krb5_crypto.c:	skcipher_request_set_callback(req, 0, NULL, NULL);
gss_krb5_crypto.c:	skcipher_request_set_crypt(req, sg, sg, length, local_iv);
gss_krb5_crypto.c:	ret = crypto_skcipher_decrypt(req);
gss_krb5_crypto.c:	skcipher_request_zero(req);
gss_krb5_crypto.c:	struct skcipher_request *req;
gss_krb5_crypto.c:	struct crypto_sync_skcipher *tfm =
gss_krb5_crypto.c:		crypto_sync_skcipher_reqtfm(desc->req);
gss_krb5_crypto.c:	fraglen = thislen & (crypto_sync_skcipher_blocksize(tfm) - 1);
gss_krb5_crypto.c:	skcipher_request_set_crypt(desc->req, desc->infrags, desc->outfrags,
gss_krb5_crypto.c:	ret = crypto_skcipher_encrypt(desc->req);
gss_krb5_crypto.c:gss_encrypt_xdr_buf(struct crypto_sync_skcipher *tfm, struct xdr_buf *buf,
gss_krb5_crypto.c:	BUG_ON((buf->len - offset) % crypto_sync_skcipher_blocksize(tfm) != 0);
gss_krb5_crypto.c:	skcipher_request_set_sync_tfm(req, tfm);
gss_krb5_crypto.c:	skcipher_request_set_callback(req, 0, NULL, NULL);
gss_krb5_crypto.c:	skcipher_request_zero(req);
gss_krb5_crypto.c:	struct skcipher_request *req;
gss_krb5_crypto.c:	struct crypto_sync_skcipher *tfm =
gss_krb5_crypto.c:		crypto_sync_skcipher_reqtfm(desc->req);
gss_krb5_crypto.c:	fraglen = thislen & (crypto_sync_skcipher_blocksize(tfm) - 1);
gss_krb5_crypto.c:	skcipher_request_set_crypt(desc->req, desc->frags, desc->frags,
gss_krb5_crypto.c:	ret = crypto_skcipher_decrypt(desc->req);
gss_krb5_crypto.c:gss_decrypt_xdr_buf(struct crypto_sync_skcipher *tfm, struct xdr_buf *buf,
gss_krb5_crypto.c:	BUG_ON((buf->len - offset) % crypto_sync_skcipher_blocksize(tfm) != 0);
gss_krb5_crypto.c:	skcipher_request_set_sync_tfm(req, tfm);
gss_krb5_crypto.c:	skcipher_request_set_callback(req, 0, NULL, NULL);
gss_krb5_crypto.c:	skcipher_request_zero(req);
gss_krb5_crypto.c:gss_krb5_cts_crypt(struct crypto_sync_skcipher *cipher, struct xdr_buf *buf,
gss_krb5_crypto.c:	skcipher_request_set_sync_tfm(req, cipher);
gss_krb5_crypto.c:	skcipher_request_set_callback(req, 0, NULL, NULL);
gss_krb5_crypto.c:	skcipher_request_set_crypt(req, sg, sg, len, iv);
gss_krb5_crypto.c:		ret = crypto_skcipher_encrypt(req);
gss_krb5_crypto.c:		ret = crypto_skcipher_decrypt(req);
gss_krb5_crypto.c:	skcipher_request_zero(req);
gss_krb5_crypto.c:	struct crypto_sync_skcipher *cipher, *aux_cipher;
gss_krb5_crypto.c:	blocksize = crypto_sync_skcipher_blocksize(cipher);
gss_krb5_crypto.c:		skcipher_request_set_sync_tfm(req, aux_cipher);
gss_krb5_crypto.c:		skcipher_request_set_callback(req, 0, NULL, NULL);
gss_krb5_crypto.c:		skcipher_request_zero(req);
gss_krb5_crypto.c:	struct crypto_sync_skcipher *cipher, *aux_cipher;
gss_krb5_crypto.c:	blocksize = crypto_sync_skcipher_blocksize(cipher);
gss_krb5_crypto.c:		skcipher_request_set_sync_tfm(req, aux_cipher);
gss_krb5_crypto.c:		skcipher_request_set_callback(req, 0, NULL, NULL);
gss_krb5_crypto.c:		skcipher_request_zero(req);
gss_krb5_keys.c:#include <crypto/skcipher.h>
gss_krb5_keys.c:	struct crypto_sync_skcipher *cipher;
gss_krb5_keys.c:	cipher = crypto_alloc_sync_skcipher(gk5e->encrypt_name, 0, 0);
gss_krb5_keys.c:	if (crypto_sync_skcipher_setkey(cipher, inkey->data, inkey->len))
gss_krb5_keys.c:	crypto_free_sync_skcipher(cipher);
gss_krb5_mech.c:#include <crypto/skcipher.h>
gss_krb5_mech.c:	struct krb5_ctx *ctx, struct crypto_sync_skcipher **res)
gss_krb5_mech.c:	*res = crypto_alloc_sync_skcipher(ctx->gk5e->encrypt_name, 0, 0);
gss_krb5_mech.c:	if (crypto_sync_skcipher_setkey(*res, key.data, key.len)) {
gss_krb5_mech.c:	crypto_free_sync_skcipher(*res);
gss_krb5_mech.c:	crypto_free_sync_skcipher(ctx->seq);
gss_krb5_mech.c:	crypto_free_sync_skcipher(ctx->enc);
gss_krb5_mech.c:static struct crypto_sync_skcipher *
gss_krb5_mech.c:	struct crypto_sync_skcipher *cp;
gss_krb5_mech.c:	cp = crypto_alloc_sync_skcipher(cname, 0, 0);
gss_krb5_mech.c:	if (crypto_sync_skcipher_setkey(cp, key, ctx->gk5e->keylength)) {
gss_krb5_mech.c:		crypto_free_sync_skcipher(cp);
gss_krb5_mech.c:	crypto_free_sync_skcipher(ctx->enc);
gss_krb5_mech.c:	crypto_free_sync_skcipher(ctx->seq);
gss_krb5_mech.c:			crypto_free_sync_skcipher(ctx->initiator_enc_aux);
gss_krb5_mech.c:	crypto_free_sync_skcipher(ctx->acceptor_enc);
gss_krb5_mech.c:	crypto_free_sync_skcipher(ctx->initiator_enc);
gss_krb5_mech.c:	crypto_free_sync_skcipher(kctx->seq);
gss_krb5_mech.c:	crypto_free_sync_skcipher(kctx->enc);
gss_krb5_mech.c:	crypto_free_sync_skcipher(kctx->acceptor_enc);
gss_krb5_mech.c:	crypto_free_sync_skcipher(kctx->initiator_enc);
gss_krb5_mech.c:	crypto_free_sync_skcipher(kctx->acceptor_enc_aux);
gss_krb5_mech.c:	crypto_free_sync_skcipher(kctx->initiator_enc_aux);
gss_krb5_seqnum.c:#include <crypto/skcipher.h>
gss_krb5_seqnum.c:		struct crypto_sync_skcipher *key,
gss_krb5_seqnum.c:	struct crypto_sync_skcipher *key = kctx->seq;
gss_krb5_wrap.c:#include <crypto/skcipher.h>
gss_krb5_wrap.c:	blocksize = crypto_sync_skcipher_blocksize(kctx->enc);
gss_krb5_wrap.c:	blocksize = crypto_sync_skcipher_blocksize(kctx->enc);

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ