GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — exe.dev/sshminisig at main · boldsoftware/exe.dev

Expand file tree

/

sshminisig

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

sshminisig

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
cmd/sshminisig
cmd/sshminisig
 
 
go.mod
go.mod
 
 
readme.md
readme.md
 
 
sshminisig.go
sshminisig.go
 
 
sshminisig_test.go
sshminisig_test.go
 
 

readme.md

The Armored SSH Signature format is rich and robust. It contains the public key, the namespace, and more.

It is also long.

In some circumstances, you have out of band information and length matters.

sshminisig is a format to encode the bare minimum needed for the signature, assuming all other information, including framing, is done by an outer protocol.

The format is the concatenation of:

  • one byte prefix indicating the combination of signature algorithm and hash algorithm
  • the signature, base64url-encoded, without padding

Prefixes (shown as ASCII byte):

| Prefix | Sig Algorithm                      | Hash Algorithm | Notes                                               |
|--------|------------------------------------|----------------|-----------------------------------------------------|
| e      | ssh-ed25519                        | sha512         | Ed25519 internally uses SHA-512, so this is typical |
| r      | rsa-sha2-256                       | sha256         | Modern RSA variant                                  |
| s      | rsa-sha2-512                       | sha512         | Modern RSA variant                                  |
| c      | ecdsa-sha2-nistp256                | sha512         | NIST P-256 curve                                    |
| d      | ecdsa-sha2-nistp384                | sha512         | NIST P-384 curve                                    |
| p      | ecdsa-sha2-nistp521                | sha512         | NIST P-521 curve                                    |
| f      | [email protected]         | sha512         | Hardware security key (FIDO2)                       |
| g      | [email protected] | sha256         | Hardware security key (FIDO2)                       |
| 2      | ssh-rsa                            | sha256         | Legacy RSA, SHA-1 deprecated                        |
| 5      | ssh-rsa                            | sha512         | Legacy RSA, SHA-1 deprecated                        |
| z      | RESERVED                           | RESERVED       | Reserved for forward-compatibility / version bumps  |

The package github.com/boldsoftware/exe.dev/sshminisig is a Go package that converts an Armored SSH Signature (such as that outputted by ssh-keygen -Y sign) into an sshminisig. It could be implemented more concisely using (say) github.com/hiddeco/sshsig. But it isn't much code, and by implementing it using only the standard library, the hope is that it'll be easier to port to other languages as needed.

The command github.com/boldsoftware/exe.dev/sshminisig/cmd/sshminisig provides a simple stdin-to-stdout converter.

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.