Fading Coder

One Final Commit for the Last Sprint

Cryptography Fundamentals: Encryption, Signatures, and Verification

Core Cryptographic Concepts Modern systems rely on cryptographic techniques like symmetric encryption, asymmetric encryption, and digital signatures. These mechanisms secure data transmission, authenticate identities, and ensure message integrity. Symmetric Encryption Symmetric algorithms use identi...

Secure API Design: Preventing Data Tampering and Replay Attacks

Overview Background The motivation behind sharing best practices for API security stems from my professional experience, where I have been responsible for implementing such safeguards. Additionally, many backend developers lack deep understanding of these security aspects or are unsure how to achiev...

Implementing SHA1 Hash Algorithm in JavaScript

When builidng web applications, securing data transmission betwean client and server becomes essential. SHA1 (Secure Hash Algorithm 1) provides a one-way cryptographic hash function that converts input data into a fixed-size hexadecimal digest, making it useful for integrity verification and digital...

Solving MISC Challenges in Capture The Flag Competitions

Solving MISC Challenges in Capture The Flag Competitions 1. Basic Flag Format Most flags in CTF competitions follow the format flag{xxxxx}. This first challenge introduces the fundamental concept of finding hidden flags within challenges. The solution for this challenge is: flag{th1s_!s_a_d4m0_4la9}...

Solutions for BUAACTF2023 Challenges

Miscellaneous Which Element A PCAPNG file named Element.pcapng was provided. Extracting a TCP stream revealed four files. The password hint led to a Hexahue cipher decoder. The decoded password 3.1415 unlocked flag.zip, containing three files: flag1.png, flag2.png, and hint.txt. The file sizes sugge...

SM2 Cryptographic Operations with Bouncy Castle on OpenEuler x86_64

Environment Setup Install Java 17 and Maven using the package manager: sudo yum install java-17-openjdk sudo yum install maven These comands configure a complete Java development environment on OpenEuler for building cryptographic applications. Project Configuration Maven Dependencies Create a pom.x...

Practical Cryptography and Network Security Techniques in Python

import hashlib # Secure password hashing with salt and iteration secret = b'base_secret' salt = b'random_salt_2024' iterations = 100_000 hashed = hashlib.pbkdf2_hmac('sha256', b'user_password', salt, iterations) print(f'PBKDF2 hash (hex): {hashed.hex()[:32]}...') # Verification logic using constant-...

Matrix Inversion over GF(2) Finite Fields

int check_invertible(Matrix4x4 *mat) { int status; Matrix4x4 working_copy; copy_matrix(mat, &working_copy); // Transform to lower triangular form for (int pivot = 0; pivot < 4; pivot++) { if ((working_copy.rows[pivot] & identity_mask[pivot]) != 0) { for (int row = pivot + 1; row < 4; r...

OpenHarmony Huks Cryptographic Key Management API Reference

/** * OpenHarmony Universal KeyStore (Huks) cryptographic service interface. * Provides secure key generation, import, export, deletion, and cryptographic operations. * @namespace huks * @syscap SystemCapability.Security.Huks.Core */ declare namespace huks { /** * Generates a new cryptographic key w...

Reversing Custom XTEA Implementations in Binary Challenges

The XTEA (eXtended Tiny Encryption Algorithm) operates on 64-bit data blocks divided into two 32-bit halves, utilizing a 128-bit key split into four 32-bit words. Unlike its predecessor TEA, XTEA introduces a more complex key schedule and alternates the update operations between the left and right h...