Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/tjgq/netclip

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/tjgq/netclip

  • v0.0.0-20140916163103-0de3fdafbf2b
  • Source
  • Go
  • Socket score

Version published
Created
Source

netclip

Netclip is a protocol for synchronizing the text clipboard of two or more peers in the same local network. It provides confidentiality and supports multiple concurrent users.

A reference client is available at http://github.com/tjgq/netclipper.

Description

Transport

The protocol exchanges packets on UDP port 2547 over the 224.0.0.1 link-local multicast address.

Message structure
+-------+------+----+------+-----+---------+-----+
| Magic | HMAC | IV | Time | Len | Payload | Pad |
+-------+------+----+------+-----+---------+-----+
  • Magic (4 bytes) is the ASCII encoding of the string 'CLIP'.

  • HMAC (32 bytes) is the SHA-256 Keyed-Hash Message Authentication Code (FIPS 198) for the remainder of the message (IV, Time, Len, Payload, Pad).

  • IV (16 bytes) is an initialization vector for the encryption algorithm.

The remainder of the message (Time, Len, Payload, Pad) is encrypted in AES-256 CBC mode (FIPS 197) with initialization vector IV.

  • Time (8 bytes) is a 64-bit Unix time in network byte order.

  • Len (2 bytes) is the payload length in bytes, in network byte order.

  • Payload (variable length) is a UTF-8 encoded text string.

  • Pad (variable length) are zero or more null bytes such that the length of (Time, Len, Payload, Pad) is a multiple of 16 bytes.

Notes

All protocol peers belonging to the same user must use a shared key used for encryption/decryption and message authentication. This provides confidentiality and allows the rejection of messages intended for other users running the protocol in the same local network.

The protocol provides limited protection against replay attacks. A message whose Time does not belong to a 1-minute window centered on the current 64-bit Unix time is rejected. As a consequence, clock synchronization is required among protocol peers.

Message delivery is not guaranteed. The protocol makes no provisions for the acknowledgement or retransmission of messages.

Message size cannot exceed 65507 bytes, the maximum data length for a UDP packet. The system's TCP/IP stack may impose a lower limit.

FAQs

Package last updated on 16 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc