diegomrsantos
62f2d85f11
fix: add gcc 14 support ( #1151 )
...
- Add ubuntu-24-gcc-14 target on CI.
https://github.com/vacp2p/nim-libp2p/issues/1156 prevents us from using
only Ubuntu 24.
- Made the changes necessary to support gcc 14. More info on
https://github.com/status-im/nim-bearssl/pull/62
Fixes https://github.com/vacp2p/nim-libp2p/issues/1150
2024-08-01 14:50:44 +02:00
diegomrsantos
dc83a1e9b6
chore(formatting): format the whole codebase using nph 0.5.1 ( #1118 )
2024-06-11 17:18:06 +02:00
Jacek Sieka
b76bac752f
avoid importing `ecnist` when not needed ( #942 )
2023-08-30 11:39:48 +02:00
Tanguy
c76d1e18ef
Remove nim 1.2 support ( #907 )
2023-06-07 11:12:49 +00:00
Tanguy
225accd11b
Less warnings ( #813 )
...
Co-authored-by: Diego <diego@status.im>
2023-05-18 10:24:17 +02:00
Tanguy
c11772c94e
Happy new year! ( #847 )
2023-01-20 15:47:40 +01:00
Miran
2fbe82bf9d
make it more Nim 1.4+ compatible ( #742 )
2022-08-03 13:33:19 +02:00
tersec
4ca1c2d7ed
--styleCheck:error ( #743 )
...
* --styleCheck:error
* PeerID -> PeerId
* other libp2p styleCheck changes
* MessageID -> messageId; topicID -> topicId
2022-07-27 11:47:50 +00:00
Tanguy
d0523fdc9d
Documentation ( #716 )
2022-07-01 20:19:57 +02:00
Tanguy
a7e335e1bb
Remove Br prefix from BearSSL ( #728 )
...
ref status-im/nim-bearssl#27
2022-06-16 10:08:52 +02:00
Tanguy
d4ff1c88e9
Less warnings ( #710 )
2022-05-24 15:10:57 +02:00
Tanguy
df566e69db
Fixes for style check ( #676 )
2021-12-16 11:05:20 +01:00
Etan Kissling
2373ee0061
harden `ecnist` byte export against uninitialized key ( #671 )
...
Currently, `ecnist`'s `toBytes` and `getBytes` methods operate only on
properly initialized keys. If an un-initialized key is given, an
`IndexError` may be raised if the key's `xlen` / `qlen` property is
larger than the maximum buffer size. This patch hardens those functions
to report a proper error in that case.
Note that the library functions called by `init` and `initRaw` already
reject data that does not have the expected length, so these new checks
should not be reachable in practice.
2021-12-13 18:46:25 +00:00
Tanguy Cizain
8cddfde837
Rename getKey -> getPublicKey ( #621 )
...
* rename getKey to getPublicKey
* use publicKey directly in gossipsub
* update error messages
2021-09-02 12:03:40 +02:00
Giovanni Petrantoni
75b023c9e5
gossipsub audit fixes ( #412 )
...
* [SEC] gossipsub - rebalanceMesh grafts peers giving preference to low scores #405
* comment score choices
* compiler warning fixes/bug fixes (unsubscribe)
* rebalanceMesh does not enforce D_out quota
* fix outbound grafting
* fight the nim compiler
* fix closure capture bs...
* another closure fix
* #403 rebalance prune fixes
* more test fixing
* #403 fixes
* #402 avoid removing scores on unsub
* #401 handleGraft improvements
* [SEC] handleIHAVE/handleIWANT recommendations
* add a note about peer exchange handling
2020-10-30 21:49:54 +09:00
Eugene Kabanov
d47b2d805f
Use constant-time hex encoding/decoding procedures explicitly. ( #305 )
...
* Use constant-time hex encoding/decoding procedures explicitly.
* Add comments.
2020-08-11 08:48:21 -06:00
Eugene Kabanov
7c1aac5dc1
Use constant-time comparison for keys and signatures. ( #299 )
2020-08-08 08:53:33 +02:00
Jacek Sieka
45c089ff0d
noise updates ( #255 )
...
* clear secrets explicitly
* simplify keygen
* avoid some trivial memory allocations
* fix little endian encoding of nonce
2020-07-09 02:53:19 -06:00
Jacek Sieka
d522537b19
reuse single RNG instance for all crypto key generation ( #249 )
...
* reuse single RNG instance for all crypto key generation
* use foolproof rng
* initRng -> newRng (because it's ref)
* fix test
* imports/exports, chat fix
* fix rsa
* imports and exports
* work around threadvar issue
* fixup
* mac workaround test
2020-07-07 13:14:11 +02:00
Giovanni Petrantoni
7dcb807f64
Crypto utilities resultification ( #150 )
2020-05-18 07:25:55 +02:00
Giovanni Petrantoni
1c4d72f5e3
Use Result construct in minasn1 ( #144 )
2020-04-23 14:10:20 +02:00
Zahary Karadjov
454f658ba8
Fixes and tweaks related to the beacon node integration
...
* Bugfix: Dialing an already connected peer may lead to crash
* Introduced a standard_setup module allowing to instantiate
the `Switch` object in an easier manner.
* Added `Switch.disconnect(peer)`
* Trailing space removed (sorry about polluting the diff)
2019-12-08 23:58:43 +02:00
cheatfate
833e8c9406
Fix overflow problem.
...
Fix compilation warnings.
2019-10-29 20:51:48 +02:00
Yuriy Glukhov
1ecdf159bb
Extern bearssl
2019-10-08 14:41:24 +03:00
cheatfate
7138f7e94d
Add more primitives for SecIO.
...
Fix SIGSEGV inside of rsa.nim and ecnist.nim.
2019-09-11 19:03:39 +03:00
Zahary Karadjov
d5b51bcf9e
Use CatchableError
2019-06-24 05:39:13 +03:00
cheatfate
b235c84bb2
Add key interface with test vectors.
2019-03-02 21:19:41 +02:00
cheatfate
14686714c0
Add raw init functions for ecnist.nim
...
Add ECDHE helpers for ecnist.nim
Add test vectors for ECDHE.
2019-03-01 08:34:52 +02:00
cheatfate
2a2e378ced
Fix checkScalar in ecnist.
...
Add ed25519 and tests.
Add some comments.
2019-02-28 14:17:39 +02:00
cheatfate
cb334cc8ab
Fix inline documentation.
2019-02-25 20:03:52 +02:00
cheatfate
887795bbd2
Final RSA changes.
...
Add RSA tests and test vectors.
2019-02-24 02:07:13 +02:00
cheatfate
1aaf4797c9
Finish EC NIST curves implementation.
...
Add EC NIST curves tests and test vectors.
2019-02-22 13:32:15 +02:00
cheatfate
f67a7a2a3e
Add minimal ASN.1 encoding/decoding primitives.
...
Add ASN.1 DER serialization for EC NIST curves.
2019-02-21 06:10:21 +02:00
cheatfate
52f88dbd1e
Initial commit, not ready yet.
2019-02-20 00:11:59 +02:00