Patent ID: 8175267

Claim:
A communication apparatus that transmits a plurality of pieces as a part of a content, comprising: a first storage unit that stores a plurality of encrypted pieces obtained by encrypting each of the pieces by an encryption key, and that stores a plurality of encrypted pieces obtained by encrypting at least one of first pieces among the pieces by a plurality of different encryption keys; a second storage unit that stores number of transmission times of each of the encrypted pieces stored in the first storage unit; a selecting unit that selects as priority pieces the encrypted pieces corresponding to at least one of the first pieces, based on number of untransmitted encrypted pieces of which number of transmission times is zero among the encrypted pieces of which the first piece is encrypted; a storage control unit that controls the second storage unit so that the second storage unit additionally stores priority piece information specifying a selected priority piece, in the second storage unit; a receiving unit that receives a piece request requesting an encrypted piece, from other communication apparatus; a first determining unit that determines as transmission candidates the encrypted pieces specified as the priority pieces by the priority piece information, when the piece request is received; a second determining unit that determines at least one of the untransmitted encrypted pieces as an encrypted piece to be transmitted, among the encrypted pieces determined as transmission candidates; a transmitting unit that transmits the encrypted piece determined to be transmitted, to the other communication apparatus; a first updating unit that updates number of transmission times of each of the encrypted pieces stored in the second storage unit, in accordance with the encrypted piece transmitted by the transmitting unit; a second updating unit that updates the priority piece information stored in the second storage unit, in the second storage unit, so that the priority piece becomes in an initial state not specified by the priority piece information, when the untransmitted encrypted piece is not present any more among the encrypted pieces specified as priority pieces by the priority piece information; and a processor configured to execute at least the selecting unit.