Commit Graph

15 Commits

Author SHA1 Message Date
Efim Poberezkin
5e57c5dfd7 rename remaining occurrences of connection alias into connection id (#265) 2022-01-07 15:37:40 +04:00
Evgeny Poberezkin
04c65d98da support permanent connection link ("contact") in SMP agent protocols (#143)
* open/public queue extension for SMP and SMP agent protocols

* add connection mode - invitation or contact

* use ConnectionMode with REQ and ACPT agent notification/command

* parameterize ConnectionRequest with ConnectionMode

* implement Contact connection mode for permanent connection links

* tests for contact connections
2021-12-04 18:42:08 +00:00
Efim Poberezkin
9f945492dd fix markdown error in crypto rfc (#167) 2021-07-09 04:27:07 +10:00
Evgeny Poberezkin
dffa7a6100 groups agent protocol (#142)
* groups agent protocol

* groups to chat protocol

* update groups doc / diagram

* group protocol commands

* update group protocol

* count messages for different group operations

* broadcast and introduction as components for group protocol

* list connections in the broadcast

* protocol commands overview - using polymorphic commands

* another version of group protocol based on "broadcast" and "introduction" concepts

* update number of messages needed to establish connection

* corrections to broadcast and introduction protocols

* corrections in groups protocol

* corrections
2021-06-01 18:20:12 +01:00
Evgeny Poberezkin
377b166d8e SimplexMQ readme, remove chat client (#125)
* SimplexMQ readme, remove chat client

* link to license

* add roadmap, corrections

* corrections

* strange dot -> colon

* corrections

Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
2021-05-04 07:11:48 +01:00
Evgeny Poberezkin
829c198e5f reserve block size (32 bit) and protocol (16 bit) in client handshake block (#116)
* reserve block size (32 bit) and protocol (16 bit) in client handshake block

* update function names

* fix abnf
2021-05-01 21:58:35 +01:00
Evgeny Poberezkin
5fec6c1755 Sign and verify agent messages (#106)
* sign and verify agent messages with key sent in HELLO (TODO: hardcoded block size - should use size from handshake; verify signature of HELLO message itself; possibly, different MSG status if signature was not verified (currently ignored) or failed to verify (currently fails with AGENT A_ENCRYPTION - alternatively, change it to AGENT A_SIGNATURE))

* remove hardcoded block size, make it 4096 bytes

* verify signature of HELLO message before it is added to RcvQueue

* refactor

* update doc

* rename functions
2021-04-26 20:05:46 +01:00
Evgeny Poberezkin
cddff78719 binary X509 encoding for RSA key send during transport handshake (#105) 2021-04-24 12:46:57 +01:00
Evgeny Poberezkin
9104ff0c4a Merge branch 'master' into v2 2021-04-18 17:03:25 +01:00
Evgeny Poberezkin
5c1e9682c8 streams rfc draft (#64)
* streams rfc draft

* typos

* update streams RFC

Co-authored-by: Efim Poberezkin <efim.poberezkin@gmail.com>
2021-04-17 08:10:23 +01:00
Evgeny Poberezkin
0fbf406800 transport encryption (#65)
* transport encryption (WIP - using fixed key, parsing/serialization works, SMP tests fail)

* transport encryption

* transport encryption: separate keys to receive and to send, counter-based IVs

* docs: update transport encryption and handshake

* transport encryption handshake (TODO: validate key hash, welcome block, move keys to system environment)

* change KeyHash type to newtype of Digest SHA256

* transport encryption: validate public key hash

* send and receive welcome block with SMP version

* refactor: parsing SMPServer

* remove unused function

* verify that client version is compatible with server version (major version is not smaller)

* update (fix) SMP server tests
2021-04-05 13:10:16 +01:00
Evgeny Poberezkin
d96aeb727f improve rsa encryption (#61)
* clrify encryption schemes

* increase SMP ping delay

* include authTag and msg size in encrypted message header, pad messages to fixed size

* use newtype for Key and IV bytestrings

* rename CryptoError constructors

* refactor Word to Int conversion

* refactor padding, replace padding character

* rfc corrections, comment

* rename aesTagSize -> authTagSize

* failing test
2021-02-28 16:17:28 +00:00
Efim Poberezkin
8d05ace601 crypto rfc: clean up e2e (#41) 2021-02-15 20:39:21 +04:00
Efim Poberezkin
1cf1c6a4b1 crypto (#33)
* add crypto rfc

* crypto rfc: fix handshake logic

* transport encryption

* e2e encryption and command verification

* crypto rfc: clarify secrecy of public keys

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2021-02-15 20:22:40 +04:00
Evgeny Poberezkin
3192092349 message management (#32)
* message management rfc

* update message management rfc

* message management ideas (WIP)

* message management updated

* messages RFC

* update agent MSG constructor to include recipient/broker/sender message IDs and timestamps

* remove agent command ACK - agent automatically acknowledges server messages

* correct messages doc
2021-02-26 18:13:04 +04:00