LeakWatch

Java API

LeakWatch's API documentation is presented in standard Javadoc format.

If you are using LeakWatch to estimate information leakage in your own Java programs, you need only understand the API calls in the LeakWatchAPI class that tell LeakWatch about the secret and publicly-observable information that occurs in your program:

  • LeakWatchAPI.secret(String varName, Object value) tells LeakWatch that the value currently stored in the variable varName is to be treated as secret. Use this at any particular point in your code where a variable contains secret information that needs to be protected from adversaries.
  • LeakWatchAPI.observe(Object value) tells LeakWatch that an adversary is able to observe value at this time (but not the name of the variable associated with the value, if there is one). Use this at any particular point in your code where an adversary may be shown some information; e.g., when printing to the console or when sending data over a plaintext Socket.

Reusing LeakWatch's Code

LeakWatch's source code is modular, and you may find its other classes (particularly the utility classes, such as ArffFileWriter and TransientClassLoader) to be useful in their own right. LeakWatch is released under the terms of the permissive Simplified BSD license — you are free to reuse any of LeakWatch's code in your own projects, provided you abide by the terms of the license (see leakwatch-0.5/doc/LICENSE in the source tarball for a full copy of the license).