{"action":"created","issue":{"url":"https://api.github.com/repos/kimandrik/HEAAN/issues/4","repository_url":"https://api.github.com/repos/kimandrik/HEAAN","labels_url":"https://api.github.com/repos/kimandrik/HEAAN/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/kimandrik/HEAAN/issues/4/comments","events_url":"https://api.github.com/repos/kimandrik/HEAAN/issues/4/events","html_url":"https://github.com/kimandrik/HEAAN/issues/4","id":332242142,"node_id":"MDU6SXNzdWUzMzIyNDIxNDI=","number":4,"title":"Any batch multiplication example on plaintext encoding ?","user":{"login":"fionser","id":1809457,"node_id":"MDQ6VXNlcjE4MDk0NTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1809457?v=4","gravatar_id":"","url":"https://api.github.com/users/fionser","html_url":"https://github.com/fionser","followers_url":"https://api.github.com/users/fionser/followers","following_url":"https://api.github.com/users/fionser/following{/other_user}","gists_url":"https://api.github.com/users/fionser/gists{/gist_id}","starred_url":"https://api.github.com/users/fionser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fionser/subscriptions","organizations_url":"https://api.github.com/users/fionser/orgs","repos_url":"https://api.github.com/users/fionser/repos","events_url":"https://api.github.com/users/fionser/events{/privacy}","received_events_url":"https://api.github.com/users/fionser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-14T03:48:00Z","updated_at":"2018-06-14T04:53:40Z","closed_at":null,"author_association":"NONE","body":"I understand that a vector of double is converted to a real polynomial via iFFT.\r\n```\r\nR^(N/2) --> R[X]/(X^N + 1)\r\n```\r\nMy question is that, how to perform batch multiplication ? \r\nI know there are API to do that in the ciphertext domain, but I want to know how it\r\nwork in the plaintext domain. Here is some code of my concerns.\r\n\r\n```\r\nstd::vector<double> vec_a(slots);\r\nstd::vector<double> vec_b(slots);\r\nNTL::ZZX poly_A = context.encode(vec_a);\r\nNTL::ZZX poly_B = context.encode(vec_a);\r\nNTL::ZZX poly_C = poly_A * poly_B; // should it take the polynomial mod X^N + 1 here ?\r\nauto vec_c = context.decode(poly_C); // should vec_c[i] = vec_a[i] * vec_b[i] ?\r\n```"},"comment":{"url":"https://api.github.com/repos/kimandrik/HEAAN/issues/comments/397170003","html_url":"https://github.com/kimandrik/HEAAN/issues/4#issuecomment-397170003","issue_url":"https://api.github.com/repos/kimandrik/HEAAN/issues/4","id":397170003,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzE3MDAwMw==","user":{"login":"fionser","id":1809457,"node_id":"MDQ6VXNlcjE4MDk0NTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1809457?v=4","gravatar_id":"","url":"https://api.github.com/users/fionser","html_url":"https://github.com/fionser","followers_url":"https://api.github.com/users/fionser/followers","following_url":"https://api.github.com/users/fionser/following{/other_user}","gists_url":"https://api.github.com/users/fionser/gists{/gist_id}","starred_url":"https://api.github.com/users/fionser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fionser/subscriptions","organizations_url":"https://api.github.com/users/fionser/orgs","repos_url":"https://api.github.com/users/fionser/repos","events_url":"https://api.github.com/users/fionser/events{/privacy}","received_events_url":"https://api.github.com/users/fionser/received_events","type":"User","site_admin":false},"created_at":"2018-06-14T04:53:40Z","updated_at":"2018-06-14T04:53:40Z","author_association":"NONE","body":"It is very strange that, we taking `2 * logp` the multiplication work.\r\nHowever, the addition will fail. \r\n```\r\nRing2Utils::add(polyC, polyA, polyB, context.Q, context.N);\r\ncomplex<double>* result = context.decode(polyC, slots, 2 * logp, logQ);\r\n```"}}
{"actor":{"display_login":"fionser"}}