## authentication – Why does message 1 of the WPA2 4 way handshake begin with the access point sending a random number?

This communication carries no information and could have come from any attacker.

Correct. But the server knows which random number (ANonce) it has send and requires that the client does computations with this number and not with some other number set by the attacker. In other words: the ANonce is neither secret nor does it need to be protected. All what is needed is that it is defined by the server. The server uses the self-defined ANonce and not some attacker-defined ANonce when validating computations done by the client. Validating will only succeed if the client is using the server-defined ANonce and not the attacker-defined ANonce too.

Somewhere I am missing where the 4 way handshake proves the access point’s authenticity.

From Wikipedia:

The four-way handshake(8) is designed so that the access point (or authenticator) and wireless client (or supplicant) can independently prove to each other that they know the PSK/PMK, without ever disclosing the key. Instead of disclosing the key, the access point (AP) and client encrypt messages to each other—that can only be decrypted by using the PMK that they already share—and if decryption of the messages was successful, this proves knowledge of the PMK.

## fa.functional analysis – RKHS of functions vanishing at single point

enter image description here

It is easy to show that $$H_{0}$$ is RKHS and I am aware of the fact that if $$P:Hrightarrow H_{0}$$ is the orthogonal projection then the kernel of $$H_{0}$$ is $$K_{0}(x,y)=langle Pk_{y},k_{x}rangle$$. My question is how to calculate the kernel explicitly?

I tried to find a function $$phi:Xrightarrow mathbb{C}$$ such that $$phi(x_{0})=0$$ and for every function $$fin H_{0}$$ there exist a function $$gin H_{0}$$ such that $$f(x)=phi(x)g(x)$$. Also multiplication operator $$M_{phi}$$ on $$H$$ is isometry, then

$$f(x)=phi(x)g(x)=phi(x)langle g,k_{x}rangle=phi(x)langle phi g,phi k_{x}rangle= langle phi g,phi k_{x}overline{phi(x)}rangle=langle f,phi k_{x}overline{phi(x)}rangle$$.

Then the kernel of $$H_{0}$$ is $$K_{0}(y,x)=phi(y) k(y,x)overline{phi(x)}$$. But I am not able to find such $$phi$$.

## c – Check if point is inside a bitmap shape

Inspired by this question, here’s some C code to check if a point is “inside” of a shape on a simple black and white bitmap.

For this exercise:

• Set bits form the “outlines” of a shape (and are never inside).
• Unset bits may be inside or outside of a shape.
• Unset bits with a path to the edge of the bitmap are “outside”.
• Unset bits with no path to the edge of the bitmap are “inside”.
• Paths may step diagonally between set bits.

``````
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void die() { __debugbreak(); }
void die_if(bool condition) { if (condition) die(); }

struct bitmap
{
size_t m_w;
size_t m_h;
bool* m_pixels;
};

struct bitmap bitmap_from_string(size_t width, size_t height, char const* str)
{
die_if(!str);
die_if(strlen(str) != width * height);

bool* pixels = malloc(sizeof(bool) * width * height);
die_if(!pixels);

char const* src = str;
bool* dst = pixels;

char const set = '#';
for (size_t i = 0; i != width * height; ++i)
*dst++ = (*src++ == set ? true : false);

return (struct bitmap){ width, height, pixels };
}

bool bitmap_is_in_bounds(struct bitmap* bmp, size_t x, size_t y)
{
die_if(!bmp);
return (x < bmp->m_w) && (y < bmp->m_h);
}

bool bitmap_at(struct bitmap* bmp, size_t x, size_t y)
{
die_if(!bmp);
die_if(!bitmap_is_in_bounds(bmp, x, y));

return bmp->m_pixels(y * bmp->m_w + x);
}

bool bitmap_is_at_edge(struct bitmap* bmp, size_t x, size_t y)
{
die_if(!bmp);
die_if(!bitmap_is_in_bounds(bmp, x, y));

return (x == 0 || y == 0 || x == (bmp->m_w - 1) || y == (bmp->m_h - 1));
}

void bitmap_free(struct bitmap* bmp)
{
die_if(!bmp);

free(bmp->m_pixels);
bmp->m_pixels = NULL;
}

/* bitmap_is_in_shape
*    A "shape" is composed of unset bits, fully enclosed (on axes and
* diagonally) by set bits (so there should not exist a path of unset bits from
* the start point to the edge of the bitmap).
*    Start points on set bits are not considered to be "inside" a shape.
*/
bool bitmap_is_in_shape(struct bitmap* bmp, size_t x, size_t y)
{
die_if(!bmp);
die_if(!bitmap_is_in_bounds(bmp, x, y));

/* trivial rejection */
if (bitmap_at(bmp, x, y)) return false; /* on outline */
if (bitmap_is_at_edge(bmp, x, y)) return false; /* at edge */

/* depth first search */
struct coords { size_t x, y; };

size_t stack_size = 0;
struct coords* stack = malloc(sizeof(struct coords) * bmp->m_w * bmp->m_h); /* coords to visit next */
die_if(!stack);

bool* visited = calloc(bmp->m_w * bmp->m_h, sizeof(bool)); /* points added to stack - indexed the same as bitmap pixels */
die_if(!visited);

visited(y * bmp->m_w + x) = true; /* start point already visited */

/* for each neighbour... */
#define N(c_x, c_y)
X(c_x, c_y, -1, -1)
X(c_x, c_y, -1,  0)
X(c_x, c_y, -1, +1)
X(c_x, c_y,  0, -1)
X(c_x, c_y,  0, +1)
X(c_x, c_y, +1, -1)
X(c_x, c_y, +1,  0)
X(c_x, c_y, +1, +1)

/* check visited list and push to stack */
#define X(c_x, c_y, o_x, o_y)
if (!visited((size_t)(c_y + o_y) * bmp->m_w + (size_t)(c_x + o_x)))
{
visited((size_t)(c_y + o_y) * bmp->m_w + (size_t)(c_x + o_x)) = true;
stack(stack_size++) = (struct coords){ (size_t)(c_x + o_x), (size_t)(c_y + o_y) };
}

N(x, y); /* add neighbours */

bool result = true;

while (stack_size != 0)
{
struct coords c = stack(--stack_size); /* pop */

if (bitmap_at(bmp, c.x, c.y)) continue; /* on outline */
if (bitmap_is_at_edge(bmp, c.x, c.y)) { result = false; break; } /* at edge */

N(c.x, c.y); /* add neighbours */
}

#undef X
#undef N

free(stack);
free(visited);

return result;
}

void test(bool expected, bool actual, char const* name)
{
printf("%s: %sn", name, (expected == actual ? "pass" : "FAIL"));
}

int main()
{
{
struct bitmap bmp = bitmap_from_string(1, 1, "#");

test(false, bitmap_is_in_shape(&bmp, 0, 0), "one pixel - set");

bitmap_free(&bmp);
}
{
struct bitmap bmp = bitmap_from_string(1, 1, " ");

test(false, bitmap_is_in_shape(&bmp, 0, 0), "one pixel - unset");

bitmap_free(&bmp);
}
{
struct bitmap bmp = bitmap_from_string(3, 3,
"###"
"# #"
"###");

test(false, bitmap_is_in_shape(&bmp, 0, 1), "three pixel - on outline");
test(true, bitmap_is_in_shape(&bmp, 1, 1), "three pixel - bounded");

bitmap_free(&bmp);
}
{
struct bitmap bmp = bitmap_from_string(3, 3,
"###"
"# #"
"## ");

test(false, bitmap_is_in_shape(&bmp, 0, 1), "three pixel - on outline");
test(false, bitmap_is_in_shape(&bmp, 1, 1), "three pixel - middle w/ outlet");

bitmap_free(&bmp);
}
{
struct bitmap bmp = bitmap_from_string(8, 4,
"########"
"###### #"
"#      #"
"########");

test(true, bitmap_is_in_shape(&bmp, 1, 2), "corridor - start");
test(true, bitmap_is_in_shape(&bmp, 6, 1), "corridor - end");
test(false, bitmap_is_in_shape(&bmp, 3, 1), "corridor - on outline");

bitmap_free(&bmp);
}
{
struct bitmap bmp = bitmap_from_string(8, 4,
"##### ##"
"###### #"
"# #    #"
"########");

test(true, bitmap_is_in_shape(&bmp, 1, 2), "corridor - room");
test(false, bitmap_is_in_shape(&bmp, 3, 2), "corridor - start");
test(false, bitmap_is_in_shape(&bmp, 6, 1), "corridor - end");
test(false, bitmap_is_in_shape(&bmp, 3, 1), "corridor - on outline");

bitmap_free(&bmp);
}
}

``````

Some things:

• The X macro was fun to use… but feels a little messy. Especially adding the offset to the coordinates.

• I like to use assert-type checks (`die_if()`) everywhere… but is it too much? Often there’s a check in a higher-level function (e.g. `bitmap_is_in_shape()` checks that the bitmap isn’t null) that makes all the following lower-level checks redundant (e.g. in `bitmap_at()` checks it again).

Would having two versions of lower-level access functions (e.g. `bitmap_at()` and `bitmap_at_unsafe()`) be silly?

• Any other C-ish things (especially more modern stuff) that’s missing?

Any other feedback welcome. 🙂

## Anyone Ever Used Digital Point?

I have not ever tried advertising with Digital Point

For advertising, I would go with WebmasterSun
It has good active members and high traffic site also you can advertise on it with low price.

Hope it helps!

## women role in share point improvement

http://spraydeal.com
in my life I feel that woman love money a lot and sometime woman kick money for a man I am too much confused what is this?

## c – Determine if a point is inside or ouside of an irregular shape on a bitmap

So this is my task:

You are given an irregular shape on a bitmap. How do you determine if
a point is inside or ousdie of the shape?

We are allowed to assume that `helper functions` are already available for us and we don’t need to write them as well.

So I decided that I can use a function that returns me the status of a given bit on that bitmap.

``````int IsBitIsOn(bitmap_ty *bitmap, size_t x, size_t y);
``````

We also can assume that the given point won’t be a point on the outline of the shape. Which means the given X,Y coordinates must be either inside or outside the shape and not on one of the outlines.

And here is my full code of the task,
I wrote it as a bitmap that every `ON(==1)` bit tells me that I’m on an outline, while `0 bit` tells me i’m either `inside` or `outside` the shape.

``````int IsInTheShape(bitmap_ty *bitmap, size_t x, size_t y)
{
int IsIn = 0; /* flag of whether the given point is inside the shape    */

int ComeFromAbove = 0;

int start_sequal = 1;

size_t curr_row = y;
size_t curr_column = 0;

while (x != curr_column)
{
if (IsBitIsOn(bitmap, curr_column, curr_row))
{
IsIn = !IsIn;

/* starts a sequal of bits that are ON  */
while (IsBitIsOn(bitmap, curr_column + 1, curr_row))
{
/* checks the source direction of the first bit in the sequal */
if (start_sequal &&
IsBitOn(bitmap, curr_column, curr_row - 1) ||
isBitOn(bitmap, curr_column - 1, curr_row - 1) ||
isBitOn(bitmap, curr_column + 1, curr_row - 1))
{
ComeFromAbove = 1;
start_sequal = 0;
}
++curr_column;
}
/*  checks the source direction of the last bit in the sequal,
so if it cuts the direction of the first bit, it means
the next points are out of the shape    */
if (ComeFromAbove)
{
if (!IsBitOn(bitmap, curr_column, curr_row + 1) &&
!isBitOn(bitmap, curr_column - 1, curr_row + 1) &&
!isBitOn(bitmap, curr_column + 1, curr_row + 1))
{
ComeFromAbove = 0;
IsIn = !IsIn;
}
}
}
++curr_column;
}

return (IsIn);
}
``````

