Skip to content

cryptopeer.net

Open-source P2P libraries for Dart and Go

Secure peer-to-peer networking, from transport to messaging.

Connect devices directly, with no central server in the path. cryptopeer provides a UDP transport, a complete libp2p stack for Dart and Flutter, and store-and-forward messaging for peers that are offline.

pubspec.yamldart_libp2p: ^2.0.0
main.dart
const udx = '/ip4/0.0.0.0/udp/0/udx';
final a = await createHost(listen: udx);
final b = await createHost(listen: udx);
// Authenticated with Noise, multiplexed over UDX
await a.connect(AddrInfo(b.id, b.addrs));
print('Connected to ${b.id}');

Three families of libraries. Each builds on the one below it, and each can be used on its own.

The same stack exists in Dart and in Go. A Flutter app and a Go server speak the same transport and protocols, so they connect directly.

LayerDartGo
ApplicationsRicochet clientRicochet servergo-p2p-forge
ProtocolsGossipSubKademlia DHTBitswapMerkle-CRDTgo-libp2p pubsub, kad-dht upstream
libp2pdart_libp2pgo-libp2p upstream
Transportdart_udxgo-udxUDX transport
NetworkUDP, secured with Noise. Dart and Go peers connect to each other directly.

Authenticated by default

Every peer is an Ed25519 key. Each connection runs a Noise handshake that proves both identities, with no accounts or certificate authorities.

Built for mobile networks

Phones sit behind carrier NATs and change networks mid-session. Connection migration, relays and hole punching keep them reachable.

Delivery when peers are offline

Ricochet servers hold messages and documents for peers that are offline. Payloads can be end-to-end encrypted so the server never reads them.

Dart and Go interoperate

Both languages share the wire formats. Where the formats must match byte for byte, both repositories test against the same vectors.