3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00
Velocity/native
Andrew Steinborn 1bb84f81df Rewrite native crypto to use OpenSSL
OpenSSL is much more portable and optimized (important for aarch64) and most systems already have a version.

Unfortunately, OpenSSL likes to break their ABI. Thankfully, Velocity's natives system is very flexible largely, so we can provide multiple versions of this crypto.

Versions of the dynamically-linked crypto were compiled on CentOS 7 (still supported until 2024, uses OpenSSL 1.0.x) and Debian 9 (the oldest distro including OpenSSL 1.1.0, whose LTS supports ends in 2022). The choice of distros was intended to cover most modern distributions (2014 and afterwards).

An ARM compilation (using Debian 9) will be published soon.
2020-06-22 20:14:46 -04:00
..
src Rewrite native crypto to use OpenSSL 2020-06-22 20:14:46 -04:00
build.gradle An Easter basket bearing gifts! (#191) 2019-04-24 14:36:49 -04:00
compile-linux.sh Rewrite native crypto to use OpenSSL 2020-06-22 20:14:46 -04:00
README.md Native cryptography support using mbed TLS 2018-08-04 23:46:41 -04:00

velocity-natives

This directory contains native acceleration code for Velocity, along with traditional Java fallbacks.

Compression

  • Supported platforms: macOS 10.13, Linux amd64 (precompiled binary is built on Debian 9 with JDK 8)
  • Rationale: Using a native zlib wrapper, we can avoid multiple trips into Java just to copy memory around.

Encryption

  • Supported platforms: macOS 10.13, Linux amd64
  • Rationale: Using a C library for encryption means we can limit memory copies. Prior to Java 7, this was the only way to use AES-NI extensions on modern processors, but this is less important since JDK 8 has native support.
  • Note: Due to U.S. restrictions on cryptography export, this native is provided in source code form only for now.

OS support

If you are on Alpine Linux, apk add libc6-compat will enable native support.