## 2 Materials and Methods
### Black Box Data Management  
The proposed system utilizes blockchain technology and encryption methods to securely manage the driving and charging data of electric vehicles. Specifically, it implements a comprehensive security system through the combination of RSA public key encryption for data confidentiality and the SHA-256 hash function for integrity verification. **Application of RSA-2048 encryption:** Each electric vehicle \(i\) applies the asymmetric encryption algorithm RSA-2048 to the black box data \(D_{i,t}\) collected at time \(t\), generating the ciphertext \(E_{i,t}\), which is then stored in local storage. RSA is one of the most widely used public key encryption techniques in modern cryptography, proposed in 1977 by [PERSON], [PERSON], and [PERSON]. The security of RSA is based on the computational complexity of factoring large composite numbers, and its strength is determined by the key length. In this system, a 2048-bit key length is used for a secure implementation of RSA, which is expected to provide sufficient security until after 2030, as recommended by the National Institute of Standards and Technology (NIST). The encryption process is performed using the private key \(K_{i}\) owned by each electric vehicle, and can be expressed as follows:  
\[E_{i,t}=\text{RSA-2048}(K_{i},D_{i,t})\]  
**Utilization of SHA-256 hash function:** Storing original data directly on the blockchain could lead to capacity burdens and privacy issues. Therefore, the proposed system adopts a method of recording only the hash value of the ciphertext on the blockchain to prove data integrity. Specifically, each electric vehicle applies the SHA-256 algorithm to the generated ciphertext \(E_{i,t}\), calculating a 256-bit length hash value \(H_{i,t}\), which is then uploaded to the blockchain. \[H_{i,t}=\text{SHA-256}(E_{i,t})\]  
SHA-256 is a cryptographic hash function announced by the National Security Agency (NSA) in 2001 and is a representative algorithm of the SHA-2 family. A hash function takes an input of arbitrary length and produces a fixed-length pseudorandom output (digest), which is one-way, making it difficult to deduce the input from the output. It also satisfies weak collision resistance, where it is highly unlikely for two different inputs to produce the same output. With these characteristics, the SHA-256 hash value acts as a fingerprint of the original data. Therefore, by verifying the ciphertext \(E_{i,t}\) through the recorded hash value \(H_{i,t}\) on the blockchain, the existence and integrity of the original data \(D_{i,t}\) can be simultaneously proven. If the data are altered post hoc, the hash value calculated from the changed content will not match the value stored on the blockchain, allowing the immediate detection of tampering or forgery. **Benefits of blockchain-based management:** The metadata (ciphertext and hash value) generated through the encryption and hashing processes is managed through a decentralized blockchain network rather than a traditional centralized management system. The blockchain is a distributed ledger technology where multiple nodes collaboratively participate in verifying and recording data, characterized by high availability, integrity, and transparency. Specifically, the hash values uploaded by each electric vehicle are collected at regular intervals to form a block, and only the blocks agreed upon by all nodes are added to the shared ledger. The integrity of the block is ensured through a linked structure that includes the hash value of the previous block and consensus algorithms such as proof-of-work. Thus, tampering with the hash values contained in the block is virtually impossible, directly leading to the integrity of the original data. Furthermore, by utilizing a decentralized blockchain network, the proposed technique secures trust among multiple stakeholders without reliance on a specific institution. It also eliminates centralized management points, resolving single points of failure (SPoF) and enabling permanent and transparent audit trails.