Skip to content
EN-304-617.md 701 KiB
Newer Older
Daniel Thompson-Yvetot's avatar
Daniel Thompson-Yvetot committed
3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000
6. Test that extension storage persists across browser restarts
7. Verify that uninstalling an extension removes its storage
8. Test chrome.storage quota limits and enforcement
9. Verify that chrome.storage.sync has appropriate sync limits and encryption
10. Confirm that each extension has isolated storage inaccessible to other extensions
11. Verify that web pages cannot access any extension storage APIs or data
12. Check that extension storage persists across sessions but is removed on uninstall
13. Validate that storage quota limits are enforced per extension
14. Confirm that chrome.storage.sync uses encrypted sync when user is signed in
15. Verify that no file system or database tools can access extension storage from outside the browser
16. Check that storage access from wrong context results in clear error messages

**Pass Criteria**: Complete storage isolation between extensions AND no web page access AND proper quota enforcement AND sync encryption

**Fail Criteria**: Cross-extension storage access succeeds OR web pages can read extension storage OR no quota enforcement

**Evidence**: Test results showing isolation between extensions, console errors from web pages attempting access, persistent storage verification, quota limit test results, sync encryption verification

**References**:

- Chrome Storage API: https://developer.chrome.com/docs/extensions/reference/storage/
- Storage Quota Limits: https://developer.chrome.com/docs/extensions/reference/storage/#property-sync-QUOTA_BYTES
- Mozilla Storage API: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage
- Storage Sync Security: https://developer.chrome.com/docs/extensions/reference/storage/#property-sync
- CWE-552: Files or Directories Accessible to External Parties: https://cwe.mitre.org/data/definitions/552.html
- Extension Data Security: https://developer.chrome.com/docs/extensions/mv3/security/#data

### Assessment: EXT-REQ-12 (Background script restrictions)

**Reference**: EXT-REQ-12 - Browser shall enforce restrictions on background scripts including service worker lifecycle and capabilities

**Given**: A conformant browser with EXT-2 or higher capability (Manifest V3)

**Task**: Verify that the browser enforces service worker lifecycle restrictions for background scripts to reduce resource consumption, prevent persistent background pages that could perform long-term surveillance or crypto-mining, and ensure that extensions cannot maintain always-on processes that degrade performance or bypass browser power management, while maintaining security through strict CSP enforcement.

**Verification**:

1. Create a Manifest V3 extension with a background service worker
2. Verify that background pages (persistent background scripts) are not allowed in Manifest V3
3. Test service worker lifecycle:
   - Service worker starts on extension events (installation, message, alarm)
   - Service worker terminates after idle timeout (~30 seconds)
   - Service worker restarts when needed for events
4. Attempt to use browser APIs not available in service workers:
   - DOM APIs (document, window)
   - Synchronous storage APIs
   - XMLHttpRequest (should use fetch instead)
5. Verify that service workers cannot use eval() or other dynamic code execution
6. Test that long-running operations should use alarms API or native messaging
7. Verify that service worker registration is automatic and cannot be modified
8. Test that service worker cannot be kept alive artificially
9. Verify CSP enforcement in service worker context
10. Confirm that Manifest V3 extensions use service workers, not persistent background pages
11. Verify that service workers terminate after idle timeout and restart on events
12. Check that DOM APIs are unavailable in service worker context
13. Validate that dynamic code execution is blocked in service workers
14. Confirm that service worker lifecycle is managed by the browser, not the extension
15. Verify that long-running tasks should use appropriate APIs (alarms, native messaging)
16. Check that service worker CSP is strict and enforced

**Pass Criteria**: Service worker lifecycle is enforced AND unavailable APIs throw errors AND CSP is enforced AND artificial keep-alive is prevented

**Fail Criteria**: Persistent background pages work in Manifest V3 OR service worker doesn't terminate OR restricted APIs are available

**Evidence**: Test results showing service worker termination, console errors for unavailable APIs, lifecycle event logs, CSP violation logs, timing tests showing automatic termination

**References**:

- Manifest V3 Service Workers: https://developer.chrome.com/docs/extensions/mv3/migrating_to_service_workers/
- Service Worker Lifecycle: https://developer.chrome.com/docs/extensions/mv3/service_workers/
- Background Script Migration: https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/#background-service-workers
- Service Workers in Extensions: https://developer.chrome.com/docs/extensions/mv3/service_workers/basics/
- CWE-405: Asymmetric Resource Consumption: https://cwe.mitre.org/data/definitions/405.html
- Extension Service Worker Events: https://developer.chrome.com/docs/extensions/mv3/service_workers/events/

### Assessment: EXT-REQ-13 (Manifest V3 compliance)

**Reference**: EXT-REQ-13 - Browser shall enforce Manifest V3 security requirements for new and updated extensions

**Given**: A conformant browser with EXT-2 or higher capability

**Task**: Verify that the browser enforces Manifest V3 security requirements to prevent extensions from using deprecated, insecure patterns such as persistent background pages that enable surveillance, blocking webRequest that enables man-in-the-middle attacks, relaxed CSP that allows remote code execution, and callback-based APIs prone to timing attacks, ensuring all new extensions benefit from modern security architecture.

**Verification**:

1. Verify that browser supports Manifest V3 extensions
2. Test that new extension submissions require Manifest V3 (check store policies)
3. Create test extensions demonstrating Manifest V3 security improvements:
   - Service workers instead of persistent background pages
   - DeclarativeNetRequest instead of blocking webRequest
   - Strict CSP with no unsafe-eval
   - No remote code execution
   - Promises-based APIs instead of callbacks
4. Attempt to use deprecated Manifest V2 features in Manifest V3 extension:
   - background.persistent
   - background.page
   - webRequest blocking with broad host permissions
   - Relaxed CSP with unsafe-eval
5. Verify that browser rejects or warns about Manifest V2 features in Manifest V3 context
6. Test that Manifest V2 extensions show deprecation warnings
7. Verify manifest_version field validation (should be 2 or 3, with 3 preferred)
8. Test migration path from V2 to V3 with breaking changes properly surfaced
9. Confirm that browser fully supports Manifest V3 specification
10. Verify that Manifest V2 deprecated features are rejected in Manifest V3 extensions
11. Check that security improvements (service workers, declarativeNetRequest, strict CSP) are enforced
12. Validate that clear error messages guide developers away from deprecated patterns
13. Confirm that Manifest V2 extensions show deprecation warnings to users
14. Verify that extension stores enforce Manifest V3 for new submissions
15. Check that migration tooling and documentation are available

**Pass Criteria**: Manifest V3 security requirements are fully enforced AND deprecated V2 features are rejected AND clear migration guidance exists

**Fail Criteria**: V2 deprecated features work in V3 extensions OR no enforcement of V3 security model OR no deprecation warnings

**Evidence**: Manifest validation test results, deprecation warning screenshots, test extensions demonstrating V3 features, store policy documentation, migration guide references

**References**:

