Skip to content

Latest commit

 

History

History
152 lines (127 loc) · 13.7 KB

README.md

File metadata and controls

152 lines (127 loc) · 13.7 KB

ATP

Airgapped Transfer Protocol

A standard for transfering Files between airgapped units over a simplex transmission agnostic to the medium, transfer speed and distribution network.

Why?

TL;DR:

I wanted to find a sleek and secure way to exchange private keys securely and conveniently between devices that only have a cameras and screens.

  • Said Keys exceeded the size of a QR Code, so I had to manually split and merge them, which was annoying me into "weapons-grade boredom".

So I started this here...

Sensitive and Classified Information Exchange

Not everything can or should be transfered in the open, or at least not in a way that makes it trivial to eavesdrop and/or manipulate data being transfered.

Deployment of Updates onto Airgapped Systems

To prevent "Juice Jacking" and other methods of attacks onto systems by physically connecting data lines to them.

Thus Over-The-Air Updates are just not possible!

Circumvent the issues of an RF transmission.

It may sometimes not feasible or desireable to transmit on certain bands, as they may suffer from overuseage if not malicious interference of the spectrum as DoS or DDoS attack.

  • In many cases, this may even be illegal as per protocol.

Why not use existing protocols?

Most existing Protocols don't handle simplex transmissions at all or very poorly.

Espechally for Commercial Off-The-Shelf (COTS) Hardware and Software outside the Hamradio Space there is significant lack of solutions that are easy to use even by "Tech Illterates".


How?

The ATP Standard aims to be easy to implement and use.

Encoding

1. Archive Generation

The data to be tansmitted is to be collected in a container [this may be a folder or tar archive].

2. Optional Compression

The Container is then to be compressed if desired.

  • Compression is optional and can be omnitted.
    • Compression should be omnitted if the output is "not smaller" in that it could save any space in the sense of outputting less "splinters".

3. Encryption

The optionally compressed Container can also be encrypted.

4. Checksumming

The Container is then checksummed.

  • Checksumming can, but should not be omnitted.
    • A secure algorithm like SHA3-512 is recommended.

5. Header Creation

A Header is being used to communicate the essential parameters, including the following:

  • Compression [if used, which type]
  • Encryption [if used, which type]
  • Checksum [if used]
  • Total Size of the Container in bytes
  • Number of Splinters [as of now, a maximum of 2¹⁶-1 = 65535 is specified]
    • This is considered sufficient for the current use-case, as this allows up to 193.524.855 bytes or ~ 184,56 MB of storage just by using QR Codes of 2.953 bytes each.
    • In practical use, it's expected that rarely more than a few dozen or hundred will be needed to transfer said data.
    • The first splinter must contain the header.
  • Size of the Splits [as of now, a maximum of 2¹⁶-1 = 65535 bytes is specified.]
  • Unix Timestamp of Creation [can be omnitted.]
  • Checksum of the header [if used, which type]
Optional Link to a "How To Decode?" - Tutorial if need be.

This should help uninitiated people to actually recieve and decode it.

6. Splitting

To fit within the constraints of the medium used to transfer, the [optionally compressed] container is being split-to-size based off the parameters given.

7. Storage and/or Transfer

The Splitted Parts [which may be called splinters] will then be stored and if necessary, converted into the format that is desireable for transfer.

Since the System is designed to do Simplex Data Transfers, it can be be retransfered or time-shifted as desired.

Decoding

Basically the same prcess as Encoding in reverse.

It's vital to have the complete header decoded successfully.

Acknowledgements

Proof of Concepts

In fact, one could just take a file, encode it in as Base64 as per RFC 4648 and spit it out as QR Code.

Name

The name is chosen as a resemblance to FTP as it aims at similar goals.

Since it not only can transfer Files but anything, ATP seemed to be a better naming for it.

Existing solutions

Archive Splitting

Archive Formats like RAR, BZip2 and 7zip's 7z Format among others do natively support splitting of files, something TAR, PAX don't.

  • Of course there are multiple ways to do that on the command line, but that's not an easy solution and does require quite a good knowledge on how to do this.
    • It's also not trivial to reassemble the split archives unless natively supported by said application.
  • It's quite cumbersome for a lot of work and not easy to do by Tech-Illiterates.
    • Whilst solutions like PeaZip support cascaded encryption, they are not multi-platform.

Applications already in public existance

  • Updates for REINER SCR Authenticator Devices are being distributed via YouTube Videos
    • These contain a series of QR Codes being shown multiple times to be scanned by the device and reassebled into a firmware update file.
      • This allows for updating the device in a secure manner by denying any opportunity for Juice Jacking and keeping said authenticator as an encapsulated decice and thus not needing to break any anti-tampering seals.
    • It is very likely these basically use a proprietary Imprementation of ATP that predates it with integrity checking, digital signatures and potentially even encryption to prevent malicious updates to be distributed and loaded.
      • At least that's what I hope for...

Which are a patented Secure QR Codes that are encrypted in part or whole.

  • These aim at the same, however being a patented and proprietary standard, to avoid infringement the ATP Standard aims to be more general and media-agnostic.

Which is a PSD2-compliant TAN System designed to authenticate Bank Transactions.

  • It typically uses a 25x25 pixel grid which has either red, green, blue or no [white] dots and can encode around 100 Bytes od Data.
    • It is being used with either Apps or dedicaded devices to Authorize Transactions.