Monday, October 4, 2010

Mammal Vs Reptile Body Temperature

Java Cryptography

The Java language divides security into two levels:
  • a low level of security JVM Layer :garbage collection,class file verification, etc.
  • un livello alto di sicurezza Application Layer :sandbox, security policy, security APIs, etc.
Fino a JDK 1.4 esistevono package esterni per creare applicazioni sicure:
  • JCE (Java Cryptography Extension)
  • JSSE (Java Secure Socket Extension)
  • JAAS (Java Authentication and Authorization Service)
Dalle versioni successive a JDK 1.4 sono state aggiunte due nuove funzionalità:
  • JGSS (Java General Security Service)
  • CertPath API (Java Certificate Path API)

JVM Layer



JVM Layer
Layer JVM: Java Virtual Machine
  • is responsible for platform independence
  • is responsible for the abstract machine
  • has a set of instructions
  • can manipulate the memory at runtime
  • does not interpret the code, but Java bytecode
  • bytecode class file is stored in
Layer JVM: Class file structure
The class file is composed of:
  • a "magic" in constant OxCAFEBABE
  • version number
  • Access flag
  • " in constant pool"
  • current class information (name, superclass, etc.).
  • information about the methods and properties of a class
  • Information Debbugging

JVM Layer: The Class File Verification
  • Check basic structure Class
  • Check the base of "looks" of:
    class
    references references references fields
    six symbols
  • Verify Verify actual bytecode
  • :
    references classes
    access and modification fields and methods called

Application Layer Application Layer
: Class verification
  • The class loader loads classes on demand
  • reduces the memory used
  • Enforces
  • type-safety alongside the JVM
  • Migliora il tempo di risposta del sistema
  • Istanze di classe caricate:
    Primordial/bootstrap class loader
    System class loader
    Application class loader
  • Il class loader è chiamato è chiamato dalla JVM
  • Il class loader è responsabile di caricare le classi e di dargli un namespace
  • Associa le classi caricate ad un dominio di protezione
Protection domain
  • associa i permessi alla classe per quanto riguarda le locazioni, i certificati, etc.
  • è definito dalla security policy
  • la security policy di default si riferisce al system-wide policy ed implementa la policy di default per la sandbox 
  • policy addizionali sono user-defined
  • si possono avere una o più policy security
  • tutte le referenze alla security policy sono specificate nel security property file localizzato nella directory di installazione del JDK(o JRE)

0 comments:

Post a Comment