- Manifest V3 Overview: https://developer.chrome.com/docs/extensions/mv3/intro/
- Manifest V3 Migration Guide: https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/
- Manifest V3 Platform Vision: https://developer.chrome.com/docs/extensions/mv3/intro/platform-vision/
- Mozilla Manifest V3: https://blog.mozilla.org/addons/2022/05/18/manifest-v3-in-firefox-recap-next-steps/
- CWE-477: Use of Obsolete Function: https://cwe.mitre.org/data/definitions/477.html
- Manifest V3 Security Improvements: https://developer.chrome.com/docs/extensions/mv3/intro/mv3-overview/#security

### Assessment: EXT-REQ-14 (Native messaging security)

**Reference**: EXT-REQ-14 - Browser shall secure native messaging to prevent unauthorized native application access

**Given**: A conformant browser with EXT-1 or higher capability

**Task**: Verify that the browser secures native messaging to prevent malicious extensions from escaping the browser sandbox by connecting to arbitrary native applications, installing native malware disguised as messaging hosts, or using native messaging as a privilege escalation vector, ensuring that only explicitly whitelisted extensions can communicate with user-installed, validated native applications.

**Verification**:

1. Create a native messaging host application with a manifest file
2. Register the native messaging host according to platform requirements:
   - Windows: Registry entry under HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE
   - macOS/Linux: JSON manifest in specified directories
3. Create an extension with nativeMessaging permission and allowed_origins in native host manifest
4. Test communication between extension and native host using chrome.runtime.connectNative()
5. Verify that only extensions listed in native host manifest's allowed_origins can connect
6. Attempt connection from an unlisted extension and verify rejection
7. Test that native host path validation prevents directory traversal
8. Verify that native messaging requires user-installed native applications (not downloadable by extensions)
9. Test message size limits and validation
10. Verify that native host processes run with appropriate user privileges (not elevated)
11. Confirm that native messaging requires explicit nativeMessaging permission
12. Verify that native host manifest should acceptlist extension IDs in allowed_origins
13. Check that unlisted extensions cannot connect to native hosts
14. Validate that native host executable path is validated against tampering
15. Confirm that extensions cannot download or install native hosts programmatically
16. Verify that message passing is properly sandboxed and size-limited
17. Check that native hosts run without elevated privileges
18. Validate that connection attempts from unauthorized extensions fail with clear errors

**Pass Criteria**: Native messaging requires permission and allowed_origins whitelisting AND path validation prevents tampering AND extensions cannot install hosts

**Fail Criteria**: Any extension can connect to native hosts OR path validation is bypassable OR extensions can install native hosts programmatically

**Evidence**: Test results showing connection rejection for unlisted extensions, native host manifest examples, registry/filesystem inspection showing host registration, message passing test results, privilege level verification

**References**:

- Chrome Native Messaging: https://developer.chrome.com/docs/extensions/mv3/nativeMessaging/
- Native Messaging Host Protocol: https://developer.chrome.com/docs/extensions/mv3/nativeMessaging/#native-messaging-host-protocol
- Mozilla Native Messaging: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging
- Native Host Manifest Format: https://developer.chrome.com/docs/extensions/mv3/nativeMessaging/#native-messaging-host
- CWE-494: Download of Code Without Integrity Check: https://cwe.mitre.org/data/definitions/494.html
- Extension-Native App Security: https://developer.chrome.com/docs/extensions/mv3/security/#native-messaging

### Assessment: EXT-REQ-15 (Extension-controlled web content)

**Reference**: EXT-REQ-15 - Browser shall prevent extensions from injecting malicious content or deceptively modifying web pages

**Given**: A conformant browser with EXT-1 or higher capability

**Task**: Verify that the browser prevents extensions from injecting malicious content into web pages to conduct phishing attacks, overlaying fake login forms to steal credentials, intercepting form submissions to capture banking details, or deceptively modifying trusted website content, while ensuring that legitimate content script functionality is appropriately permission-gated and user-visible through DevTools attribution.

**Verification**:

1. Create test extensions that attempt various forms of web content modification:
   - Injecting scripts into web pages via content scripts
   - Modifying DOM to overlay fake UI elements (e.g., fake login forms)
   - Intercepting and modifying form submissions
   - Replacing legitimate content with malicious content
