Page cover

📩데이터 암호화

Alien은 모든 사용자 데이터와 파일을 암호화하여 데이터가 저장 및 전송 중에 무단 접근을 받지 않도록 보장합니다.

  • 로컬 암호화: 사용자 장치에서 로컬 암호화가 수행되며, AES를 사용하여 채팅 기록 및 설정 데이터를 암호화하고, 키는 장치의 안전한 저장 영역에 저장됩니다.

  • 온체인 암호화: 암호화된 데이터의 해시 값은 블록체인에 저장되어 블록체인의 변조 불가성과 투명성을 활용하여 데이터의 무결성과 보안을 보장합니다.

// Example: Data Encryption Storage

import { encrypt, decrypt, generateKey } from 'crypto';

import { storeFileOnIPFS, storeHashOnBlockchain } from './storage';

// Generate AES Key

const aesKey = generateKey('aes', { length: 256 });

// Encrypt File

function encryptFile(file) {

const encryptedFile = encrypt(aesKey, file);

return encryptedFile;

}

// Store Encrypted File and Hash

async function storeFile(file) {

const encryptedFile = encryptFile(file);

const fileHash = await storeFileOnIPFS(encryptedFile);

await storeHashOnBlockchain(fileHash);

}

Last updated