-
Notifications
You must be signed in to change notification settings - Fork 0
메모리 암호화 방법과 퍼포먼스
Lee Sun-Hyoup edited this page Feb 24, 2014
·
1 revision
- blowfish (openssl 라이브러이에서 가져옴)
- 많이 사용하는 방법
- md5 + SHA1
- 확실한 방법이라고 하지만 느리다
- xor 연산을 이용한 간단한 암호화
- 쉬운 패턴이라 잘 뚫린다
- Checksum 변수를 만들어 메모리 수정을 검출
- 쉬운 방법이지만 뚫리기 쉽다.
- 임의의 암호 키를 설정하는 쓰레드를 만들어 변수의 값을 보호한다
- [http://wininternal.tistory.com/1]
struct EncodeInt
{
BYTE Encoded;
EncodeInt(int value)
{
Encoded = 암호화하기(value);
}
const EncodeInt & operator= (const EncodeInt &rhs);
const EncodeInt & operator* (const EncodeInt &rhs);
int Get()
{
int value = 암호화풀기(Encoded);
return value;
}
};
int main()
{
int damage;
int life;
EncodeInt encodeDamage(damage);
EncodeInt encodeLife(life);
EncodeInt result = encodeLife - encodeDamage;
return 0;
}