Fading Coder

One Final Commit for the Last Sprint

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...

Cryptographic Solutions for the 2026 PolarCTF Spring Competition

Challenge 2-1: Million Bounty Problem Description: An encrypted file contains experimental data. The encryption process involves two steps: Caesar cipher with an unknown shift (1–10, applied only to letters). Rail fence cipher with an unknown key (2–4), using a W-shaped (zigzag) reading pattern and...

Practical Usage of Python's sys Module and hashlib for Data Security

Worrking with Command-Line Arguments in Python The sys module provides access to command-line arguments through the argv list. By default, argv contains a single element - the script name. Create a script named argument_processor.py: import sys for index, arg in enumerate(sys.argv): print(f"Arg...