Swiftpack.co - swift-libp2p/swift-libp2p-noise as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by swift-libp2p.
swift-libp2p/swift-libp2p-noise 0.1.3
A LibP2P Stream Security protocol
⭐️ 3
🕓 1 year ago
iOS macOS
.package(url: "https://github.com/swift-libp2p/swift-libp2p-noise.git", from: "0.1.3")

LibP2PNoise

Swift Package Manager compatible Build & Test (macos and linux)

A LibP2P Stream Security protocol

Table of Contents

Overview

Noise is a connection security protocol. It provides a secure transport channel for swift-libp2p based on the Noise Protocol Framework. Following an initial plaintext handshake, all data exchanged between peers using swift-libp2p-noise is encrypted and protected from eavesdropping.

⚠️ Warning

This package has NOT been extensively tested in real world applications and should NOT be used in production environments. Although the actual cryptography is handled by swift-crypto, the handshake logic could, and probably does, contain a myriad of bugs. Please feel free to look over the code and submit improvements where you see fit.

Note:

Install

Include the following dependency in your Package.swift file

let package = Package(
    ...
    dependencies: [
        ...
        .package(name: "LibP2PNoise", url: "https://github.com/swift-libp2p/swift-libp2p-noise.git", .upToNextMajor(from: "0.1.0"))
    ],
    ...
        .target(
            ...
            dependencies: [
                ...
                .product(name: "LibP2PNoise", package: "swift-libp2p-noise"),
            ]),
    ...
)

Usage

Example

import LibP2PNoise

/// Tell libp2p that it can use noise to secure connections...
app.security.use( .noise )

API

Not Applicable

Contributing

Contributions are welcomed! This code is very much a proof of concept. I can guarantee you there's a better / safer way to accomplish the same results. Any suggestions, improvements, or even just critques, are welcome!

Let's make this code better together! 🤝

Credits

License

MIT © 2022 Breth Inc.

GitHub

link
Stars: 3
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics