code: public void init(boolean forEncryption, CipherParameters param) {
  		this.forEncryption = forEncryption;
  
  		if (param instanceof ParametersWithRandom) {
  			final ParametersWithRandom rParam = (ParametersWithRandom) param;
  			this.ecKey = (ECKeyParameters) rParam.getParameters();
  			this.random = rParam.getRandom();
  		} else {
  			this.ecKey = (ECKeyParameters) param;
  		}
  		this.ecParams = this.ecKey.getParameters();
  
  		if (forEncryption) {
  			// 检查曲线点
  			final ECPoint ecPoint = ((ECPublicKeyParameters) ecKey).getQ().multiply(ecParams.getH());
  			if (ecPoint.isInfinity()) {
  				throw new IllegalArgumentException("invalid key: [h]Q at infinity");
  			}
  
  			// 检查随机参数
  			if (null == this.random) {
  				this.random = CryptoServicesRegistrar.getSecureRandom();
  			}
  		}
  
  		// 曲线位长度
  		this.curveLength = (this.ecParams.getCurve().getFieldSize() + 7) / 8;
  	}
docs: 初始化引擎
  
  @param forEncryption 是否为加密模式
  @param param {@link CipherParameters}，此处应为{@link ParametersWithRandom}（加密时）或{@link ECKeyParameters}（解密时）