-
Class Summary
Class |
Description |
SignLibCmd |
Command line utilities for SignLib
Arguments:
-g: generates an RSA keypair
-s: signs 'data' with the private key
-v: verifies 'data' with the signature and public key
-m: simulates a client-server environment
|
SignLibHost |
The abstract SignLib host (server).
|
SignLibImpl |
Implementation of SignLib functions.
|
SignLibUser |
The abstract SignLib user (client).
|
Package csokicraft.util.signlib Description
SignLib is an authentication/datasigning library
The authentication process is as follows:
Host(S), has the public key (pk) <-> half-duplex channel <-> User(C), has the private key (Pk)
1. S creates a HI packet and sends it
2. C receives it, signs the data with the Pk and responds with a SUP packet
3. S gets the response and verifies it against the pk. If they match, it processes the 'cmd' in SUP
The packet structure: PACKETID, field1(length in bytes), field2()...
PKID_HI: id(1), dlen(2), data(dlen)
PKID_SUP: id(1), sig(256), clen(2), cmd(clen)
Note: 'len' fields are low-endian, meaning the lower byte comes first