====== 1.1 Install Windows Tools ====== This page explains each step in detail - ideal for beginners. ---- ===== 1. Visual Studio 2022 ===== ==== What is Visual Studio? ==== Visual Studio is Microsoft's development environment. It includes: * **C/C++ Compiler** (cl.exe) - compiles the OpenSSL source code * **Linker** (link.exe) - creates the final DLLs * **nmake** - executes build commands ==== Installation ==== **Option A: Via winget (recommended)** winget install Microsoft.VisualStudio.2022.Community **Option B: Manual Download** - Go to [[https://visualstudio.microsoft.com/downloads/|Visual Studio Downloads]] - Select "Community" (free) - Start the installer ==== Select Workload ==== After download, the Visual Studio Installer opens: - Click "Modify" (if already installed) or "Install" - Select: **"Desktop development with C++"** - In the right panel, make sure: * ☑ MSVC v143 - VS 2022 C++ x64/x86 Build-Tools * ☑ Windows 10/11 SDK (latest version) - Click "Install" **Important:** Installation takes about 10-20 GB and 30-60 minutes! ==== Verification ==== After installation: # 1. Open Developer PowerShell (search in Start Menu) # or load VS environment manually: & "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" # 2. Check compiler cl Expected output: Microsoft (R) C/C++ Optimizing Compiler Version 19.xx.xxxxx for x64 ---- ===== 2. Windows SDK ===== ==== What is the Windows SDK? ==== The Windows SDK contains header files like ''stdlib.h'', ''windows.h'', etc. Without these, the compiler cannot find basic functions. ==== Installation ==== Normally the SDK is installed with Visual Studio. If not: winget install Microsoft.WindowsSDK.10.0.22621 Or via Visual Studio Installer: - "Individual Components" tab - Search: "Windows SDK" - Select version 10.0.22621 or newer ==== Verification ==== # Check if SDK folder exists Test-Path "C:\Program Files (x86)\Windows Kits\10\Include" Should output ''True''. ---- ===== 3. Strawberry Perl ===== ==== What is Perl? ==== Perl is a scripting language. OpenSSL uses Perl scripts for: * ''Configure'' - Detects the system and creates build files * Code generation for different platforms ==== Why Strawberry Perl? ==== There are several Perl distributions for Windows: * **Strawberry Perl** - Recommended, includes everything needed, easy to install * ActivePerl - Commercial, not recommended * Cygwin Perl - Can work, but more complicated ==== Installation ==== winget install StrawberryPerl.StrawberryPerl Default installation path: ''C:\Strawberry\perl\bin'' ==== Verification ==== Open new terminal, then: perl -v Expected output: This is perl 5, version 38, subversion 2 (v5.38.2) If "perl is not recognized" appears: Restart computer or set PATH manually. ---- ===== 4. NASM (Netwide Assembler) ===== ==== What is NASM? ==== NASM is an assembler - it translates assembly code into machine code. OpenSSL contains hand-optimized assembly routines for: * AES encryption (up to 10x faster!) * SHA hash functions * Other cryptographic operations ==== Do I need NASM? ==== | Situation | NASM needed? | |-----------|-------------| | Production build | **Yes, highly recommended** | | Development/test | Optional | | FIPS build | **Yes, mandatory** | Without NASM: OpenSSL compiles but uses slower C implementations. ==== Installation ==== winget install NASM.NASM **Important:** NASM is often not automatically added to PATH! ==== Set PATH manually ==== # Typical NASM path (may vary!) $nasmPath = "$env:LOCALAPPDATA\bin\NASM" # Check if folder exists if (Test-Path $nasmPath) { Write-Host "NASM found in: $nasmPath" } else { # Check alternative paths Get-ChildItem -Path "C:\" -Filter "nasm.exe" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty DirectoryName } Then set PATH (temporary for this session): $env:PATH = "$nasmPath;$env:PATH" ==== Verification ==== nasm -v Expected output: NASM version 2.16.01 compiled on Dec 21 2023 ---- ===== 5. Git ===== ==== What is Git? ==== Git is a version control system. You need it to: * Download OpenSSL source code from GitHub * Select the correct version (tag) ==== Installation ==== winget install Git.Git ==== Verification ==== git --version Expected output: git version 2.43.0.windows.1 ---- ===== Summary ===== After installing all tools, the following should work: # Load Visual Studio environment & "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" # Check all tools cl # → Microsoft (R) C/C++ Optimizing Compiler... perl -v # → This is perl 5... nasm -v # → NASM version 2.xx... git --version # → git version 2.xx... **Tip:** Save these commands in a ''check-tools.ps1'' file for later use. ---- ===== Continue to ===== * [[.:quellen:start|2. Download Sources]] * [[.:.:start|Back to Overview]] ---- //Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional//