class_docstr: hardcoded public parameter
  log2(__prime) > 128
  
  __generator is a primitive root of __prime
docstr: sender's input is two message lists
docstr_tok: ["sender","'s","input","is","two","message","lists"]
code: def send(self, message0s: List[str], message1s: List[str]):
      """
      sender's input is two message lists
      """
      if len(message0s) != len(message1s):
          raise ("inconsistent input size!")
  
      alphas = []
      masks_for_message1s = []
      for _i in range(len(message1s)):
          # pick a random element from Z_p
          alpha = random.randint(0, self.__prime - 1)
          alphas.append(alpha)
  
          # g^\alpha
          mask_for_message1 = pow(self.__generator, alpha, self.__prime)
          masks_for_message1s.append(mask_for_message1)
  
      # send mask_for_message1
      for i in range(len(message1s)):
          comm.get().send_obj(masks_for_message1s[i], self.partner_rank)
  
      # compute (g^\alpha)^-\alpha when waiting for response
      # (g^-1)^(\alpha^2) = (g^-1)^(\alpha^2 mod (p-1))
      dividers = []
      for i in range(len(message1s)):
          divider = pow(
              self.__inverse__generator,
              alphas[i] * alphas[i] % (self.__prime - 1),
              self.__prime,
          )
          dividers.append(divider)
  
      masks_for_choices = []
  
      # recv mask_for_choice
      for _i in range(len(message1s)):
          mask_for_choice = comm.get().recv_obj(self.partner_rank)
          masks_for_choices.append(mask_for_choice)
  
      for i in range(len(message1s)):
          masks_for_choices[i] = pow(
              masks_for_choices[i], alphas[i], self.__prime
          )
  
          # hash
          pad0 = sha256(
              str(masks_for_choices[i]).encode("utf-8")
          ).hexdigest()
          pad1 = sha256(
              str(
                  masks_for_choices[i] * dividers[i] % self.__prime
              ).encode("utf-8")
          ).hexdigest()
  
          if len(pad0) < len(message0s[i]):
              raise (str(i) + "-th message0 is too long")
          if len(pad1) < len(message1s[i]):
              raise (str(i) + "-th message1 is too long")
          # encrypt with one time pad
          message0_enc = self.string_xor(pad0, message0s[i])
          message1_enc = self.string_xor(pad1, message1s[i])
  
          # send message0, message1
          comm.get().send_obj(message0_enc, self.partner_rank)
          comm.get().send_obj(message1_enc, self.partner_rank)
  
file_path: CrypTen/crypten/mpc/primitives/ot/baseOT.py
imports: import random
  from hashlib import sha256
  from typing import List
  import crypten.communicator
label_desc: Use image node_id 3 for calling the BaseOT obj's underlying member method code with example usage: obj.send(message0s, message1s) without return types