Entropy collecting


Functions

int zrtp_add_system_state (zrtp_global_ctx_t *zrtp_global, MD_CTX *ctx)
 Function for entropy collecting. This function should adds some entropy portion to the RNG context. To implement this function:
  • use all available sources for entropy collecting;
  • use "real" entropy. Don't use standard pseudo-randomp generators such as rand() in C.
  • data received from the system should be hashed with the hash context using MD_Update(MD_CTX *, void* data, length). Where data is a pointer to collected entropy sources with length length.
  • function shouldn't add significant time delays;.


Function Documentation

int zrtp_add_system_state ( zrtp_global_ctx_t *  zrtp_global,
MD_CTX *  ctx 
)

Function for entropy collecting. This function should adds some entropy portion to the RNG context. To implement this function:

Warning:
The random number generator is a very important part of the crypto system. That's why we integrated a default implementation of RNG to libzrtp. Use your own code only if absolutely necessary.
See also:
5 Random number generation
Parameters:
zrtp_global - global ZRTP context;
ctx - hash context for storing collected entropy.
Returns:
  • number of generated bytes if successful;
  • -1 if an error occurred.


This file is part of the documentation for Zfone.
Copyright ©  2006-2008 Philip R. Zimmermann. All rights reserved.
Generated on Mon November 10 2008 by doxygen 1.5.7-20060202. Written by Viktor Krikun, © 2006-2008