Programming .NET Security

Book description

With the spread of web-enabled desktop clients and web-server based applications, developers can no longer afford to treat security as an afterthought. It's one topic, in fact, that .NET forces you to address, since Microsoft has placed security-related features at the core of the .NET Framework. Yet, because a developer's carelessness or lack of experience can still allow a program to be used in an unintended way, Programming .NET Security shows you how the various tools will help you write secure applications.The book works as both a comprehensive tutorial and reference to security issues for .NET application development, and contains numerous practical examples in both the C# and VB.NET languages. With Programming .NET Security, you will learn to apply sound security principles to your application designs, and to understand the concepts of identity, authentication and authorization and how they apply to .NET security. This guide also teaches you to:

  • use the .NET run-time security features and .NET security namespaces and types to implement best-practices in your applications, including evidence, permissions, code identity and security policy, and role based and Code Access Security (CAS) use the .NET cryptographic APIs , from hashing and common encryption algorithms to digital signatures and cryptographic keys, to protect your data.
  • use COM+ component services in a secure manner
If you program with ASP.NET will also learn how to apply security to your applications. And the book also shows you how to use the Windows Event Log Service to audit Windows security violations that may be a threat to your solution.Authors Adam Freeman and Allen Jones, early .NET adopters and long-time proponents of an "end-to-end" security model, based this book on their years of experience in applying security policies and developing products for NASDAQ, Sun Microsystems, Netscape, Microsoft, and others. With the .NET platform placing security at center stage, the better informed you are, the more secure your project will be.

Publisher resources

View/Submit Errata

