- 11 Aug, 2021 1 commit
-
-
tavit ohanian authored
-
- 29 Jun, 2021 1 commit
-
-
tavit ohanian authored
-
- 30 Mar, 2021 2 commits
-
-
Marten Seemann authored
-
Marten Seemann authored
* run go mod tidy * omit receiver name if unused * remove unused type testkey in tests * fix duplicate import of go-multiaddr * fix use of deprecated peer.IDB58{Encode,Decode} * use bytes.Equal instead of bytes.Compare * fix unnecessary assigments to blank identifier * use time.Until instead of t.Sub(time.Now()) * fix use of deprecated go-multihash.ID * add missing error check in envelope test * fix error check in tests
-
- 06 Mar, 2020 1 commit
-
-
Vibhav Pant authored
-
- 10 Feb, 2020 1 commit
-
-
Yusef Napora authored
* add SignedEnvelope type * use struct for SignedEnvelope instead of exposing protobuf directly * doc comments for envelopes * tests for SignedEnvelopes * add helpers to make routing records for Host * fix doc comment * go fmt * add method to peerstore to retrieve signed routing records * update to match spec changes * just use nanoseconds * use proto3 & rename fields to match spec changes * use proto3 for routing records * make envelope fields private & validate on unmarshal * use buffer pool for envelope signatures * tests for RoutingState * go fmt * rename Equals -> Equal, add some comments * use test helpers * get rid of unsigned RoutingState struct, only expose SignedRoutingState * rm batching SignedRoutingStates accessor in peerstore the datastore peerstore implementation doesn't support batched reads, so it's no more efficient to get a bunch of states at once than it is to call SignedRoutingState multiple times. * whitespace * expose struct fields & remove accessors * use camelCase in protos for consistency * use multiformats uvarint for length-prefixes * remove payloadType check when unmarhaling * rm stray ref to golang/protobuf * define CertifiedAddrBook to avoid breaking API change * add events for updated addresses and routing state * remove SignedRoutingStateFromHost helper moving this to go-libp2p * add routing state records, extend peerstore API * fix: rebuild protos with new gogofaster generator * filter private addrs from signed routing records * envelope: use byte slices from pool; adjust interface. * move envelope to record package. * move protobuf files; adjust imports everywhere. * rename RoutingStateRecord -> PeerRecord also removes embedded reference to Envelope from the record, as that was confusing. as a result, the CertifiedAddrBook now accepts/returns record.SignedEnvelope instead of a specialized type. * hoist Seq from PeerRecord to SignedEnvelope * test that PeerRecords can't be signed by wrong key * commit go.sum * add Seq field to envelope signature * fix proto_path in Makefile * fix import ordering * comments for PeerRecord proto message also removes the seq field from PeerMessage proto, since it was moved to the SignedEnvelope * use Record type for envelope payloads * rename SignedEnvelope -> Envelope, unmarshal payload in ConsumeEnvelope * return buffer to pool before early return * doc comments * rename CertifiedAddrBook methods, update comments * cache unmarshalled Record payload inside Envelope * doc comments * store reflect.Type when registering Record * Revert "return buffer to pool before early return" 8d8da386f26482e06dc21989a6b5ade69f0a46d9 misread this - unsigned will be nil if there's an error, so it was right the way it was * use a DefaultRecord for unregistered PayloadTypes instead of returning an error if we don't have a registered Record for a given PayloadType, we can have a catch-all DefaultRecord type that just preserves the original payload as a []byte * cleanup DefaultRecord code a bit - removes unused error return from blankRecordForPayloadType - just references instead of copying in DefaultRecord.UnmarshalRecord I figure this is likely safe, since we'll be unmarshalling from the payload of an Envelope, which shouldn't get altered after it's created. * use explicit payloadType in MakeEnvelopeWithRecord * Revert DefaultRecord commits ae3bc7bdfb657c232229229706854a56effca80b a26c845a766b45ceabd87c17c0801d191650f0d4 * doc comments * move Seq field back to PeerRecord * make diffs optional in EvtLocalAddressesUpdated * more envelope tests * replace MakeEnvelope with record.Seal also: - add Domain and Codec fields to Record interface * fix import * add interface check * rename ProcessPeerRecord -> ConsumePeerRecord also, adds bool `accepted` return value * rename event field, add doc comment * peer record protobuf: fix field casing. * record protobuf: add docs and fix casing. * cleanup: group imports. * nit: split test/utils.go => test/{addrs,errors}.go. Co-authored-by: Raúl Kripalani <raul.kripalani@gmail.com>
-
- 16 Jan, 2020 1 commit
-
-
Raúl Kripalani authored
* event: Add autonat events (#25) * add events for identify (#26) * implement caching for rsaKey.Bytes() * store marshalled protobuf in cache for RsaPublicKey.Bytes() * fix(crypto): fix build when openssl is enabled * add godocs to routability events. Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com> Co-authored-by: Whyrusleeping <why@ipfs.io> Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com> Co-authored-by: Steven Allen <steven@stebalien.com>
-
- 07 Dec, 2019 1 commit
-
-
Dmitry Yu Okunev authored
-
- 28 Oct, 2019 1 commit
-
-
Steven Allen authored
-
- 21 Oct, 2019 1 commit
-
-
Steven Allen authored
Also, add a test.
-
- 30 Sep, 2019 1 commit
-
-
Mike Goelzer authored
-
- 24 Sep, 2019 3 commits
-
-
Steven Allen authored
The check was incomplete as it didn't test the curve. This switches us to use basicEquals (which is also constant-time). Note: This key type isn't used by anyone in-practice (to the best of my knowledge).
-
Steven Allen authored
-
Steven Allen authored
In practice, this is impossible to exploit without being able to corrupt the private key which would allow a much simpler guess-and-check attack. However, it's still a bad practice to compare private key material like this.
-
- 21 Sep, 2019 1 commit
-
-
adam authored
incorporates code review comments from @raulk; changes KeyPairFromKey to KeyPairFromStdKey and improves godoc.
-
- 19 Sep, 2019 3 commits
- 04 Sep, 2019 1 commit
-
-
Jorik Schellekens authored
The docs seem to lie about what these methods do. This is the naive solution since it's my first day looking at go but would it be possible to get these methods to marshal to public or private key correctly by passing a type to them?
-
- 28 Aug, 2019 1 commit
-
-
Cole Brown authored
-
- 06 Aug, 2019 2 commits
-
-
Cole Brown authored
-
Cole Brown authored
-
- 02 Aug, 2019 1 commit
-
-
Steven Allen authored
-
- 01 Aug, 2019 8 commits
-
-
Steven Allen authored
-
Steven Allen authored
-
Steven Allen authored
This also ensures we check that the types are equal, even if we're comparing directly with `k1.Equals(k2)` instead of `KeyEquals(k1, k2)`.
-
-
dignifiedquire authored
-
dignifiedquire authored
-
Cole Brown authored
-
Cole Brown authored
-
- 30 Jul, 2019 1 commit
-
-
Yusef Napora authored
* bring back plaintext 2.0.0 with new constructor * fix deprecation comment * rm unused context argument * only check remote id validity if we actually have keys * bring back msgio & simultaneous read/write
-
- 17 Jul, 2019 1 commit
-
-
Cole Brown authored
-
- 14 Jul, 2019 1 commit
-
-
Raúl Kripalani authored
This reverts commit b5729d89.
-
- 12 Jul, 2019 4 commits
-
-
Cole Brown authored
-
Cole Brown authored
-
Cole Brown authored
-
Yusef Napora authored
* add plaintext/2.0.0 (with ugly protoc hack) * gofmt * gofmt (for real this time) * add `go_package` option to proto files * Revert "add `go_package` option to proto files" 5a543a79bd89d75c9697f852638b8fe56da862f4 * less hacky protobuf imports * add doc comment for PublicKeyFromProto * clean up handshake * go fmt, lol * use network.MessageSizeMax for ggio reader
-
- 10 Jul, 2019 2 commits
-
-
Cole Brown authored
-
Cole Brown authored
-