Documentation ¶
Overview ¶
Most of this code is copied from the golang.org/x/crypto/blowfish package.
Source modified to work with the customized PSOBB Blowfish implementation, which uses fewer rounds. Work based off of the encryption library written by Fuzziqer Software (http://www.fuzziqersoftware.com/).
* Blowfish implementation adapted to work with PSOBB's protocol.
PSOPC encryption algorithm.
The cipher used PC/Gamecrube is not symmetrical in that decrypting a block previously encrypted with this cipher will not yield the same result due (I think) to the key rotations.
Index ¶
Constants ¶
const BlowfishBlockSize = 8
BlowfishBlockSize is the Blowfish block size in bytes.
const PSOPCBlockSize = 4
PSOPCBlockSize is the number of bytes the block cipher operates on at once.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PSOCrypt ¶
type PSOCrypt struct { Vector []uint8 // contains filtered or unexported fields }
PSOCrypt object to be used per-client for crypto.
func NewBBCrypt ¶
func NewBBCrypt() *PSOCrypt
Returns a newly allocated PSOCrypt with randomly generated, appropriately sized keys for encrypting packets over PSOBB connections.
func NewBBCryptWithVector ¶
func NewPCCrypt ¶
func NewPCCrypt() *PSOCrypt
Returns a newly allocated PSOCrypt with randomly generated, appropriately sized keys for encrypting packets over PSOPC connections.