From the course: GitHub Copilot for Cybersecurity Specialists by Microsoft Press

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Implement encryption and secure key management

Implement encryption and secure key management

Encryption has countless ways to fail. Wrong cipher code, reused IVs, weak key derivation, hard-coded keys. GitHub Copilot prevents these failures by generating cryptographically correct implementations from the start. AES has multiple modes, CBC, GCM, Ctr. lots of TLAs or three-letter acronyms going around, wouldn't you agree? developers don't know which to use. GCM provides authentication, CBC doesn't. GCM needs 12-byte IVs, CBC needs 16. Copilot knows all this natively and you can prompt and provide supplemental context to fill in any deltas. You can prompt encrypt data with AES and Copilot might suggest AES-256 GCM with proper IV generation and authentication tag handling. Keys belong in your key management store, as I said in the previous slide, not in code. Copilot generates Key Vault integration with default Azure credential authentication, runtime key fetching with caching, automatic refresh before expiration, and graceful fallback when Azure Key Vault is unavailable. That's a…

Contents