I draw the following shapes find the problematic points and shapes:

## algorithms – I have just created a program to create a heap out of the input array, but my output does not match, please point the error

#include
using namespace std;
int swap(int dumb ,int i, int temp)
{
int jigle=
(dumb+temp);
(dumb+temp)=(dumb+i);
*(dumb+i)=jigle;
return 0;
}
int main()
{
int a(6)={32,40,15,50,5,44};
int n=6;

``````int *dumb=new int(n);
for(int i=0;i<n;i++)
{
*(dumb+i)=*(a+i);
if(i>0)
{
int temp=(i-1)/2;
while(*(dumb+i)>*(dumb+temp))
{
swap(dumb,i,temp);
i=temp;
temp=(i-1)/2;
if(i==0)
{
break;
}
}
}
}
for(int i=0;i<n;i++)
{
cout<<*(dumb+i)<<"n";
}
``````

}

OUTPUT:
50
50
15
50
5

## point and shoot – Dust on the sensor vs. in the lens?

I have an old, used Panasonic LX100 (Point and Shoot) that I plan to use as my main all-use video camera. I just started noticing that dust spots are visible in the image on apertures larger than about 4, and they become sharper as aperture is increased.

I have a couple of questions. First of all, would this indicate that the dust is on one of the lens elements, on the sensor, or either?

Second, if I were to have this commercially repaired, would either repair be substantially harder than the other? I’m keeping cost in mind as I might just get an ND filter to avoid using the higher apertures if the cost is too high for my practicality (at least until I save up to have the repair done).

## Need to point wsus server and client

Updating all computers to report to WSUS with Computers inside a text file

Hello, I have a .ps1 script I’m trying to create to point all my computers/PC’s to my WSUS update server. But I’m new to his PowerShell stuff not at all like .bash scripting to me.

OK here is what I’m trying to accomplish. Please if you respond and you know what is wrong. Please can you place changes within my script inside and paste below so i can then compare what was done.

Easier for me to view and learn.

I have no access to our GPO ” GROUP POLICY SERVER ” which this could be done in no time…

Here is .ps1 script below:

\$WindowsUpdatePath = “HKLM:SOFTWAREPoliciesMicrosoftWindowsWindowsUpdate”
\$AutoUpdatePath = “HKLM:SOFTWAREPoliciesMicrosoftWindowsWindowsUpdateAU”
\$WSUSServer = “http://deswsus01.local:80”
\$PClist = Get-Content “C:PClist.txt”

ForEach (\$PC in \$PClist)
{
Invoke-Command -ComputerName \$PC {Set-ItemProperty -Path \$WindowsUpdatePath -Name WUServer -Value \$WSUSServer -Force}

Invoke-Command -ComputerName \$PC {Set-ItemProperty -Path \$WindowsUpdatePath -Name WUStatusServer -Value \$WSUSServer -Force}

Invoke-Command -ComputerName \$PC {Set-ItemProperty -Path \$WindowsUpdatePath -Name AcceptTrustedPublisherCerts -Value 1 -Force}

Invoke-Command -ComputerName \$PC {Set-ItemProperty -Path \$AutoUpdatePath -Name NoAutoUpdate -Value 0 -Force}

Invoke-Command -ComputerName \$PC {Set-ItemProperty -Path \$AutoUpdatePath -Name UseWUServer -Value 1 -Force}

}

## camera – Horizontal and vertical field of view calculation when principal point is not image center

I have a requirement to calculate the ground footprint for an aerial camera. I have the camera position and orientation. To calculate it, I require to calculate Horizontal Field of View (FoV) and vertical FoV. I found the formulas in calculating horizontal FoV and vertical FoV. But the formulas assume that the principal point is in the image center (I hope).

What are the correct formulas to apply when the principal point is not the image center? In my case, the principal point deviates from the image center.

Does principal point have an impact on calculating Horizontal FoV and Vertical FoV?