Be Careful when Using non-us-ascii String Literals in Source Code

When using non-US-ASCII literal strings (e.g., accented characters like “é”, “ü”, or symbols from other scripts like “你好”) in source code, it’s crucial to handle them carefully due to potential issues with encoding, interpretation, and compatibility. Here’s an explanation of key considerations: 1. Source Code File Encoding Encoding Matters: The source code file must be saved in an encoding that […]

RSA Encryption Maximum Number of Bytes

The maximum number of bytes you can encrypt using RSA depends on the key size and the padding scheme. 1. Key Size The RSA key size determines the maximum size of the plaintext that can be encrypted. The larger the key size (e.g., 1024, 2048, 4096 bits), the larger the block of plaintext that can be encrypted. However, the actual […]

More Information about RSA OAEP Padding for Encryption

Optimal Asymmetric Encryption Padding (OAEP) is a padding scheme used in RSA encryption to provide additional security by introducing randomness and structure to the plaintext before encryption. Key Features of OAEP Padding Randomness: Incorporates a randomly generated seed to ensure the same plaintext encrypts to different ciphertexts each time, enhancing security. Two-step Masking: Uses a Mask Generation Function (MGF) to […]

SQL Server Methods that Return Long Strings

SQL Server Methods that Return Long Strings Some ActiveX methods return strings that are too long for local string variables. How can these be returned to the calling stored procedure? Answer The Chilkat Global object has a property named KeepStringResult which can be set to 1. (The default value is 0.) When set to 1, then each method that returns […]

RSA Signatures and Endianness

RSA Signatures and Endianness RSA signatures are represented as large integers, and the byte order (endianness) determines how the bytes of these integers are stored and transmitted. The two common formats are: Big-endian: The most significant byte (MSB) comes first. This is the traditional format used in network protocols and cryptography. Little-endian: The least significant byte (LSB) comes first. Commonly […]