Update README.md

This commit is contained in:
pschord 2016-08-07 17:08:11 -04:00 committed by GitHub
parent b376120dc4
commit 143d014d9d

View file

@ -1,5 +1,5 @@
# PSCrypto
A PlanetSide specific wrapper around CryptoPP for use with Scala or Java. These functions are used for establishing an authenticated and confidential connection between a PlanetSide server and client.
A PlanetSide specific wrapper around CryptoPP for use with Scala, Java, C++ or C. These functions are used for establishing an authenticated and confidential connection between a PlanetSide server and client.
To get the library, run
@ -13,16 +13,23 @@ Or if you already cloned without getting the submodules
git submodule update --init --recursive
```
## Why is this library necessary?
PlanetSide uses an older version of a cryptographic library called CryptoPP (Crypto++). It uses this for encrypting, decrypting, and authenticating _all_ login and world packets. Some of the algorithms used by PlanetSide are depreciated and no longer used for modern crypto. This means that implementations of the algorithms are hard to find.
What we have done is figured out the last known version of CryptoPP that used some of these algorithms, forked it, made it compile, and wrapped it so it could be easily called from server code, which is in Scala. It's possible that these old algorithms could be recreated for new modern code, but this was the easiest option and it closely matched what PlanetSide was doing for crypto.
## Building
GNU Make and an `g++` (GNU C++) required. Builds tested in Debian, Cygwin with Mingw64, and GNUWin32.
GNU Make and `g++` (GNU C++) required. Builds tested in Debian Jessie, Cygwin with Mingw64, and GNUWin32.
In the top-level PSCrypto directory (not the subfolder), run
```shell
$ make -j4 # build for current system
$ make -j4 # will build for current system's GCC
```
This will build the CryptoPP dependency and then the `pscrypto` library, which links to CryptoPP. The pscrypto build artifact will be in pscrypto/ as `libpscrypto.so` or `pscrypto.dll` depending on your platform. Note that the library architecture must match that of the JVM or process you are loading it in to, otherwise you will see loader errors.
Keep in mind that if you are building with Cygwin's GCC (not a cross compiler like MinGW), then your binaries _will not work_ on systems without Cygwin installed!
## Cross Compiling
Use the environment variable `PREFIX` to define a compiler tuple for building. For example
@ -35,7 +42,7 @@ This will build a `pscrypto.dll` for 64-bit Windows. Platform and architecture q
You can also specify the `ARCH` variable manually (as `i686` or `x86_64`) in order to enable multilib building, if available.
## Releasing Code
You are able to create a release on a Linux 64-bit system with the MingW64 compiler toolchain installed. The prefixes required to build are
You are able to create a release on a Linux 64-bit system with the MingW64 compiler toolchain installed. The prefixes required to build in order to support Windows 32,64 and Linux 64-bit are
```
x86_64-w64-mingw32-
@ -43,11 +50,12 @@ i686-w64-mingw32-
x86_64-linux-gnu-
```
Check out [the script to build a release](scripts/build.sh).
Check out [the script to build a release](scripts/build.sh) for more information.
### Release Checklist
### Developer Release Checklist
* Everything builds correctly
* System testing has passed (i.e it works on Windows)
* Version has been bumped in [pscrypto/pscrypto.h](pscrypto/pscrypto.h) and in the Windows resource file [pscrypto/resource.rc](pscrypto/resource.rc)
* A release can be made with the build script
* Release notes have been updated