2. Verify that content script capabilities are limited by Content Security Policy
3. Test that extensions should declare host permissions for content script injection
4. Create a test extension that attempts to:
   - Inject content scripts into browser UI pages (chrome://, edge://)
   - Inject into other extensions' pages
   - Inject into local file:// URLs without explicit permission
5. Verify that such injections are blocked
6. Test that users are warned about extensions with broad host permissions during installation
7. Verify that content script modifications are visible in DevTools with extension attribution
8. Test that extensions cannot inject content into incognito mode without explicit permission
9. Verify CSP restrictions prevent content scripts from loading remote code
10. Confirm that content scripts require declared host permissions
11. Verify that browser UI pages and other extensions are protected from content script injection
12. Check that broad host permissions trigger prominent installation warnings
13. Validate that content script modifications are attributable in DevTools
14. Confirm that incognito mode requires explicit extension permission
15. Verify that CSP prevents content scripts from loading remote malicious code
16. Check that file:// access requires explicit user permission

**Pass Criteria**: Content scripts are permission-gated AND sensitive contexts are protected AND user warnings are clear AND DevTools attribution works

**Fail Criteria**: Content scripts inject without permissions OR browser pages are injectable OR no user warnings OR no attribution

**Evidence**: Permission prompt screenshots, test results showing blocked injections, DevTools showing extension attribution, CSP enforcement test results, incognito permission tests

**References**:

- Content Scripts Security: https://developer.chrome.com/docs/extensions/mv3/content_scripts/#security
- Extension Content Script Injection: https://developer.chrome.com/docs/extensions/mv3/content_scripts/#programmatic
- Mozilla Content Scripts: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts
- Incognito Mode for Extensions: https://developer.chrome.com/docs/extensions/mv3/manifest/incognito/
- CWE-79: Cross-site Scripting (XSS): https://cwe.mitre.org/data/definitions/79.html
- Extension Security Best Practices: https://extensionworkshop.com/documentation/develop/build-a-secure-extension/

### Assessment: EXT-REQ-16 (Extension telemetry privacy)

**Reference**: EXT-REQ-16 - Browser shall ensure extension telemetry and error reporting respect user privacy

**Given**: A conformant browser with EXT-1 or higher capability

**Task**: Verify that the browser ensures extension telemetry and error reporting respect user privacy to prevent extensions from exfiltrating browsing history, capturing personally identifiable information, or using analytics to track users across the web without consent, while ensuring that extension developers disclose data collection practices and that sensitive information is not inadvertently leaked through error reports or console logs.

**Verification**:

1. Install a test extension with error reporting or analytics code
2. Monitor network traffic from the extension using browser DevTools or external proxy (e.g., Burp Suite, mitmproxy)
3. Verify that extensions cannot access browser telemetry or crash reporting APIs directly
4. Test that extension storage sync does not leak data to unauthorized parties
5. Verify that error reporting from extensions requires user consent if it includes:
   - URLs visited by the user
   - Personal identifiable information
   - Browsing history or patterns
6. Test that chrome.storage.sync encryption prevents extension from reading other extensions' sync data
7. Verify that extensions should declare and justify data collection in privacy policies
8. Test that extensions cannot access browser's own telemetry data
9. Monitor for sensitive data leakage in extension console logs (passwords, tokens, PII)
10. Verify that extension store policies require privacy disclosures for data collection
11. Confirm that extensions have no access to browser telemetry APIs
12. Verify that extension-to-server communications are visible and monitorable by users
13. Check that sensitive user data is not included in extension error reports without consent
14. Validate that chrome.storage.sync data is encrypted and isolated
15. Confirm that extension developers shall disclose data collection practices
16. Verify that console logs do not inadvertently expose sensitive data
17. Check that users can review extension permissions related to data collection

**Pass Criteria**: Extensions cannot access browser telemetry AND user consent is required for sensitive data collection AND privacy policies are required

**Fail Criteria**: Extensions access browser telemetry OR sensitive data is transmitted without consent OR no privacy policy requirements

**Evidence**: Network traffic captures showing extension communications, test results showing blocked telemetry API access, privacy policy examples from extension stores, storage sync encryption verification

**References**:

- Chrome Extension Privacy Practices: https://developer.chrome.com/docs/extensions/mv3/user_privacy/
- Extension Privacy Policy Requirements: https://developer.chrome.com/docs/webstore/program-policies/privacy/
- Mozilla Data Collection Guidelines: https://extensionworkshop.com/documentation/publish/add-on-policies/#data-disclosure-collection-and-management
- GDPR Compliance for Extensions: https://gdpr.eu/what-is-gdpr/
- CWE-359: Exposure of Private Personal Information: https://cwe.mitre.org/data/definitions/359.html

### Assessment: EXT-REQ-17 (Extension signature validation)

**Reference**: EXT-REQ-17 - Browser shall validate cryptographic signatures of extensions before installation and during runtime

**Given**: A conformant browser with EXT-1 or higher capability

**Task**: Verify that the browser validates cryptographic signatures of extensions to prevent installation of tampered, backdoored, or malicious extensions distributed through compromised channels, ensuring that only extensions authenticated by trusted authorities or the original developer can be installed, and that signature validation provides defense-in-depth against supply chain attacks and extension package manipulation.

**Verification**:

1. Download a legitimate signed extension from the Chrome Web Store or addons.mozilla.org
2. Inspect the extension package (CRX for Chrome, XPI for Firefox) to verify signature presence
3. Use tools to verify the signature:
   - Chrome: Examine CRX3 header with crx3 tools
   - Firefox: Verify XPI signature with Mozilla's signing infrastructure
4. Attempt to install a modified extension with:
   - Invalid signature
   - No signature
   - Expired signature
   - Signature from untrusted authority
5. Verify that the browser rejects all invalid signatures with clear error messages
6. Test that extensions loaded in developer mode can bypass signature requirements (but with clear warnings)
7. Verify that production extensions require valid signatures from trusted authorities
8. Test that signature validation occurs at both install time and runtime
9. Verify that browser checks certificate revocation for extension signatures
10. Test that extension updates have been signed by the same key as the original
11. Confirm that all production extensions have valid cryptographic signatures
12. Verify that signatures are verified at installation time
13. Check that invalid, expired, or missing signatures prevent installation
14. Validate that developer mode allows unsigned extensions with prominent warnings
15. Confirm that signature validation uses trusted certificate authorities
16. Verify that certificate revocation is checked during validation
17. Check that extension updates require signature continuity (same signing key)
18. Validate that clear error messages explain signature validation failures

**Pass Criteria**: All production extensions require valid signatures AND signature validation is comprehensive AND update signature continuity is enforced

**Fail Criteria**: Unsigned extensions install in production mode OR signature validation is bypassable OR no certificate revocation checking

**Evidence**: CRX/XPI file inspection showing signatures, test results with tampered signatures, installation error screenshots, certificate chain verification, developer mode warning screenshots

**References**:

- Chrome CRX3 Format and Signing: https://chromium.googlesource.com/chromium/src/+/master/components/crx_file/crx3.proto
- Mozilla Extension Signing: https://extensionworkshop.com/documentation/publish/signing-and-distribution-overview/
- Extension Package Format: https://developer.chrome.com/docs/extensions/mv3/linux_hosting/#packaging
- Code Signing Best Practices: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Distribution
- CWE-345: Insufficient Verification of Data Authenticity: https://cwe.mitre.org/data/definitions/345.html
- Chrome Web Store Developer Policies: https://developer.chrome.com/docs/webstore/program-policies/

### Assessment: EXT-REQ-18 (Extension permissions UI transparency)

**Reference**: EXT-REQ-18 - Browser shall provide clear, understandable UI for extension permissions allowing informed user consent

**Given**: A conformant browser with EXT-1 or higher capability

**Task**: Verify that the browser provides clear, understandable permission UI to enable informed user consent, preventing extensions from deceiving users about their capabilities through technical jargon, hidden permission requests, or unclear warnings, ensuring that users understand what access they're granting and can make security-conscious decisions about extension installation, especially for high-risk permissions that could enable data theft or surveillance.

**Verification**:

1. Create test extensions with various permission combinations:
   - Low-risk permissions (storage, alarms)
   - Medium-risk permissions (tabs, activeTab)
   - High-risk permissions (webRequest, <all_urls>, cookies)
   - Sensitive permissions (debugger, management, privacy)
2. Install each extension and observe permission prompts
3. Verify that permission prompts:
   - Use clear, non-technical language
   - Group permissions by risk level
   - Explain what each permission allows
   - Show prominent warnings for dangerous permissions
4. Test that users can view current permissions in extension management UI
5. Verify that users can revoke permissions without uninstalling extension
6. Test optional permissions flow where extensions request additional permissions at runtime
7. Verify that permission grant/revocation is persistent across sessions
8. Test that permission changes trigger re-prompting for consent
9. Verify that extensions cannot request permissions programmatically without user interaction
10. Test that broad permissions like <all_urls> have prominent, scary warnings
11. Confirm that permission prompts use clear, user-friendly language (not technical jargon)
12. Verify that high-risk permissions have prominent warnings with specific explanations
13. Check that users can view all extension permissions in management UI
14. Validate that users can revoke individual permissions without uninstalling
15. Confirm that optional permissions require explicit user interaction to grant
16. Verify that permission changes trigger new consent prompts
17. Check that broad permissions have special warnings about privacy implications
18. Validate that permission UI is consistent across installation and runtime requests

**Pass Criteria**: Permission UI is clear and understandable AND risk-appropriate warnings are shown AND users have granular control AND persistent consent tracking

**Fail Criteria**: Permission language is too technical OR no risk differentiation OR users cannot revoke permissions OR no warnings for dangerous permissions

**Evidence**: Screenshots of permission prompts at various risk levels, extension management UI screenshots, optional permission flow recordings, user testing results demonstrating comprehension, revocation test results

**References**:

- Chrome Permission Warnings: https://developer.chrome.com/docs/extensions/mv3/permission_warnings/
- Mozilla Permission Requests: https://extensionworkshop.com/documentation/develop/request-the-right-permissions/
- Extension Permission UX Best Practices: https://developer.chrome.com/docs/extensions/mv3/permission_warnings/#permissions_with_warnings
- CWE-276: Incorrect Default Permissions: https://cwe.mitre.org/data/definitions/276.html
- Designing User-Friendly Permission Systems: https://extensionworkshop.com/documentation/develop/build-a-secure-extension/#request-permissions-at-runtime

## 6.3 Cryptographic Security Assessments

This section covers assessment procedures for requirements ENC-REQ-1 through ENC-REQ-21, addressing TLS/SSL configuration, certificate validation, cryptographic API usage, secure random number generation, and encryption key management.

### Assessment: ENC-REQ-1 (TLS 1.3+ support)

**Reference**: ENC-REQ-1 - Browser shall support TLS 1.3 or higher for all network communications

**Given**: A conformant browser with encryption capability (ENC-1 or higher)

**Task**: Verify that the browser supports modern TLS 1.3 protocol to protect network communications from downgrade attacks, reduce latency through improved handshake efficiency, and provide forward secrecy through ephemeral key exchange, ensuring that user traffic benefits from the latest cryptographic protections against eavesdropping and man-in-the-middle attacks.

**Verification**:

1. Configure a test web server to support multiple TLS versions: TLS 1.0, TLS 1.1, TLS 1.2, and TLS 1.3
2. Navigate the browser to each server endpoint and capture the TLS handshake using packet capture tools (Wireshark, tcpdump)
3. Verify that the browser successfully negotiates TLS 1.3 when available
4. Configure the server to offer only TLS 1.3 and verify successful connection
5. Test TLS 1.3 features: 0-RTT resumption, encrypted SNI (ESNI/ECH), and post-handshake authentication
6. Use browser DevTools Security tab to verify TLS version for the connection
7. Test that browser prefers TLS 1.3 over older versions when both are available
8. Verify that TLS 1.3 cipher suites are properly supported (TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256)
9. Confirm that browser successfully negotiates TLS 1.3 when server supports it
10. Verify that TLS 1.3 is preferred over TLS 1.2 when both are available
11. Check that browser Security panel shows "TLS 1.3" as the protocol version
12. Validate that packet captures confirm TLS 1.3 handshake structure (single round-trip)
13. Confirm that TLS 1.3-specific features (0-RTT, encrypted extensions) function correctly
14. Verify that browser supports all mandatory TLS 1.3 cipher suites

**Pass Criteria**: Browser successfully negotiates TLS 1.3 connections AND prefers TLS 1.3 over older versions when available

**Fail Criteria**: Browser cannot establish TLS 1.3 connections OR prefers older TLS versions when TLS 1.3 is available

**Evidence**: Wireshark packet captures showing TLS 1.3 handshake, DevTools Security tab screenshots, server logs showing negotiated protocol version, cipher suite listings

**References**:

- RFC 8446 - TLS 1.3 Specification: https://datatracker.ietf.org/doc/html/rfc8446
- Mozilla SSL Configuration Generator: https://ssl-config.mozilla.org/
- NIST SP 800-52 Rev. 2 - TLS Guidelines: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-52r2.pdf
- Qualys SSL Labs - SSL/TLS Best Practices: https://github.com/ssllabs/research/wiki/SSL-and-TLS-Deployment-Best-Practices
- Chrome Network Security: https://www.chromium.org/Home/chromium-security/education/tls/

### Assessment: ENC-REQ-2 (Certificate validation)

**Reference**: ENC-REQ-2 - Browser shall perform complete certificate chain validation including expiry, revocation, and trust anchor verification

**Given**: A conformant browser with encryption capability (ENC-1 or higher)

**Task**: Verify that the browser performs comprehensive certificate chain validation to prevent man-in-the-middle attacks using expired, self-signed, or fraudulent certificates, ensuring that only connections to servers with valid certificates from trusted certificate authorities are established without warnings, protecting users from impersonation attacks and ensuring transport layer authentication.

**Verification**:

1. Set up test scenarios with various certificate configurations:
   - Valid certificate from trusted CA
   - Expired certificate
   - Self-signed certificate
   - Certificate with wrong hostname (CN/SAN mismatch)
   - Certificate with incomplete chain
   - Certificate from untrusted CA
   - Revoked certificate
2. Navigate to each test endpoint and observe browser behavior
3. Verify that browser displays appropriate security warnings for invalid certificates
4. Test that users cannot bypass critical certificate errors without explicit acknowledgment
5. Verify certificate chain validation using browser DevTools Security tab
6. Test extended validation (EV) certificate display
7. Capture and analyze the certificate validation process
8. Test certificate validation with intermediate CA certificates
9. Confirm that valid certificates from trusted CAs are accepted without warnings
10. Verify that expired certificates trigger security warnings and connection blocks
11. Check that self-signed certificates are rejected with clear error messages
12. Validate that hostname mismatches are detected and reported
13. Confirm that incomplete certificate chains are rejected
14. Verify that certificates from untrusted CAs trigger warnings
15. Check that users should explicitly acknowledge risk to bypass warnings
16. Validate that EV certificates display organization name in browser UI

**Pass Criteria**: All invalid certificates are detected and reported with appropriate warnings AND users cannot silently bypass critical errors

**Fail Criteria**: Any invalid certificate is accepted without warning OR users can bypass critical errors without explicit acknowledgment

**Evidence**: Screenshots of certificate warning dialogs, DevTools Security tab showing certificate validation status, error console logs, packet captures showing certificate exchange

**References**:

- RFC 5280 - X.509 Certificate and CRL Profile: https://datatracker.ietf.org/doc/html/rfc5280
- CA/Browser Forum Baseline Requirements: https://cabforum.org/baseline-requirements-documents/
- OWASP Transport Layer Protection Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Protection_Cheat_Sheet.html
- Mozilla Root Store Policy: https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/policy/
- Chrome Certificate Transparency Policy: https://github.com/chromium/ct-policy

### Assessment: ENC-REQ-3 (Certificate pinning support)

**Reference**: ENC-REQ-3 - Browser shall support HTTP Public Key Pinning (HPKP) or alternative certificate pinning mechanisms

**Given**: A conformant browser with encryption capability (ENC-2 or higher)

**Task**: Verify that the browser enforces certificate pinning to prevent man-in-the-middle attacks against critical domains by rejecting connections to pinned sites that present certificates from unexpected certificate authorities, even if those CAs are otherwise trusted, ensuring that even with a compromised certificate authority, attackers cannot impersonate pinned origins through fraudulent certificate issuance.

**Verification**:

1. Configure a test server to send Public-Key-Pins or Expect-CT headers
2. Navigate to the test server and verify that pins are stored by the browser
3. Attempt to connect with a certificate that violates the pin (different public key)
4. Verify that the browser rejects the connection due to pin validation failure
5. Test pin expiration and max-age directive behavior
6. Test includeSubDomains directive for pin inheritance
7. Test report-uri directive for pin violation reporting
8. Examine browser's HPKP/pin storage (chrome://net-internals/#hsts for Chromium)
9. Test static pins for built-in domains (e.g., Google properties)
10. Confirm that browser correctly stores certificate pins from HTTP headers
11. Verify that connections with mismatched certificates are rejected
12. Check that pin validation errors display clear security warnings
13. Validate that pins expire according to max-age directive
14. Confirm that includeSubDomains directive applies pins to subdomains
15. Verify that pin violations are reported to specified report-uri
16. Check that browser maintains persistent pin storage across sessions
17. Validate that static pins for built-in domains are enforced

**Pass Criteria**: Browser enforces certificate pins correctly AND rejects connections that violate pin requirements

**Fail Criteria**: Browser ignores certificate pins OR allows connections that violate pin requirements

**Evidence**: Screenshots of pin validation errors, browser internal state showing stored pins, network logs showing rejected connections, pin violation reports

**References**:

- RFC 7469 - HTTP Public Key Pinning (HPKP): https://datatracker.ietf.org/doc/html/rfc7469
- Expect-CT Header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expect-CT
- OWASP Certificate Pinning: https://owasp.org/www-community/controls/Certificate_and_Public_Key_Pinning
- Chrome HPKP Guidance: https://www.chromium.org/hsts/

### Assessment: ENC-REQ-4 (HSTS enforcement)

**Reference**: ENC-REQ-4 - Browser shall enforce HTTP Strict Transport Security (HSTS) to prevent protocol downgrade attacks

**Given**: A conformant browser with encryption capability (ENC-1 or higher)

**Task**: Verify that HSTS enforcement prevents protocol downgrade attacks where attackers strip TLS to intercept credentials, ensuring all connections to HSTS-enabled domains use HTTPS even if users or applications attempt insecure HTTP connections. This protection is critical for preventing man-in-the-middle attacks that exploit the initial HTTP connection window before users type "https://" or before redirects to HTTPS occur.

**Verification**:

1. Configure a test server to send Strict-Transport-Security header: `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
2. Navigate to https://test.example.com and verify HSTS header is received
3. Attempt to navigate to http://test.example.com (non-HTTPS) and verify automatic upgrade to HTTPS
4. Test that browser stores HSTS policy persistently across sessions
5. Verify includeSubDomains directive applies HSTS to all subdomains
6. Test HSTS policy expiration by setting short max-age values
7. Examine browser's HSTS storage (chrome://net-internals/#hsts)
8. Test HSTS preload list for well-known domains
9. Attempt to bypass HSTS with user override and verify it's prevented
10. Browser receives and processes Strict-Transport-Security header
11. HTTP requests are automatically upgraded to HTTPS for HSTS domains
12. HSTS policy persists across browser sessions
13. includeSubDomains directive correctly applies to subdomains
14. HSTS policies expire according to max-age directive
15. Preloaded domains enforce HTTPS even on first visit
16. Users cannot bypass HSTS enforcement
17. Browser maintains HSTS state in persistent storage

**Pass Criteria**: All HTTP requests to HSTS domains are automatically upgraded to HTTPS AND HSTS policies are enforced persistently

**Fail Criteria**: HTTP requests are not upgraded OR HSTS policies can be bypassed OR policies do not persist

**Evidence**: Network logs showing HTTP to HTTPS upgrades, browser HSTS storage screenshots, packet captures showing only HTTPS connections, console logs

**References**:

- RFC 6797 - HTTP Strict Transport Security (HSTS): https://datatracker.ietf.org/doc/html/rfc6797
- HSTS Preload List: https://hstspreload.org/
- OWASP HSTS Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Strict_Transport_Security_Cheat_Sheet.html
- MDN HSTS Documentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
- Chromium HSTS Implementation: https://www.chromium.org/hsts/

### Assessment: ENC-REQ-5 (Mixed content blocking)

**Reference**: ENC-REQ-5 - Browser shall block mixed content (HTTP resources on HTTPS pages) to prevent downgrade attacks

**Given**: A conformant browser with encryption capability (ENC-1 or higher)

**Task**: Verify that mixed content blocking prevents protocol downgrade attacks where attackers inject HTTP resources into HTTPS pages to intercept data or execute malicious scripts. Blocking mixed content maintains the security guarantees of HTTPS by preventing unencrypted channels that could be exploited by network-level attackers to compromise the page's integrity and confidentiality.

**Verification**:

1. Create an HTTPS test page (https://test.example.com) that loads various HTTP resources:
   - HTTP scripts: `<script src="http://example.com/script.js">`
   - HTTP stylesheets: `<link href="http://example.com/style.css">`
   - HTTP iframes: `<iframe src="http://example.com/page.html">`
   - HTTP images: `<img src="http://example.com/image.jpg">`
   - HTTP XHR/fetch requests
   - HTTP form submission actions
2. Navigate to the test page and observe browser behavior
3. Verify that active mixed content (scripts, stylesheets, iframes) is blocked
4. Test browser's handling of passive mixed content (images, audio, video)
5. Check browser console for mixed content warnings
6. Test Content-Security-Policy: block-all-mixed-content directive
7. Verify that upgrade-insecure-requests CSP directive upgrades HTTP to HTTPS
8. Test mixed content indicator in browser address bar
9. Active mixed content (scripts, stylesheets, iframes) is completely blocked
10. Browser console displays clear mixed content blocking messages
11. Passive mixed content may load with warnings (or be blocked in strict mode)
12. Mixed content indicator appears in browser address bar/security indicator
13. CSP block-all-mixed-content directive blocks all mixed content
14. CSP upgrade-insecure-requests upgrades HTTP resources to HTTPS
15. Form submissions to HTTP URLs are blocked or warned
16. Users are warned about security implications of mixed content

**Pass Criteria**: All active mixed content is blocked AND clear warnings are displayed in console and UI

**Fail Criteria**: Active mixed content loads successfully OR no warnings are displayed

**Evidence**: Browser console screenshots showing blocked resources, network panel showing blocked requests, security indicator screenshots, DevTools showing CSP violations

**References**:

- W3C Mixed Content Specification: https://w3c.github.io/webappsec-mixed-content/
- MDN Mixed Content Documentation: https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content
- Chrome Mixed Content Policy: https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html
- Upgrade Insecure Requests: https://www.w3.org/TR/upgrade-insecure-requests/

### Assessment: ENC-REQ-6 (Certificate Transparency)

**Reference**: ENC-REQ-6 - Browser shall enforce Certificate Transparency (CT) requirements for all publicly trusted certificates

**Given**: A conformant browser with encryption capability (ENC-2 or higher)

**Task**: Verify that Certificate Transparency enforcement detects rogue certificates issued by compromised or malicious certificate authorities, preventing attackers from using fraudulently issued certificates for man-in-the-middle attacks. CT ensures all publicly trusted certificates are logged in append-only public ledgers, making unauthorized certificate issuance detectable and accountable.

**Verification**:

1. Set up test servers with certificates that have different CT compliance levels:
   - Certificate with embedded SCTs (Signed Certificate Timestamps)
   - Certificate with SCTs delivered via TLS extension
   - Certificate with SCTs delivered via OCSP stapling
   - Certificate without any SCTs
2. Navigate to each test server and observe browser behavior
3. Verify that browser requires CT for publicly trusted certificates
4. Check DevTools Security tab for CT information
5. Test that certificates without valid SCTs are rejected
6. Verify that browser validates SCT signatures
7. Test CT enforcement for different certificate types (DV, OV, EV)
8. Examine browser's CT policy compliance
9. Browser accepts certificates with valid SCTs
10. Certificates without SCTs are rejected with security errors
11. DevTools Security tab displays CT compliance status
12. Browser validates SCT signatures from known logs
13. CT is enforced for all publicly trusted certificates
14. Multiple SCT delivery mechanisms are supported
15. Browser maintains list of trusted CT log servers
16. CT violations trigger certificate errors

**Pass Criteria**: Browser enforces CT requirements AND rejects certificates without valid SCTs

**Fail Criteria**: Browser accepts certificates without SCTs OR does not validate SCT signatures

**Evidence**: DevTools Security tab screenshots showing CT status, certificate error dialogs for non-CT certificates, network logs showing SCT validation, browser CT policy configuration

**References**:

- RFC 6962 - Certificate Transparency: https://datatracker.ietf.org/doc/html/rfc6962
- Chrome CT Policy: https://github.com/chromium/ct-policy/blob/master/ct_policy.md
- Certificate Transparency Overview: https://certificate.transparency.dev/
- Google CT Log List: https://www.gstatic.com/ct/log_list/v3/all_logs_list.json
- CT Monitoring: https://developers.google.com/web/updates/2017/10/certificate-transparency

### Assessment: ENC-REQ-7 (OCSP stapling)

**Reference**: ENC-REQ-7 - Browser shall support OCSP stapling for efficient certificate revocation checking

**Given**: A conformant browser with encryption capability (ENC-1 or higher)

**Task**: Verify that OCSP stapling support enables efficient certificate revocation checking without privacy leaks, preventing attackers from using revoked certificates while avoiding OCSP responder queries that reveal user browsing patterns. Stapling moves the revocation check to the server, improving performance and privacy while maintaining security against compromised certificates.

**Verification**:

1. Configure a test server to support OCSP stapling (include OCSP response in TLS handshake)
2. Navigate to the test server and capture the TLS handshake using packet capture tools
3. Verify that browser receives and validates the stapled OCSP response
4. Test server without OCSP stapling and verify browser falls back to OCSP responder query
5. Configure OCSP response indicating certificate is revoked and verify browser rejection
6. Test OCSP response validation including signature verification
7. Measure performance difference between stapled and non-stapled OCSP
8. Test OCSP Must-Staple certificate extension enforcement
9. Verify handling of expired or invalid OCSP responses
10. Browser successfully receives and validates stapled OCSP responses
11. Packet captures show OCSP response in TLS handshake (CertificateStatus message)
12. Browser validates OCSP response signatures
13. Revoked certificates are rejected based on OCSP response
14. Browser falls back to direct OCSP query when stapling unavailable
15. OCSP Must-Staple extension is enforced (if present)
16. Performance metrics show faster connection with stapling
17. Invalid OCSP responses trigger appropriate error handling

**Pass Criteria**: Browser correctly validates stapled OCSP responses AND rejects revoked certificates

**Fail Criteria**: Browser ignores OCSP responses OR accepts revoked certificates

**Evidence**: Packet captures showing stapled OCSP in TLS handshake, certificate error screenshots for revoked certificates, performance measurements, DevTools Security tab showing OCSP status

**References**:

- RFC 6066 - TLS Extension: OCSP Status Request: https://datatracker.ietf.org/doc/html/rfc6066#section-8
- RFC 6960 - Online Certificate Status Protocol (OCSP): https://datatracker.ietf.org/doc/html/rfc6960
- OCSP Stapling Explained: https://www.digicert.com/kb/ssl-support/what-is-ocsp-stapling.htm
- OCSP Must-Staple: https://scotthelme.co.uk/ocsp-must-staple/

### Assessment: ENC-REQ-8 (Cipher suite restrictions)

**Reference**: ENC-REQ-8 - Browser shall support only secure cipher suites and disable weak or deprecated algorithms

**Given**: A conformant browser with encryption capability (ENC-1 or higher)

**Task**: Verify that cipher suite restrictions prevent cryptographic weaknesses from being exploited by attackers to break TLS encryption, ensuring only modern algorithms resistant to known attacks are used. Rejecting weak ciphers like RC4, DES, and export-grade algorithms prevents downgrade attacks and ensures forward security against future cryptanalysis.

**Verification**:

1. Configure test servers with various cipher suites:
   - Strong: TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256
   - Acceptable: TLS_AES_128_GCM_SHA256, ECDHE-RSA-AES128-GCM-SHA256
   - Weak: RC4, DES, 3DES, NULL ciphers
   - Export-grade ciphers
2. Test browser connection to each server configuration
3. Verify that browser refuses weak cipher suites
4. Capture cipher suite negotiation using packet analysis
5. Test browser's cipher suite preference order
6. Verify that AEAD (Authenticated Encryption with Associated Data) ciphers are preferred
7. Test that CBC-mode ciphers are avoided or deprioritized
8. Examine browser's supported cipher suite list
9. Test cipher suite restrictions for different TLS versions
10. Browser successfully negotiates strong cipher suites
11. Weak cipher suites (RC4, DES, 3DES, NULL) are rejected
12. Connection fails when only weak ciphers are available
13. Browser prefers AEAD ciphers over CBC-mode ciphers
14. Cipher suite negotiation follows secure ordering
15. Export-grade ciphers are completely disabled
16. DevTools shows negotiated cipher suite
17. Browser supports all modern recommended cipher suites

**Pass Criteria**: Browser only accepts strong cipher suites AND rejects all weak or deprecated ciphers

**Fail Criteria**: Browser accepts any weak cipher suite OR fails to negotiate strong ciphers when available

**Evidence**: Packet captures showing cipher suite negotiation, DevTools Security tab showing negotiated cipher, server logs, connection error screenshots for weak cipher servers

**References**:

- Mozilla SSL Configuration Generator: https://ssl-config.mozilla.org/
- NIST SP 800-52 Rev. 2 - TLS Guidelines: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-52r2.pdf
- RFC 8446 - TLS 1.3 Cipher Suites: https://datatracker.ietf.org/doc/html/rfc8446#appendix-B.4
- IANA TLS Cipher Suite Registry: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4
- Qualys SSL Labs - Cipher Suite Guidance: https://github.com/ssllabs/research/wiki/SSL-and-TLS-Deployment-Best-Practices#23-use-secure-cipher-suites

### Assessment: ENC-REQ-9 (Perfect forward secrecy)

**Reference**: ENC-REQ-9 - Browser shall support and prefer cipher suites with perfect forward secrecy (PFS)

**Given**: A conformant browser with encryption capability (ENC-2 or higher)

**Task**: Verify that perfect forward secrecy prevents retrospective decryption attacks where adversaries record encrypted traffic and later compromise server private keys to decrypt historical sessions. PFS ensures that even if long-term keys are compromised, past TLS sessions remain secure because session keys were ephemeral and never stored.

**Verification**:

1. Configure test servers with different key exchange mechanisms:
   - ECDHE (Elliptic Curve Diffie-Hellman Ephemeral) - provides PFS
   - DHE (Diffie-Hellman Ephemeral) - provides PFS
   - RSA key exchange - no PFS
2. Test browser connection to each server configuration
3. Verify that browser prefers ECDHE/DHE over static RSA key exchange
4. Capture TLS handshake to confirm ephemeral key exchange
5. Test that browser supports multiple elliptic curves (X25519, P-256, P-384)
6. Verify proper DH parameter size enforcement (minimum 2048 bits)
7. Test TLS 1.3 behavior (all cipher suites provide PFS)
8. Examine cipher suite preference order for PFS priority
9. Test connection failure when only non-PFS ciphers are available
10. Browser successfully negotiates ECDHE/DHE cipher suites
11. Browser prefers PFS cipher suites over non-PFS alternatives
12. Packet captures show ephemeral key exchange in handshake
13. Browser supports modern elliptic curves (X25519 preferred)
14. DHE parameters meet minimum security requirements (2048+ bits)
15. TLS 1.3 connections always provide PFS
16. DevTools Security tab indicates PFS status
17. Browser may reject or deprioritize non-PFS cipher suites

**Pass Criteria**: Browser prefers PFS cipher suites when available AND successfully negotiates ephemeral key exchange

**Fail Criteria**: Browser prefers non-PFS ciphers over PFS alternatives OR fails to negotiate PFS key exchange

**Evidence**: Packet captures showing ECDHE/DHE key exchange, DevTools Security tab showing PFS cipher suite, connection test results, cipher suite preference analysis

**References**:

- RFC 8446 - TLS 1.3 (all cipher suites provide PFS): https://datatracker.ietf.org/doc/html/rfc8446
- Perfect Forward Secrecy Explained: https://scotthelme.co.uk/perfect-forward-secrecy/
- OWASP TLS Cheat Sheet - Forward Secrecy: https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Protection_Cheat_Sheet.html#forward-secrecy
- Mozilla Server Side TLS Guidelines: https://wiki.mozilla.org/Security/Server_Side_TLS

### Assessment: ENC-REQ-10 (Revocation checking)

**Reference**: ENC-REQ-10 - Browser shall perform certificate revocation checking via OCSP and/or CRL mechanisms

**Given**: A conformant browser with encryption capability (ENC-1 or higher)

**Task**: Verify that certificate revocation checking prevents attackers from using compromised or fraudulently obtained certificates that have been revoked by the issuing CA. Checking revocation status ensures browsers reject certificates known to be untrustworthy, protecting users from man-in-the-middle attacks using stolen or misused certificates even after they've been marked as invalid.

**Verification**:

1. Set up test certificates with different revocation configurations:
   - Valid certificate with OCSP responder URL
   - Valid certificate with CRL distribution point
   - Revoked certificate (marked as revoked in OCSP/CRL)
   - Certificate without revocation information
2. Navigate to servers using each certificate type
3. Verify that browser checks certificate revocation status
4. Test OCSP responder queries (use network monitoring)
5. Test CRL download and parsing
6. Configure OCSP responder to return "revoked" status and verify browser rejection
7. Test soft-fail vs hard-fail behavior when revocation check is unavailable
8. Measure performance impact of revocation checking
9. Test browser's revocation checking cache behavior
10. Browser performs OCSP queries for certificates with OCSP URLs
11. Browser downloads and processes CRLs when available
12. Revoked certificates are rejected with clear error messages
13. Browser caches revocation check results appropriately
14. OCSP responses are validated (signature, freshness)
15. CRL validity period is checked
16. Browser handles revocation check failures gracefully
17. Network panel shows OCSP/CRL requests

**Pass Criteria**: Browser performs revocation checks AND rejects revoked certificates with clear error messages

**Fail Criteria**: Browser skips revocation checking OR accepts revoked certificates

**Evidence**: Network logs showing OCSP/CRL requests, certificate error screenshots for revoked certificates, packet captures, DevTools showing revocation status, performance measurements

**References**:

- RFC 6960 - Online Certificate Status Protocol (OCSP): https://datatracker.ietf.org/doc/html/rfc6960
- RFC 5280 - Certificate and CRL Profile: https://datatracker.ietf.org/doc/html/rfc5280
- Chrome CRLSet Mechanism: https://www.imperialviolet.org/2012/02/05/crlsets.html
- OWASP Certificate Revocation: https://owasp.org/www-community/controls/Certificate_and_Public_Key_Pinning

### Assessment: ENC-REQ-11 (Web Crypto API compliance)

**Reference**: ENC-REQ-11 - Browser shall implement W3C Web Cryptography API for JavaScript cryptographic operations

**Given**: A conformant browser with encryption capability (ENC-1 or higher)

**Task**: Verify that Web Crypto API compliance provides secure, browser-native cryptographic operations preventing developers from implementing insecure custom cryptography that could be vulnerable to timing attacks, weak random number generation, or algorithmic flaws. Restricting the API to secure contexts ensures cryptographic keys and operations are only available over HTTPS, preventing network attackers from intercepting keys.

**Verification**:

1. Create test web page accessing window.crypto.subtle API
2. Test key generation for various algorithms:
   - RSA-OAEP, RSA-PSS (2048, 3072, 4096 bits)
   - ECDSA, ECDH (P-256, P-384, P-521 curves)
   - AES-GCM, AES-CBC (128, 256 bits)
   - HMAC with various hash functions
3. Test encryption/decryption operations with generated keys
4. Test signing and verification operations
5. Test key derivation functions (PBKDF2, HKDF)
6. Test key import/export in various formats (JWK, PKCS8, SPKI, raw)
7. Verify that subtle crypto operations are only available in secure contexts (HTTPS)
8. Test that cryptographic keys can be marked as non-extractable
9. Test key usage constraints (encrypt, decrypt, sign, verify, etc.)
10. Verify proper error handling for invalid parameters
11. window.crypto.subtle is available in secure contexts only
12. All mandatory algorithms are supported
13. Key generation produces keys of requested type and size
14. Encrypt/decrypt operations work correctly with proper padding
15. Sign/verify operations validate signatures correctly
16. Key derivation functions produce deterministic results
17. Non-extractable keys cannot be exported
18. Key usage constraints are enforced
19. Operations fail appropriately in insecure contexts (HTTP)
20. Error messages are clear and informative

**Pass Criteria**: All Web Crypto API operations function correctly AND API is restricted to secure contexts

**Fail Criteria**: Required algorithms are missing OR API is available in insecure contexts OR operations produce incorrect results

**Evidence**: Console logs showing successful crypto operations, test result screenshots, code demonstrating API usage, error messages for insecure context access

**References**:

- W3C Web Cryptography API Specification: https://www.w3.org/TR/WebCryptoAPI/
- MDN Web Crypto API Documentation: https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API
- Web Crypto API Examples: https://github.com/diafygi/webcrypto-examples
- OWASP Cryptographic Storage Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html
- Chrome Web Crypto Implementation: https://www.chromium.org/blink/webcrypto/

### Assessment: ENC-REQ-12 (Secure random number generation)

**Reference**: ENC-REQ-12 - Browser shall provide cryptographically secure random number generation via Crypto.getRandomValues()

**Given**: A conformant browser with encryption capability (ENC-1 or higher)

**Task**: Verify that cryptographically secure random number generation prevents predictability attacks where weak randomness allows attackers to guess session tokens, cryptographic keys, or authentication nonces. High-quality entropy ensures generated values are unpredictable and cannot be reproduced, which is essential for secure key generation, token creation, and cryptographic operations.

**Verification**:

1. Create test page calling window.crypto.getRandomValues() with various typed arrays:
   - Uint8Array, Uint16Array, Uint32Array
   - Different array sizes (1 byte to 65536 bytes)
2. Generate large samples of random data (millions of bytes)
3. Test statistical properties of generated random data:
   - Frequency test (chi-square)
   - Runs test
   - Entropy analysis
4. Verify that repeated calls produce different values
5. Test that maximum size limit (65536 bytes) is enforced
6. Verify proper error handling for invalid parameters
7. Test that random values are available in both secure and insecure contexts
8. Compare randomness quality across multiple browser sessions
9. Test performance of random number generation
10. window.crypto.getRandomValues() is available and functional
11. Generated values pass statistical randomness tests
12. Repeated calls produce different, unpredictable values
13. All typed array types are supported
14. Maximum size limit (65536 bytes) is enforced
15. QuotaExceededError thrown for oversized requests
16. Random values have sufficient entropy (>= 7.9 bits per byte)
17. Performance is acceptable (can generate MBs per second)
18. API is available in all contexts (secure and insecure)

**Pass Criteria**: Generated random values pass statistical tests AND have sufficient entropy for cryptographic use

**Fail Criteria**: Random values show statistical bias OR have insufficient entropy OR values are predictable

**Evidence**: Statistical test results, entropy analysis graphs, performance benchmarks, console logs showing API usage, test code with results

**References**:

- W3C Web Cryptography API - getRandomValues: https://www.w3.org/TR/WebCryptoAPI/#Crypto-method-getRandomValues
- MDN Crypto.getRandomValues(): https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues
- NIST SP 800-22 - Statistical Tests for Random Number Generators: https://csrc.nist.gov/publications/detail/sp/800-22/rev-1a/final
- Random.org - Statistical Tests: https://www.random.org/analysis/
- OWASP Cryptographic Storage - Random Number Generation: https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html#secure-random-number-generation

### Assessment: ENC-REQ-13 (SubResource Integrity)

**Reference**: ENC-REQ-13 - Browser shall enforce Subresource Integrity (SRI) for externally loaded scripts and stylesheets

**Given**: A conformant browser with encryption capability (ENC-1 or higher)

**Task**: Verify that Subresource Integrity enforcement prevents supply chain attacks where compromised CDNs or third-party servers deliver malicious modified scripts or stylesheets. SRI ensures that external resources match their expected cryptographic hashes, detecting unauthorized modifications that could inject malware, steal credentials, or compromise user data even if the hosting server is compromised.

**Verification**:

1. Create test page loading external resources with integrity attributes:
   ```html
   <script src="https://cdn.example.com/lib.js"
           integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
           crossorigin="anonymous"></script>
   <link href="https://cdn.example.com/style.css"
         integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"
         crossorigin="anonymous">
   ```
2. Verify that resources with correct integrity hashes load successfully
3. Modify resource content to mismatch integrity hash and verify blocking
4. Test multiple hash algorithms: sha256, sha384, sha512
5. Test multiple integrity values (fallback hashes)
6. Test CORS requirement for cross-origin SRI resources
7. Verify browser console errors for SRI failures
8. Test SRI with different resource types (scripts, stylesheets, preload links)
9. Test that SRI failures prevent script execution/style application
10. Resources with matching integrity hashes load and execute successfully
11. Resources with mismatched hashes are blocked from loading
12. Browser console displays clear SRI violation errors
13. Multiple hash algorithms (sha256, sha384, sha512) are supported
14. Multiple integrity values allow fallback verification
15. Cross-origin resources require proper CORS headers for SRI
16. SRI failures prevent resource execution/application
17. Network panel shows blocked resources with SRI violations
18. Page functionality degrades gracefully when SRI blocks resources

**Pass Criteria**: Resources with correct integrity hashes load successfully AND resources with mismatched hashes are blocked with clear errors

**Fail Criteria**: Resources with mismatched hashes load and execute OR no error messages displayed

**Evidence**: Browser console screenshots showing SRI errors, network panel showing blocked resources, test page demonstrating SRI enforcement, DevTools showing integrity attribute validation

**References**:

- W3C Subresource Integrity Specification: https://www.w3.org/TR/SRI/
- MDN Subresource Integrity: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
- SRI Hash Generator: https://www.srihash.org/
- OWASP SRI Guidance: https://cheatsheetseries.owasp.org/cheatsheets/Third_Party_Javascript_Management_Cheat_Sheet.html#subresource-integrity
- Chrome SRI Implementation: https://www.chromium.org/Home/chromium-security/education/tls/

### Assessment: ENC-REQ-14 (Encrypted SNI)

**Reference**: ENC-REQ-14 - Browser shall support Encrypted Server Name Indication (ESNI/ECH) to prevent SNI-based censorship and surveillance

**Given**: A conformant browser with encryption capability (ENC-3 or higher)

**Task**: Verify that Encrypted SNI support prevents network surveillance and censorship where adversaries monitor TLS handshakes to identify which websites users visit, enabling targeted blocking or surveillance. Encrypting SNI protects user privacy by hiding the destination hostname from network observers, preventing traffic analysis attacks that reveal browsing patterns even when connections use HTTPS.

**Verification**:

1. Configure a test server supporting Encrypted Client Hello (ECH) or ESNI
2. Publish ECH configuration in DNS (TLS HTTPS record type 65)
3. Navigate browser to the test server
4. Capture TLS handshake using packet analysis tools
5. Verify that SNI extension is encrypted in ClientHello message
6. Test fallback behavior when ECH is unavailable
7. Test that cleartext SNI is not visible in packet captures
8. Verify browser DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT) usage for ECH config retrieval
9. Test ECH with split-horizon DNS configurations
10. Examine browser settings for ECH/ESNI enablement
11. Browser successfully negotiates ECH/ESNI when available
12. SNI extension is not visible in cleartext in packet captures
13. ClientHello contains encrypted_client_hello extension
14. Browser retrieves ECH configuration via DNS
15. Fallback to cleartext SNI works when ECH unavailable
16. DNS queries for ECH config are encrypted (DoH/DoT)
17. Browser DevTools or internal pages show ECH status
18. Connection succeeds with ECH-enabled servers

**Pass Criteria**: Browser encrypts SNI when ECH is available AND cleartext SNI is not visible in packet captures

**Fail Criteria**: SNI is transmitted in cleartext when ECH is available OR browser doesn't support ECH

**Evidence**: Packet captures showing encrypted ClientHello, Wireshark analysis showing absence of cleartext SNI, DNS query logs showing ECH config retrieval, browser configuration screenshots

**References**:

- RFC 8744 - Encrypted Server Name Indication (ESNI): https://datatracker.ietf.org/doc/html/rfc8744
- Encrypted Client Hello (ECH) Draft: https://datatracker.ietf.org/doc/html/draft-ietf-tls-esni
- Cloudflare ECH Announcement: https://blog.cloudflare.com/encrypted-client-hello/
- Mozilla ECH Implementation: https://support.mozilla.org/en-US/kb/understand-encrypted-client-hello
- Chrome ECH Status: https://chromestatus.com/feature/6196703843581952

### Assessment: ENC-REQ-15 (Certificate error UI)