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
This commit is contained in:
Evgeny Poberezkin authored and GitHub committed 2021-02-28 16:17:28 +00:00
1 parent 927ff230da
commit d96aeb727f
8 files changed
+143 -56

No files matched your search

+6 -2
View File
@@ -69,7 +69,9 @@ data SMPClientConfig = SMPClientConfig
{ qSize :: Natural,
defaultPort :: ServiceName,
tcpTimeout :: Int,
smpPing :: Int
smpPing :: Int,
blockSize :: Int,
smpCommandSize :: Int
}
smpDefaultConfig :: SMPClientConfig
@@ -78,7 +80,9 @@ smpDefaultConfig =
{ qSize = 16,
defaultPort = "5223",
tcpTimeout = 2_000_000,
smpPing = 30_000_000
smpPing = 30_000_000,
blockSize = 8_192, -- 16_384,
smpCommandSize = 256
}
data Request = Request