public void updateKey(){
		//System.out.println("\n---------------Update Key protocol--------------");
		long start = System.currentTimeMillis();
		// Get revocation certificate
		int currentIndex = this.revoc.getCurrentIndex(); 
		if(this.index < currentIndex){
			Integer i;
			//System.out.println("Number of updates: "+ Integer.toString(currentIndex-index) );
			for(i = index + 1 ; i <= currentIndex ; i++){
				RevocationCertificate certif = revoc.getCertificate(i);
				Mpk revocMpk = certif.getMpk();
				if(this.mpk.getA().compareTo(revocMpk.getA())==0 && mpk.getB().compareTo(revocMpk.getB())==0 && mpk.getEPrime().compareTo(revocMpk.getEPrime())==0 && mpk.geth().getx().compareTo(revocMpk.geth().getx())==0 && mpk.geth().gety().compareTo(revocMpk.geth().gety())==0){
					//System.out.println("I was revoked...");
				}
				else{
					BigInteger B = this.revoc.getNewCertificat(this.mpk,certif);
					this.mpk.setB(B);
					//System.out.println("B new = " + this.mpk.getB());
				}
			}
			this.index = currentIndex;
			this.rpk = this.revoc.getRpk();
		}
		else{
			//System.out.println("Number of update: 0");
		}
		long end = System.currentTimeMillis();
		//System.out.println("\nExecution time was "+(end-start)+" ms.");
		//System.out.println("\n---------------DONE--------------");
	}