Table of contents

  1. Dedication
  2. A Note Regarding Supplemental Files
  3. Preface
    1. How This Book Is Organized
      1. Part I: Fundamentals
      2. Part II: .NET Security
      3. Part III: .NET Cryptography
      4. Part IV: .NET Applications Frameworks
      5. Part V: API Quick Reference
    2. Who Should Read This Book
    3. Assumptions This Book Makes
    4. Conventions Used in This Book
    5. How to Contact Us
  4. I. Fundamentals
    1. 1. Security Fundamentals
      1. 1.1. The Need for Security
      2. 1.2. Roles in Security
        1. 1.2.1. The Business Sponsor
        2. 1.2.2. The Architect
        3. 1.2.3. The Programmer
        4. 1.2.4. The Security Tester
        5. 1.2.5. The System Administrator
        6. 1.2.6. The User
        7. 1.2.7. The Hacker/Cracker
      3. 1.3. Understanding Software Security
        1. 1.3.1. Restricted Resources
        2. 1.3.2. Trust
        3. 1.3.3. Secrets
          1. 1.3.3.1. The lifetime of secrets
          2. 1.3.3.2. Protecting secrets
      4. 1.4. End-to-End Security
        1. 1.4.1. Real-World Trust Relationships
        2. 1.4.2. Side Channels
        3. 1.4.3. Physical Security
        4. 1.4.4. Third-Party Software
    2. 2. Assemblies
      1. 2.1. Assemblies Explained
      2. 2.2. Creating Assemblies
        1. 2.2.1. Creating a Single-File Assembly
        2. 2.2.2. Creating a Multifile Assembly
      3. 2.3. Shared Assemblies
      4. 2.4. Strong Names
        1. 2.4.1. Creating a Key Pair
        2. 2.4.2. Creating an Assembly Strong Name
          1. 2.4.2.1. Specifying the version and culture metadata
          2. 2.4.2.2. Specifying the key pair
          3. 2.4.2.3. Creating the strong name
          4. 2.4.2.4. Creating a strong name for a multifile assembly
        3. 2.4.3. Delayed Signing
        4. 2.4.4. Verifying a Strong Name
      5. 2.5. Publisher Certificates
        1. 2.5.1. Using the Global Assembly Cache
      6. 2.6. Decompiling Explained
        1. 2.6.1. Decompiling Assemblies
        2. 2.6.2. Protecting Against Decompilation
          1. 2.6.2.1. Obfuscation
          2. 2.6.2.2. Native compilation
    3. 3. Application Domains
      1. 3.1. Application Domains Explained
        1. 3.1.1. Application Isolation in the .NET Framework
        2. 3.1.2. Application Domain and Assembly Management
        3. 3.1.3. Assembly Isolation with Application Domains
        4. 3.1.4. Application Domains and Runtime Security
          1. 3.1.4.1. Assembly evidence and identity
          2. 3.1.4.2. Application domain evidence and identity
          3. 3.1.4.3. Application domains and security policy
          4. 3.1.4.4. Role-based security
          5. 3.1.4.5. Application domains and isolated storage
        5. 3.1.5. Application Domains and Application Configuration
    4. 4. The Lifetime of a Secure Application
      1. 4.1. Designing a Secure .NET Application
        1. 4.1.1. Identifying Restricted Resources
        2. 4.1.2. Identifying Trust
        3. 4.1.3. Identifying Secrets
        4. 4.1.4. Failing Gracefully
      2. 4.2. Developing a Secure .NET Application
      3. 4.3. Security Testing a .NET Application
      4. 4.4. Deploying a .NET Application
      5. 4.5. Executing a .NET Application
      6. 4.6. Monitoring a .NET Application
  5. II. .NET Security
    1. 5. Introduction to Runtime Security
      1. 5.1. Runtime Security Explained
        1. 5.1.1. Running Unverifiable and Native Code
      2. 5.2. Introducing Role-Based Security
      3. 5.3. Introducing Code-Access Security
        1. 5.3.1. Evidence, Security Policy, and Permissions
        2. 5.3.2. Windows Security and Code-Access Security
      4. 5.4. Introducing Isolated Storage
    2. 6. Evidence and Code Identity
      1. 6.1. Evidence Explained
        1. 6.1.1. Sources and Types of Evidence
          1. 6.1.1.1. Host evidence
          2. 6.1.1.2. Assembly evidence
      2. 6.2. Programming Evidence
        1. 6.2.1. Introduction to Evidence Programming
        2. 6.2.2. Using the Evidence Class
        3. 6.2.3. Using the Standard Evidence Classes
          1. 6.2.3.1. The ApplicationDirectory class
          2. 6.2.3.2. The Hash class
          3. 6.2.3.3. The Publisher class
          4. 6.2.3.4. The Site class
          5. 6.2.3.5. The StrongName class
          6. 6.2.3.6. The Url class
          7. 6.2.3.7. The Zone class
        4. 6.2.4. Viewing Evidence
        5. 6.2.5. Assigning Evidence to Assemblies
        6. 6.2.6. Assigning Evidence to Application Domains
      3. 6.3. Extending the .NET Framework
        1. 6.3.1. Creating Custom Evidence
          1. 6.3.1.1. Defining the Author evidence class
          2. 6.3.1.2. Using the SecurityElement Class
          3. 6.3.1.3. Building the Author evidence class
        2. 6.3.2. Using Custom Evidence
          1. 6.3.2.1. Making the Author assembly a fully trusted assembly
          2. 6.3.2.2. Serializing evidence
          3. 6.3.2.3. Embedding evidence in an assembly
        3. 6.3.3. The Next Steps in Customization
    3. 7. Permissions
      1. 7.1. Permissions Explained
        1. 7.1.1. Granting Permissions
        2. 7.1.2. Requesting Permissions
        3. 7.1.3. Permission Types
          1. 7.1.3.1. Code-access permissions
          2. 7.1.3.2. Identity permissions
        4. 7.1.4. Enforcing Code-Access Security
          1. 7.1.4.1. Stack walks explained
      2. 7.2. Programming Code-Access Security
        1. 7.2.1. Security Statement Syntax
          1. 7.2.1.1. Imperative security statements
          2. 7.2.1.2. Declarative security statements
        2. 7.2.2. Programming Permissions
          1. 7.2.2.1. Common permission class functionality
          2. 7.2.2.2. Using the SecurityPermission class
        3. 7.2.3. Programming Permission Sets
        4. 7.2.4. Programming Permission Requests
          1. 7.2.4.1. Requesting minimum permission
          2. 7.2.4.2. Requesting optional permissions
          3. 7.2.4.3. Refusing permissions
        5. 7.2.5. Programming Permission Demands
          1. 7.2.5.1. Demand
          2. 7.2.5.2. LinkDemands
          3. 7.2.5.3. Inheritance demands
        6. 7.2.6. Manipulating Stack Walks
          1. 7.2.6.1. Assert
          2. 7.2.6.2. Deny
          3. 7.2.6.3. PermitOnly
          4. 7.2.6.4. Reverting overrides
      3. 7.3. Extending the .NET Framework
        1. 7.3.1. Creating Custom Code-Access Permissions
          1. 7.3.1.1. Designing the RadioPermission class
          2. 7.3.1.2. Defining imports and assembly scope attributes
          3. 7.3.1.3. Defining the RadioAction enumeration
          4. 7.3.1.4. Defining the RadioPermission class
          5. 7.3.1.5. Implementing the IUnrestrictedPermission interface
          6. 7.3.1.6. Implementing the IPermission interface
          7. 7.3.1.7. Implementing the ISecurityEncodable interface
          8. 7.3.1.8. Defining the RadioPermissionAttribute class
          9. 7.3.1.9. Building the Radio.dll library
          10. 7.3.1.10. Using RadioPermission to enforce security
    4. 8. Security Policy
      1. 8.1. Security Policy Explained
        1. 8.1.1. Security Policy Levels
          1. 8.1.1.1. Code groups
          2. 8.1.1.2. Named permission sets
          3. 8.1.1.3. Fully trusted assemblies
        2. 8.1.2. Policy Resolution
          1. 8.1.2.1. Code group attributes
        3. 8.1.3. Configuring Security Policy
      2. 8.2. Programming Security Policy
        1. 8.2.1. Programming Code Groups
          1. 8.2.1.1. Programming membership conditions
          2. 8.2.1.2. Programming policy statements
          3. 8.2.1.3. Creating code groups
        2. 8.2.2. Programming Policy Levels
          1. 8.2.2.1. Managing fully trusted assemblies
          2. 8.2.2.2. Managing named permission sets
          3. 8.2.2.3. Managing the code group tree
        3. 8.2.3. Programming the Security Manager
        4. 8.2.4. Programming Application Domain Policy
      3. 8.3. Extending the .NET Framework
        1. 8.3.1. Custom Membership Conditions Explained
        2. 8.3.2. Defining the AuthorMembershipCondition Class
        3. 8.3.3. Building the AuthorMembershipCondition Assembly
        4. 8.3.4. Using the AuthorMembershipCondition Membership Condition
          1. 8.3.4.1. Installing security assemblies
          2. 8.3.4.2. Generating AuthorMembershipCondition XML
          3. 8.3.4.3. Configuring security policy
        5. 8.3.5. Testing Custom Membership Conditions
    5. 9. Administering Code-Access Security
      1. 9.1. Default Security Policy
        1. 9.1.1. Security Policy Files
        2. 9.1.2. Named Permission Sets
        3. 9.1.3. Enterprise and User Policy Code Groups
        4. 9.1.4. Machine Policy Code Groups
        5. 9.1.5. Fully Trusted Assemblies
      2. 9.2. Inspecting Declarative Security Statements
      3. 9.3. Using the .NET Framework Configuration Tool
        1. 9.3.1. Managing Fully Trusted Assemblies
          1. 9.3.1.1. Adding a fully trusted assembly
          2. 9.3.1.2. Deleting a fully trusted assembly
        2. 9.3.2. Managing Named Permission Sets
          1. 9.3.2.1. Creating named permission sets
        3. 9.3.3. Managing Code Groups
          1. 9.3.3.1. Creating code groups
        4. 9.3.4. Other Security Policy Administration Options
      4. 9.4. Using the Code-Access Security Policy Tool
        1. 9.4.1. Controlling the Security System
          1. 9.4.1.1. Switching code-access security on and off
          2. 9.4.1.2. Switching execution permission checks on and off
        2. 9.4.2. Administering Policy Levels
          1. 9.4.2.1. Specifying the target policy level
          2. 9.4.2.2. Specifying the target code group
          3. 9.4.2.3. Managing fully trusted assemblies
          4. 9.4.2.4. Managing named permission sets
          5. 9.4.2.5. Managing code groups
        3. 9.4.3. Evaluating Security Policy
        4. 9.4.4. Forcing Security Changes
        5. 9.4.5. Resetting Security Policy
    6. 10. Role-Based Security
      1. 10.1. Role-Based Security Explained
        1. 10.1.1. .NET Role-Based Security Explained
        2. 10.1.2. Comparing .NET Role-Based Security and Windows Security
      2. 10.2. Programming Role-Based Security
        1. 10.2.1. Introducing the IIdentity and IPrincipal Interfaces
        2. 10.2.2. Determining the Current Principal
        3. 10.2.3. Programming the Windows Role-Based Security Implementation
          1. 10.2.3.1. Configuring the current WindowsPrincipal
          2. 10.2.3.2. Impersonating Windows users
        4. 10.2.4. Making Role-Based Security Demands
          1. 10.2.4.1. Using imperative role-based security statements
          2. 10.2.4.2. Using declarative role-based security statements
        5. 10.2.5. Programming the Generic Role-Based Security Implementation
          1. 10.2.5.1. Configuring the current GenericPrincipal
    7. 11. Isolated Storage
      1. 11.1. Isolated Storage Explained
        1. 11.1.1. Levels of Isolation
          1. 11.1.1.1. Determining user and code identity
          2. 11.1.1.2. Isolation by user and assembly
          3. 11.1.1.3. Isolation by user, assembly, and application domain
        2. 11.1.2. Limitations of Isolated Storage
      2. 11.2. Programming Isolated Storage
        1. 11.2.1. Isolated Storage and Code-Access Security
        2. 11.2.2. Obtaining a Store
        3. 11.2.3. Creating Directories
        4. 11.2.4. Creating, Reading, and Writing Files
        5. 11.2.5. Searching for Files and Directories
        6. 11.2.6. Deleting Files and Directories
        7. 11.2.7. Deleting Stores
      3. 11.3. Administering Isolated Storage
        1. 11.3.1. Configuring Security Policy
          1. 11.3.1.1. Granting isolated storage permissions with Mscorcfg.msc
          2. 11.3.1.2. Granting isolated storage permissions with Caspol.exe
        2. 11.3.2. Managing Isolated Storage Stores
  6. III. .NET Cryptography
    1. 12. Introduction to Cryptography
      1. 12.1. Cryptography Explained
        1. 12.1.1. Confidentiality
        2. 12.1.2. Integrity
        3. 12.1.3. Authentication
      2. 12.2. Cryptography Is Key Management
      3. 12.3. Cryptographic Attacks
        1. 12.3.1. Brute Force Attacks, Theft, and Guessing
        2. 12.3.2. Cryptanalysis
        3. 12.3.3. Software Bugs
    2. 13. Hashing Algorithms
      1. 13.1. Hashing Algorithms Explained
        1. 13.1.1. Creating a Hash Code
        2. 13.1.2. Message Limits
        3. 13.1.3. Hash Code Length
        4. 13.1.4. The .NET Framework Hashing Algorithms
      2. 13.2. Programming Hashing Algorithms
        1. 13.2.1. The HashAlgorithm Class
        2. 13.2.2. Instantiating the Algorithm
        3. 13.2.3. Hashing Data from Memory
        4. 13.2.4. Hashing Streamed Data
        5. 13.2.5. Validating Hash Codes
      3. 13.3. Keyed Hashing Algorithms Explained
        1. 13.3.1. Creating the Keyed Hash Code
          1. 13.3.1.1. HMAC algorithms
          2. 13.3.1.2. Block cipher hash codes
        2. 13.3.2. The .NET Framework Keyed Hashing Algorithms
      4. 13.4. Programming Keyed Hashing Algorithms
        1. 13.4.1. The KeyedHashAlgorithm Class
        2. 13.4.2. Instantiating the Algorithm
        3. 13.4.3. Hashing Data and Validating Hash Codes
      5. 13.5. Extending the .NET Framework
        1. 13.5.1. The Alder32 Algorithm Explained
        2. 13.5.2. Defining the Abstract Class
        3. 13.5.3. Defining the Implementation Class
          1. 13.5.3.1. Creating the implementation class
          2. 13.5.3.2. Implementing the Initialize method
          3. 13.5.3.3. Implementing the HashCore and HashFinal methods
          4. 13.5.3.4. Completing the class
          5. 13.5.3.5. Testing the implementation
    3. 14. Symmetric Encryption
      1. 14.1. Encryption Revisited
      2. 14.2. Symmetric Encryption Explained
        1. 14.2.1. Creating the Encrypted Data
        2. 14.2.2. Cipher Modes
          1. 14.2.2.1. Electronic Codebook mode
          2. 14.2.2.2. Cipher block chaining
          3. 14.2.2.3. Cipher feedback mode
        3. 14.2.3. Block Padding
        4. 14.2.4. Symmetric Encryption Key Lengths
        5. 14.2.5. The .NET Framework Encryption Algorithms
      3. 14.3. Programming Symmetrical Encryption
        1. 14.3.1. The SymmetricAlgorithm Class
        2. 14.3.2. Instantiating the Algorithm
        3. 14.3.3. Configuring the Algorithm
          1. 14.3.3.1. Block and key sizes
          2. 14.3.3.2. Cipher and padding modes
          3. 14.3.3.3. Keys and initialization vectors (IVs)
        4. 14.3.4. Encrypting and Decrypting Data
      4. 14.4. Extending the .NET Framework
        1. 14.4.1. The Extended Tiny Encryption Algorithm Explained
        2. 14.4.2. Defining the Abstract Class
        3. 14.4.3. Defining the Implementation Class
        4. 14.4.4. Defining an Abstract Transformation
        5. 14.4.5. Defining the Encryption Transformation
        6. 14.4.6. Defining the Decryption Transformation
    4. 15. Asymmetric Encryption
      1. 15.1. Asymmetric Encryption Explained
        1. 15.1.1. Creating Asymmetric Keys
        2. 15.1.2. Asymmetric Algorithm Security
        3. 15.1.3. Creating the Encrypted Data
          1. 15.1.3.1. Asymmetric data padding
      2. 15.2. Programming Asymmetrical Encryption
        1. 15.2.1. The AsymmetricAlgorithm class
        2. 15.2.2. The RSA class
        3. 15.2.3. The RSACryptoServiceProvider Class
        4. 15.2.4. Instantiating the Algorithm
        5. 15.2.5. Using RSA Keys
        6. 15.2.6. Encrypting and Decrypting Data
      3. 15.3. Extending the .NET Framework
        1. 15.3.1. The ElGamal Algorithm Explained
          1. 15.3.1.1. ElGamal key generation protocol
          2. 15.3.1.2. ElGamal encryption and decryption functions
        2. 15.3.2. Processing Large Integer Values
        3. 15.3.3. Defining the Abstract Class
        4. 15.3.4. Defining the Implementation Class
        5. 15.3.5. Defining the Abstract Cipher Function Class
        6. 15.3.6. Defining the Encryption Class
        7. 15.3.7. Defining the Decryption Class
        8. 15.3.8. Testing the Algorithm
    5. 16. Digital Signatures
      1. 16.1. Digital Signatures Explained
        1. 16.1.1. Digital Signature Security
        2. 16.1.2. The .NET Framework Digital Signature Algorithms
        3. 16.1.3. Creating Digital Signatures
      2. 16.2. Programming Digital Signatures
        1. 16.2.1. Using the Abstract Class
        2. 16.2.2. Using the Implementation Class
        3. 16.2.3. Using the Signature Formatter Classes
      3. 16.3. Programming XML Signatures
        1. 16.3.1. XMLDSIG Explained
        2. 16.3.2. Signing an XML Document
          1. 16.3.2.1. Creating the reference
          2. 16.3.2.2. Creating the SignedXML
          3. 16.3.2.3. Setting the signing algorithm
          4. 16.3.2.4. Creating the signature
        3. 16.3.3. Embedding Objects in the Signature
        4. 16.3.4. Verifying an XML Signature
      4. 16.4. Extending the .NET Framework
        1. 16.4.1. The ElGamal Signature Functions Explained
        2. 16.4.2. Defining the Signature Function Class
        3. 16.4.3. Implementing the Managed Class Methods
        4. 16.4.4. Defining the PKCS #1 Helper Class
        5. 16.4.5. Defining the Signature Formatter Class
        6. 16.4.6. Defining the Signature Deformatter Class
        7. 16.4.7. Testing the Algorithm
    6. 17. Cryptographic Keys
      1. 17.1. Cryptographic Keys Explained
        1. 17.1.1. Understanding Key Complexity
        2. 17.1.2. Exchanging Symmetric Algorithm Keys
      2. 17.2. Programming Cryptographic Keys
        1. 17.2.1. Creating Keys
          1. 17.2.1.1. Using the algorithm classes
          2. 17.2.1.2. Using a random number generator
          3. 17.2.1.3. Using a key-derivation protocol
        2. 17.2.2. Using Key Persistence
        3. 17.2.3. Key Exchange Formatting
      3. 17.3. Extending the .NET Framework
        1. 17.3.1. ElGamal Key Exchange Explained
        2. 17.3.2. Defining the Key Exchange Formatter
        3. 17.3.3. Defining the Key Exchange Deformatter
  7. IV. .NET Application Frameworks
    1. 18. ASP.NET Application Security
      1. 18.1. ASP.NET Security Explained
        1. 18.1.1. ASP.NET Security Overview
        2. 18.1.2. ASP.NET Configuration Files
          1. 18.1.2.1. ASP.NET security-related configuration elements
          2. 18.1.2.2. Using <location> elements
      2. 18.2. Configuring the ASP.NET Worker Process Identity
      3. 18.3. Authentication
        1. 18.3.1. Configuring IIS Authentication Modes
        2. 18.3.2. No Authentication
        3. 18.3.3. Windows Authentication
        4. 18.3.4. Forms Authentication
          1. 18.3.4.1. Configuring Forms authentication
          2. 18.3.4.2. Creating the logon page
          3. 18.3.4.3. Creating the protected page
        5. 18.3.5. Passport Authentication
      4. 18.4. Authorization
        1. 18.4.1. File Authorization
        2. 18.4.2. URL Authorization
      5. 18.5. Impersonation
      6. 18.6. ASP.NET and Code-Access Security
    2. 19. COM+ Security
      1. 19.1. COM+ Security Explained
        1. 19.1.1. COM+ Role-Based Security
        2. 19.1.2. COM+ Process-Access Security
          1. 19.1.2.1. Authentication
          2. 19.1.2.2. Impersonation
      2. 19.2. Programming COM+ Security
        1. 19.2.1. Creating the Serviced Component
        2. 19.2.2. Specifying the COM+ Application Type
        3. 19.2.3. Applying the Security Attributes
          1. 19.2.3.1. The ApplicationAccessControl attribute
          2. 19.2.3.2. The ComponentAccessControl Attribute
          3. 19.2.3.3. The SecurityRole attribute
          4. 19.2.3.4. The SecureMethod attribute
        4. 19.2.4. Compiling and Installing the COM+ Application
      3. 19.3. Administering COM+ Security
        1. 19.3.1. Viewing the COM+ Catalogue
        2. 19.3.2. Populating COM+ Application Roles
        3. 19.3.3. Assessing and Assigning Role Scope
        4. 19.3.4. Managing COM+ Security
          1. 19.3.4.1. Managing the application
          2. 19.3.4.2. Managing the component
    3. 20. The Event Log Service
      1. 20.1. The Event Log Service Explained
        1. 20.1.1. Event Logs
        2. 20.1.2. Event Sources
        3. 20.1.3. Event Structure
          1. 20.1.3.1. Event source name
          2. 20.1.3.2. Message
          3. 20.1.3.3. Event type
          4. 20.1.3.4. Event identifier and event category
          5. 20.1.3.5. Binary data
      2. 20.2. Programming the Event Log Service
        1. 20.2.1. Querying the Event Log System
        2. 20.2.2. Using Event Sources
        3. 20.2.3. Reading Event Logs
        4. 20.2.4. Writing Events
        5. 20.2.5. Using Custom Event Logs
        6. 20.2.6. Monitoring Event Logs
  8. V. API Quick Reference
    1. 21. How to Use This Quick Reference
      1. 21.1. Finding a Quick-Reference Entry
      2. 21.2. Reading a Quick-Reference Entry
        1. 21.2.1. Type Name, Namespace, Assembly, Type Category, and Flags
        2. 21.2.2. Description
        3. 21.2.3. Synopsis
          1. 21.2.3.1. Member availability and flags
          2. 21.2.3.2. Functional grouping of members
        4. 21.2.4. Class Hierarchy
        5. 21.2.5. Cross-References
        6. 21.2.6. A Note About Type Names
    2. 22. Converting from C# to VB Syntax
      1. 22.1. General Considerations
      2. 22.2. Classes
      3. 22.3. Structures
      4. 22.4. Interfaces
      5. 22.5. Class, Structure, and Interface Members
        1. 22.5.1. Fields
        2. 22.5.2. Methods
        3. 22.5.3. Properties
        4. 22.5.4. Events
      6. 22.6. Delegates
      7. 22.7. Enumerations
    3. 23. The System.Security Namespace
      1. AllowPartiallyTrustedCallersAttribute
      2. CodeAccessPermission
      3. IEvidenceFactory
      4. IPermission
      5. ISecurityEncodable
      6. ISecurityPolicyEncodable
      7. IStackWalk
      8. NamedPermissionSet
      9. PermissionSet
      10. PolicyLevelType
      11. SecurityElement
      12. SecurityException
      13. SecurityManager
      14. SecurityZone
      15. SuppressUnmanagedCodeSecurityAttribute
      16. UnverifiableCodeAttribute
      17. VerificationException
      18. XmlSyntaxException
    4. 24. The System.Security.Cryptography Namespace
      1. AsymmetricAlgorithm
      2. AsymmetricKeyExchangeDeformatter
      3. AsymmetricKeyExchangeFormatter
      4. AsymmetricSignatureDeformatter
      5. AsymmetricSignatureFormatter
      6. CipherMode
      7. CryptoAPITransform
      8. CryptoConfig
      9. CryptographicException
      10. CryptographicUnexpectedOperationException
      11. CryptoStream
      12. CryptoStreamMode
      13. CspParameters
      14. CspProviderFlags
      15. DeriveBytes
      16. DES
      17. DESCryptoServiceProvider
      18. DSA
      19. DSACryptoServiceProvider
      20. DSAParameters
      21. DSASignatureDeformatter
      22. DSASignatureFormatter
      23. FromBase64Transform
      24. FromBase64TransformMode
      25. HashAlgorithm
      26. HMACSHA1
      27. ICryptoTransform
      28. KeyedHashAlgorithm
      29. KeySizes
      30. MACTripleDES
      31. MaskGenerationMethod
      32. MD5
      33. MD5CryptoServiceProvider
      34. PaddingMode
      35. PasswordDeriveBytes
      36. PKCS1MaskGenerationMethod
      37. RandomNumberGenerator
      38. RC2
      39. RC2CryptoServiceProvider
      40. Rijndael
      41. RijndaelManaged
      42. RNGCryptoServiceProvider
      43. RSA
      44. RSACryptoServiceProvider
      45. RSAOAEPKeyExchangeDeformatter
      46. RSAOAEPKeyExchangeFormatter
      47. RSAParameters
      48. RSAPKCS1KeyExchangeDeformatter
      49. RSAPKCS1KeyExchangeFormatter
      50. RSAPKCS1SignatureDeformatter
      51. RSAPKCS1SignatureFormatter
      52. SHA1
      53. SHA1CryptoServiceProvider
      54. SHA1Managed
      55. SHA256
      56. SHA256Managed
      57. SHA384
      58. SHA384Managed
      59. SHA512
      60. SHA512Managed
      61. SignatureDescription
      62. SymmetricAlgorithm
      63. ToBase64Transform
      64. TripleDES
      65. TripleDESCryptoServiceProvider
    5. 25. The System.Security.Cryptography.X509Certificates Namespace
      1. X509Certificate
      2. X509CertificateCollection
      3. X509CertificateCollection.X509CertificateEnumerator
    6. 26. The System.Security.Cryptography.Xml Namespace
      1. DataObject
      2. DSAKeyValue
      3. KeyInfo
      4. KeyInfoClause
      5. KeyInfoName
      6. KeyInfoNode
      7. KeyInfoRetrievalMethod
      8. KeyInfoX509Data
      9. Reference
      10. RSAKeyValue
      11. Signature
      12. SignedInfo
      13. SignedXml
      14. Transform
      15. TransformChain
      16. XmlDsigBase64Transform
      17. XmlDsigC14NTransform
      18. XmlDsigC14NWithCommentsTransform
      19. XmlDsigEnvelopedSignatureTransform
      20. XmlDsigXPathTransform
      21. XmlDsigXsltTransform
    7. 27. The System.Security.Permissions Namespace
      1. CodeAccessSecurityAttribute
      2. EnvironmentPermission
      3. EnvironmentPermissionAccess
      4. EnvironmentPermissionAttribute
      5. FileDialogPermission
      6. FileDialogPermissionAccess
      7. FileDialogPermissionAttribute
      8. FileIOPermission
      9. FileIOPermissionAccess
      10. FileIOPermissionAttribute
      11. IsolatedStorageContainment
      12. IsolatedStorageFilePermission
      13. IsolatedStorageFilePermissionAttribute
      14. IsolatedStoragePermission
      15. IsolatedStoragePermissionAttribute
      16. IUnrestrictedPermission
      17. PermissionSetAttribute
      18. PermissionState
      19. PrincipalPermission
      20. PrincipalPermissionAttribute
      21. PublisherIdentityPermission
      22. PublisherIdentityPermissionAttribute
      23. ReflectionPermission
      24. ReflectionPermissionAttribute
      25. ReflectionPermissionFlag
      26. RegistryPermission
      27. RegistryPermissionAccess
      28. RegistryPermissionAttribute
      29. ResourcePermissionBase
      30. ResourcePermissionBaseEntry
      31. SecurityAction
      32. SecurityAttribute
      33. SecurityPermission
      34. SecurityPermissionAttribute
      35. SecurityPermissionFlag
      36. SiteIdentityPermission
      37. SiteIdentityPermissionAttribute
      38. StrongNameIdentityPermission
      39. StrongNameIdentityPermissionAttribute
      40. StrongNamePublicKeyBlob
      41. UIPermission
      42. UIPermissionAttribute
      43. UIPermissionClipboard
      44. UIPermissionWindow
      45. UrlIdentityPermission
      46. UrlIdentityPermissionAttribute
      47. ZoneIdentityPermission
      48. ZoneIdentityPermissionAttribute
    8. 28. The System.Security.Policy Namespace
      1. AllMembershipCondition
      2. ApplicationDirectory
      3. ApplicationDirectoryMembershipCondition
      4. CodeGroup
      5. Evidence
      6. FileCodeGroup
      7. FirstMatchCodeGroup
      8. Hash
      9. HashMembershipCondition
      10. IIdentityPermissionFactory
      11. IMembershipCondition
      12. NetCodeGroup
      13. PermissionRequestEvidence
      14. PolicyException
      15. PolicyLevel
      16. PolicyStatement
      17. PolicyStatementAttribute
      18. Publisher
      19. PublisherMembershipCondition
      20. Site
      21. SiteMembershipCondition
      22. StrongName
      23. StrongNameMembershipCondition
      24. UnionCodeGroup
      25. Url
      26. UrlMembershipCondition
      27. Zone
      28. ZoneMembershipCondition
    9. 29. The System.Security.Principal Namespace
      1. GenericIdentity
      2. GenericPrincipal
      3. IIdentity
      4. IPrincipal
      5. PrincipalPolicy
      6. WindowsAccountType
      7. WindowsBuiltInRole
      8. WindowsIdentity
      9. WindowsImpersonationContext
      10. WindowsPrincipal
  9. Index
  10. About the Authors
  11. Colophon
  12. Copyright

Product information

  • Title: Programming .NET Security
  • Author(s): Adam Freeman, Allen Jones
  • Release date: June 2003
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596004422