R4 encryption algorithm

気になってたので色々調べてます。M3DSS-JとR4-E持ってるので。

とりあえずUbuntuで、先人の発見した復号化アルゴリズムコンパイルすることができました。↓こんなパッチの需要があるかどうか不明ですが貼り付けておきます。

#!/bin/sh

# r4denc patch for linux
# (r4denc ... http://home.usay.jp/pc/etc/nds/index_en.html)

sed -e '30s/unsigned //;46,54s/xor/x_or/;78s/xor/x_or/;' src/r4dec.cpp > src/r4dec_lin.cpp
gcc -lstdc++ -o r4dec src/r4dec_lin.cpp

sed -e '30s/unsigned //;46,56s/xor/x_or/;' src/r4enc.cpp > src/r4enc_lin.cpp
gcc -lstdc++ -o r4enc src/r4enc_lin.cpp