~apreiml

Austria

https://denkmaschine.at/

~apreiml/public-inbox

Last active 2 years ago
View more

Recent activity

[PATCH hare] crypto::bigint: improve some function names 3 days ago

From Armin Preiml to ~sircmpwn/hare-dev

to fit the hare style better.

Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
---
 crypto/bigint/+test/encoding.ha | 10 +++++-----
 crypto/bigint/+test/monty.ha    | 16 ++++++++--------
 crypto/bigint/+test/utils.ha    |  2 +-
 crypto/bigint/README            |  2 +-
 crypto/bigint/arithm.ha         |  4 ++--
 crypto/bigint/encoding.ha       |  6 +++---
 crypto/bigint/monty.ha          |  4 ++--
 7 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/crypto/bigint/+test/encoding.ha b/crypto/bigint/+test/encoding.ha
[message trimmed]

Re: [PATCH hare v2] add crypto::bigint 6 days ago

From Armin Preiml to ~sircmpwn/hare-dev

I'm still not happy about the following function names. Ideas and 
suggestions are very welcome:

wordsize: The function returns the length of the []word array required 
to store a bigint. Maybe encodelen, similar to decodelen, if decodelen 
is a agreeable name.

from_monty and to_monty: Maybe just leave out the underscore.

[PATCH hare v2] add crypto::bigint 19 days ago

From Armin Preiml to ~sircmpwn/hare-dev

Most of the BearSSL functions are ported, except notably moddiv. Which
will be sent later in a separate patch, once it's ready for use.

Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
---
v2:
 * add asserts where appropriate
 * fixed a bug to properly count bits during encode, if dest is non-zero
 * minor doc fixes

 crypto/bigint/+test/arithm.ha   | 111 ++++++++
 crypto/bigint/+test/encoding.ha |  91 +++++++
 crypto/bigint/+test/monty.ha    |  51 ++++
 crypto/bigint/+test/utils.ha    |  41 +++
[message trimmed]

[PATCH hare] build: remove LOCALSRCDIR 22 days ago

From Armin Preiml to ~sircmpwn/hare-dev

As discussed in IRC the localsrcdir should not be part of install. 
It's also removed from the example config to avoid duplicate paths
in the hare build environment, if the config is used as a template.

Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
---

 Makefile          | 2 +-
 config.example.mk | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index bdb2fd93..3b98057b 100644
--- a/Makefile
[message trimmed]

Re: [PATCH hare] add crypto::bigint 23 days ago

From Armin Preiml to ~sircmpwn/hare-dev

On 8/29/22 14:08, Drew DeVault wrote:
> What does the "announced" bit length mean?

The actual bits required to represent the integer.

>> +++ b/crypto/bigint/arithm.ha
>> +// Adds 'b' to 'a' and stores the result into 'a' if 'do' is 1. Returns the
>> +// carry, if the addition overflows.
>> +//
>> +// 'a' and 'b' must have the same effective word length.
>> +export fn add(a: []word, b: const []word, do: u32) u32 = {
> 
> Not sure if I understand this "do" parameter.

[PATCH v3 4/4] fix cmd ssh-agent new key format 27 days ago

From Armin Preiml to ~sircmpwn/hare-dev

---
 cmd/ssh-agent/main.ha | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmd/ssh-agent/main.ha b/cmd/ssh-agent/main.ha
index ead0c6d..66429ab 100644
--- a/cmd/ssh-agent/main.ha
+++ b/cmd/ssh-agent/main.ha
@@ -17,7 +17,7 @@ let running: bool = true;

type identity = struct {
	comment: str,
	privkey: ssh::key,
	privkey: *ssh::key,
[message trimmed]

[PATCH v3 3/4] format::ssh::decodepublic: rename sink to src 27 days ago

From Armin Preiml to ~sircmpwn/hare-dev

---
 format/ssh/key.ha | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/format/ssh/key.ha b/format/ssh/key.ha
index 775456f..e530ab6 100644
--- a/format/ssh/key.ha
+++ b/format/ssh/key.ha
@@ -61,8 +61,8 @@ export fn decodeprivate(src: *sshprivkey) (*key | error) = {
};

// Decodes a public key in the SSH public key format.
export fn decodepublic(sink: io::handle) (*key | error) = {
	const keytype = readstr(sink)?;
[message trimmed]

[PATCH v3 2/4] net::ssh::agent::proto: fix format::ssh::key compability 27 days ago

From Armin Preiml to ~sircmpwn/hare-dev

---
 net/ssh/agent/proto.ha | 5 +++--
 net/ssh/agent/types.ha | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/net/ssh/agent/proto.ha b/net/ssh/agent/proto.ha
index fd9f9cf..ae47a0c 100644
--- a/net/ssh/agent/proto.ha
+++ b/net/ssh/agent/proto.ha
@@ -75,9 +75,9 @@ fn parse_sign_request(src: io::handle) (sign_request | invalid) = {
fn parse_add_identity(src: io::handle) (add_identity | invalid) = {
	const keytype = readstr(src)?;
	// TODO: Support more key types
	const key: ssh::key = switch (keytype) {
[message trimmed]

[PATCH v3 1/4] add key vtable to support multiple keys 27 days ago

From Armin Preiml to ~sircmpwn/hare-dev

---
v2: reworked the key vtable according to Drews feedback. Also added all
the other functions like decodepub, decodepriv, sign and verify to the
vtable.
v3: rename ed25519_make to new_ed25519key

 cmd/sshkey/main.ha             |  18 ++++--
 format/ssh/+test/key.ha        |   2 +-
 format/ssh/+test/sign.ha       |   6 +-
 format/ssh/+test/sshprivkey.ha |   2 +
 format/ssh/ed25519.ha          | 101 ++++++++++++++++++++++++++++++++
 format/ssh/key.ha              | 102 +++++++++++++++------------------
 format/ssh/sign.ha             |  22 +------
 net/ssh/kex.ha                 |   6 +-
[message trimmed]

Re: [PATCH hare] crypto::cipher::gcm: tag as slice 27 days ago

From Armin Preiml to ~sircmpwn/hare-dev

On 8/29/22 14:18, Drew DeVault wrote:
> I understand. Can you send a revised version of this patch, given that
> you split the const change out?

The const patch was for crypto::hamc not gcm.