Evgeny Poberezkin
5e29e3698e
binary SMP protocol encoding, split Command type to two types ( #245 )
...
* binary SMP protocol encoding (server tests fail)
* use 1 byte for bytestring length when encoding/decoding
* Encoding class, binary tags
* update server tests
* negotiate SMP version in client/server handshake
* add version columns to queues and connections
* split parsing SMP client commands and server responses to different functions
* check uniqueness of protocol tags
* split client commands and server responses/messages to separate types
* update types in SMP client
* remove pattern synonyms for SMP errors
* simplify getHandshake
* update SMP protocol encoding in protocol spec
* encode time as a number of seconds (64-bit integer) since epoch
2022-01-01 13:10:19 +00:00
Evgeny Poberezkin and Efim Poberezkin
5e3f66a4cb
update DB fields presentations: port, QueueStatus, RcvMsgStatus, SndMsgStatus ( #244 )
...
* make port nullable
* make conversions of enum types to/from text explicit; remove unused statuses/fields
* Update src/Simplex/Messaging/Agent/Store.hs
* rename RcvMsgStatus constructors
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com >
2021-12-30 09:33:47 +00:00
Evgeny Poberezkin
c66f9efa55
merge migrations, prepare schema for multiple queues per connection ( #243 )
...
* merge migrations into initial
* update connection/queue tables in schema, simplify creating connections
* refactor create connection
* remove queue fields from connections table
* update server constraints
2021-12-29 17:55:27 +00:00
Evgeny Poberezkin
73cad5a6c4
simple per-queue e2e encryption with NaCl crypto_box ( #242 )
...
* simple per-queue e2e encryption with NaCl crypto_box
* add e2e keys and DH secrets to schema
* agree and save shared DH secret per queue (not used yet)
* protocol changes for uniform padding and message part lengths
* correct message structure diagrams
* make per-queue E2E encryption non-optional
* refactor crypto keys
* use NaCl crypto_box for per-queue E2E encryption, remove RSA keys from queues
* remove RSA support
* merge migration with E2E DH keys
* clean up
* remove unused methods
* parsing/serializing agent messages
* remove sender timestamp from DB and code
* clean up
* slean up
* s/SMPConfMsg/SMPConfirmation/
* serializeAgentMessage = serializeClientMessage . agentToClientMsg
* simplify error handling
* update protocol docs
2021-12-29 14:27:10 +00:00
Evgeny Poberezkin
323fb1f03c
remove SMP server signing responses ( #226 )
...
* remove SMP server signing responses
* keep only one session ID
2021-12-16 07:15:45 +00:00
Evgeny Poberezkin
bfa05c9432
all tests pass!
2021-12-12 21:17:25 +00: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
Evgeny Poberezkin
26b0edabfc
refactor with RecordWildCards ( #181 )
2021-08-22 13:19:38 +01:00
Evgeny Poberezkin
84ce001598
database migrations ( #153 )
...
* database migrations
* fix: reverse order of down migrations
* use positional parameters in queries
* simplify migrations
* typo
* rename SchemaMigration to Migration
* move store initialization to IO monad
2021-05-31 16:38:35 +01:00