<feed xmlns='http://www.w3.org/2005/Atom'>
<title>paraslash/crypt_backend.h, branch pu</title>
<subtitle>paraslash - network audio streaming tools</subtitle>
<id>https://git.tue.mpg.de/cgit/paraslash/atom?h=pu</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/paraslash/atom?h=pu'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/'/>
<updated>2026-03-17T22:45:43Z</updated>
<entry>
<title>Switch to SPDX identifiers.</title>
<updated>2026-03-17T22:45:43Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2026-03-15T14:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=ea0cecf96e08c489fdcc94d046019f4ce46f58e2'/>
<id>urn:sha1:ea0cecf96e08c489fdcc94d046019f4ce46f58e2</id>
<content type='text'>
Generated with

	sed -i 's|Copyright.*Andre Noll.*|SPDX-License-Identifier: GPL-2.0 */|g' *.c *.h

followed by manually tweaking the result a bit. No license change intended.
</content>
</entry>
<entry>
<title>Remove support for PEM private keys.</title>
<updated>2026-01-28T17:09:22Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2025-11-22T22:59:55Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=097d3f307f44be27b7c3031661fe1a31a00b84e1'/>
<id>urn:sha1:097d3f307f44be27b7c3031661fe1a31a00b84e1</id>
<content type='text'>
This gets us rid of a couple of hand-written parsers, which can only be a
good thing. The shortstat says it all...
</content>
</entry>
<entry>
<title>openssl: Add support for RFC4716 keys</title>
<updated>2018-12-25T16:45:25Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2018-08-30T13:32:34Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=09dbc597fa9661f8dfd96684430531fe6575d26c'/>
<id>urn:sha1:09dbc597fa9661f8dfd96684430531fe6575d26c</id>
<content type='text'>
The decode_private_key() helper of gcrypt.c base64-decodes the key
but does not read the RSA bignums. It is thus independent of gcrypt
and openssl. To add support for RFC4716 keys to the openssl backend,
we need to move it to crypt_common.c, making it a crypo backend
function. That is, non-static and declared in crypt_backend.h. The
patch also documents the function using doxgen comments.

With decode_private_key() and find_openssh_bignum_offset() to
our disposal, supporting RFC4716 keys is simple. We only need to
initialize the openssl-specific rsa structure with the six bignums
stored in a private RFC4716 key. This is implemented in the new
read_private_rsa_params() which calls the existing read_bignum()
six times.

The fields of the rsa structure are exposed to applications in
openssl-1.0, but the structure was made opaque in openssl-1.1. We
use the existing HAVE_RSA_SET0_KEY macro to decide whether or not
we must use the accessor functions of openssl-1.1 to initialize the
rsa structure.
</content>
</entry>
<entry>
<title>gcrypt: Add support for RFC4716 private keys.</title>
<updated>2018-12-25T16:45:25Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2018-08-28T18:38:52Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=74f74cde7afdba9cfe316998aba9286764bb5d34'/>
<id>urn:sha1:74f74cde7afdba9cfe316998aba9286764bb5d34</id>
<content type='text'>
This teaches the gcrypt backend to parse private keys generated
with ssh-keygen -m RFC4716. Support for the openssl backend will be
implemented in a subsequent patch. The new find_openssh_bignum_offset()
is independent of the gcrypt API. We put this function into
crypt_common.c rather then into gcrypt.c so that openssh.c can also
use it.
</content>
</entry>
<entry>
<title>crypt: Rename decoding functions.</title>
<updated>2018-12-25T16:45:24Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2018-08-28T19:38:33Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=3e0533843c8d4add881a6c2d383bd2c80129e27b'/>
<id>urn:sha1:3e0533843c8d4add881a6c2d383bd2c80129e27b</id>
<content type='text'>
decode_ssh_key() and decode_key() operate on public and private keys
respectively. This should be obvious from the naming. Also, the
two functions will soon be grouped together in the same file. The
inconsistent naming would even increase the possible confusion,
so it's better to rename the functions now.
</content>
</entry>
<entry>
<title>crypt: Deduplicate get_public_key().</title>
<updated>2018-02-25T23:10:28Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-12-28T00:41:14Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=5f20d9afde364f9ce51aa7841ebe513028a65e81'/>
<id>urn:sha1:5f20d9afde364f9ce51aa7841ebe513028a65e81</id>
<content type='text'>
The openssl and grypt implementations of this function share quite
some code. This patch factors out the common code into the new
decode_ssh_key() helper of crypt_common.c. Both implementations are
changed to call the new helper.

As a side effect of this change, all callers of is_ssh_rsa_key()
and check_ssh_key_header() now reside in crypt_common.c, so we can
make these two functions static and remove their declarations from
crypt_backend.h.
</content>
</entry>
<entry>
<title>Shorten copyright notice.</title>
<updated>2017-09-22T14:35:22Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-09-10T12:15:50Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=d31995b3074bb19aa4da66ce5c4774ca9ed101a1'/>
<id>urn:sha1:d31995b3074bb19aa4da66ce5c4774ca9ed101a1</id>
<content type='text'>
The GPLv2 line does not add any additional information, so drop
it. This leaves a single line of legalese text for most files, which
is about the amount of screen real estate it deserves.

This patch was created with the following script (plus some manual
fixups):

	awk '{
		if (NR &lt;= 5) {
			gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g")
			if (gs != $0)
				year = gs
			next
		}
		if (NR == 6 &amp;&amp; year != "")
			printf("/* Copyright (C) %s Andre Noll &lt;maan@tuebingen.mpg.de&gt;, see file COPYING. */\n", year)
		print
	}'
</content>
</entry>
<entry>
<title>crypt: Remove read_ssh_u32().</title>
<updated>2017-07-23T16:01:10Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-07-15T13:24:07Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=d0586a4f9b2c81f87ec40e06edae843f2d61ea74'/>
<id>urn:sha1:d0586a4f9b2c81f87ec40e06edae843f2d61ea74</id>
<content type='text'>
It was just another implementation of read_u32_be(). This commit makes
the crypto code use the helper of portable_io.h instead.
</content>
</entry>
<entry>
<title>crypto: Rename check_key_file() -&gt; check_private_key_file().</title>
<updated>2017-01-06T17:53:46Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2016-07-10T19:46:00Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=b4c9282be012ea84f7154684e9b2a469171e5e2b'/>
<id>urn:sha1:b4c9282be012ea84f7154684e9b2a469171e5e2b</id>
<content type='text'>
For public keys the function only called stat(2), which is unnecessary
because only an error from the subsequent open(2) call requires to
fail the operation.

The stat() call is needed for loading private keys though, to make
sure permissions are restrictive enough.

This commit renames the function as indicated in the subject and
drops the second parameter. In crypt.c we now call this function for
private keys only.
</content>
</entry>
<entry>
<title>Move base64 implementation to own file.</title>
<updated>2016-08-23T14:29:34Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2014-06-10T15:52:22Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=3ea5399aeec092dcdb9f039288f1e146aadbb2f7'/>
<id>urn:sha1:3ea5399aeec092dcdb9f039288f1e146aadbb2f7</id>
<content type='text'>
The base64 decoder is independent of anything else, so it should not
be part of the crypto API. This patch moves the two public functions
uudecode() and base64_decode() to a new file, base64.c, and introduces
base64.h to declare them.
</content>
</entry>
</feed>
