Secure Coding
lastmod 2023-03-18created 2014-12-0327 edits
Software development security, or Secure Coding, refers to the set of security activities to be followed during software development to build secure software, such as removing potential security vulnerabilities that may exist in source code and designing and implementing features with security in mind. It covers writing code so that a system can be safely defended against internal and external attacks, such as hacking that exploits security vulnerabilities, when developing websites or software.
The United States mandated secure coding by enacting the Federal Information Security Management Act (FISMA) in 2002, and Microsoft adopted secure coding when developing Windows Vista. In South Korea, the 'SW development security mandate', which requires removing security vulnerabilities from the SW development stage, took effect in December 2012. Accordingly, secure coding became mandatory for public-sector informatization projects ordered at 4 billion won or more, and by December 31, 2014 it is also mandatory for projects under 2 billion won.
Key store
See the Credential Store page. (Notes on secure key storage by OS)
License key
See the corresponding page
Key generate
- Stackoverflow - implementation for product keys (closed)
- CodeProject - A simple software key useful to protect software components
Symmetric algorithms are limited, in that any novice cracker with a disassembler can find your key (or the algorithm used to generate one) and make a "keygen".
For this reason, asymmetric cryptology is the way to go. The basic premise is something like this:
- When the user purchases a license from you, you collect certain identifying details about the user and/or their environment (typically, this is just a full name; sometimes a company, too).
- You make a 128-bit MD5 hash of this information.
- Using a 128-bit Elliptic Curve crypto, encrypt this hash using the private key on the server.
- The 128-bit cipher text can be represented to the user as a 25-character string consisting of letters and digits (plus separating dashes for readability). Notice that 26 letters + 10 digits = 36 discreet values, and that 36^25 > 2^128.
- The user types this product key into your registration dialog. The client software converts it back to a 128-bit number (16 bytes), decrypts that using the public key of your EC crypto, and compares the result to an MD5 hash of the user's personal information, which must match what was used for registration.
Python Security Libraries
See Python:Libraries#Security.
Application Isolation
See Application Sandboxing or Application Containerization.
Password security
See also
- Authentication
- Information Security
- C++:SecureProgramming (C++)
- Hash function
- Cryptographic hash function
- Secure Remote Password protocol (SRP)
- dmidecode: Check Linux hardware information. (Get the Product UUID)
- Serial code
- License key
- Proof of work
Favorite site
- Wikipedia (en) Description of secure coding
- Software security weakness diagnosis guide 1
- Software development security guide (2013.11) -1 2
- iOS_Security_Guide_Oct_2014.pdf 3
- Secure Programming for Linux and Unix HOWTO 4
- [Recommended] NAVER D2 - Secure password storage 5
- [Recommended] The technology of password security 6
- Cho Dae-hyup's blog - Security - Application security 1. Authentication methods and password encryption
- [Recommended] Salted password hashing - doing it right 7
References
-
Software_security_weaknesses_diagnosed_Guide_2013.zip ↩
-
Software_Development_Security_Guide_2013.zip ↩
-
IOS_Security_Guide_Oct_2014.pdf ↩
-
Secure-Programs-HOWTO.7z ↩
-
NAVER_D2_-_Secure_password_storage.pdf ↩
-
Technology_of_password_security_-_CODEOK.pdf ↩
-
Salted_Password_Hashing_-_Doing_it_Right.pdf ↩
-
C_Secure_Coding_Guide.pdf ↩
-
Java_Secure_Coding_Guide.pdf ↩