public BigInteger readKeyFromFile(String keyFileName) throws IOException {
		  //InputStream in =    ServerConnection.class.getResourceAsStream(keyFileName);
		File f=new File(keyFileName);
		FileInputStream fis=new FileInputStream(f);
		  ObjectInputStream ois =   new ObjectInputStream(fis);
		  try {
		    n = (BigInteger) ois.readObject();
		    pubKey = (BigInteger) ois.readObject();
		    return pubKey;
		  	} catch (Exception e) {
		  		throw new RuntimeException("Spurious serialisation error", e);
		  	}  finally{
				if(ois != null){
				ois.close();
				if(fis != null){
				fis.close();
				}
				}
			}
		}